summaryrefslogtreecommitdiff
path: root/m4/dup2.m4
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-02-16 14:42:43 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-02-16 14:42:43 +0000
commit974ab3dd887985e3aa347f3c6521f819296396a0 (patch)
tree802fb82c9f8ec8acd7a60fba7824c2df6f0073ad /m4/dup2.m4
parent8e7ba70eba02f88d4f3ba12e07ab9c7bdf32240a (diff)
downloadcoreutils-974ab3dd887985e3aa347f3c6521f819296396a0.tar.gz
Imported Upstream version 8.21upstream/8.21
Diffstat (limited to 'm4/dup2.m4')
-rw-r--r--m4/dup2.m47
1 files changed, 5 insertions, 2 deletions
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index fc86e808..269cfdc1 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,5 +1,5 @@
-#serial 18
-dnl Copyright (C) 2002, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+#serial 19
+dnl Copyright (C) 2002, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -39,6 +39,9 @@ AC_DEFUN([gl_FUNC_DUP2],
/* Many gnulib modules require POSIX conformance of EBADF. */
if (dup2 (2, 1000000) == -1 && errno != EBADF)
result |= 16;
+ /* Flush out a cygwin core dump. */
+ if (dup2 (2, -1) != -1 || errno != EBADF)
+ result |= 32;
return result;
])
],