X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fdup2.m4;h=dc3070c0d9ac0d892b2bc71cad45b189ba400c5a;hb=6b24f60dad0f97704ae07d9688de7f31c1923bf7;hp=fc86e8085babcbd500bafb28599d77b80952a68e;hpb=6d3de8267949cc5cf4f5ff98efcd132d93a9c861;p=gnulib.git diff --git a/m4/dup2.m4 b/m4/dup2.m4 index fc86e8085..dc3070c0d 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 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, dnl with or without modifications, as long as this notice is preserved. @@ -39,6 +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 some cygwin core dumps. */ + if (dup2 (2, -1) != -1 || errno != EBADF) + result |= 32; + dup2 (2, 255); + dup2 (2, 256); return result; ]) ], @@ -62,6 +67,7 @@ AC_DEFUN([gl_FUNC_DUP2], *yes) ;; *) REPLACE_DUP2=1 + AC_CHECK_FUNCS([setdtablesize]) ;; esac fi