summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/dup2.m47
-rw-r--r--m4/dup3.m44
2 files changed, 7 insertions, 4 deletions
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index 269cfdc112..dc3070c0d9 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,4 +1,4 @@
-#serial 19
+#serial 20
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,
@@ -39,9 +39,11 @@ 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. */
+ /* Flush out some cygwin core dumps. */
if (dup2 (2, -1) != -1 || errno != EBADF)
result |= 32;
+ dup2 (2, 255);
+ dup2 (2, 256);
return result;
])
],
@@ -65,6 +67,7 @@ AC_DEFUN([gl_FUNC_DUP2],
*yes) ;;
*)
REPLACE_DUP2=1
+ AC_CHECK_FUNCS([setdtablesize])
;;
esac
fi
diff --git a/m4/dup3.m4 b/m4/dup3.m4
index 706d7261a2..23b6bb1a6a 100644
--- a/m4/dup3.m4
+++ b/m4/dup3.m4
@@ -1,4 +1,4 @@
-# dup3.m4 serial 4
+# dup3.m4 serial 5
dnl Copyright (C) 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,
@@ -11,7 +11,7 @@ AC_DEFUN([gl_FUNC_DUP3],
dnl Persuade glibc <unistd.h> to declare dup3().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([dup3])
+ AC_CHECK_FUNCS_ONCE([dup3 setdtablesize])
if test $ac_cv_func_dup3 != yes; then
HAVE_DUP3=0
fi