+2015-02-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ dup2, fcntl: cross-compiler better for Android
+ Problem reported by Kevin Cernekee in:
+ http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00109.html
+ * m4/dup2.m4 (gl_FUNC_DUP2): Don't guess no when cross-compiling
+ for a Linux kernel. That kernel bug was fixed on 2009-05-11, and
+ there's little need to cross-compile for older kernels nowadays.
+ * m4/fcntl.m4 (gl_FUNC_FCNTL): When cross-compiling, guess no only
+ for systems where the bug is known to occur (AIX, Cygwin, Haiku).
+
2015-02-18 Pádraig Brady <P@draigBrady.com>
getopt: don't crash on memory exhaustion
-#serial 21
+#serial 22
dnl Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
gl_cv_func_dup2_works="guessing no" ;;
cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
gl_cv_func_dup2_works="guessing no" ;;
- linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
- # closed fd may yield -EBADF instead of -1 / errno=EBADF.
- gl_cv_func_dup2_works="guessing no" ;;
aix* | freebsd*)
# on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
# not EBADF.
-# fcntl.m4 serial 6
+# fcntl.m4 serial 7
dnl Copyright (C) 2009-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
return result;]])],
[gl_cv_func_fcntl_f_dupfd_works=yes],
[gl_cv_func_fcntl_f_dupfd_works=no],
- [# Guess that it works on glibc systems
- case $host_os in #((
- *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
- *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+ [case $host_os in
+ aix* | cygwin* | haiku*)
+ gl_cv_func_dup2_works="guessing no" ;;
+ *) gl_cv_func_dup2_works="guessing yes" ;;
esac])])
case $gl_cv_func_fcntl_f_dupfd_works in
*yes) ;;