From: Bruno Haible Date: Mon, 25 Jul 2011 22:12:55 +0000 (+0200) Subject: dup2: Remove call-in from fchdir.m4. X-Git-Tag: v0.1~2057 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=01bf66e06a26009d0ff3b0173db77389165f2e99;p=gnulib.git dup2: Remove call-in from fchdir.m4. * m4/dup2.m4 (gl_FUNC_DUP2): Conditionally invoke gl_TEST_FCHDIR. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_DUP2. --- diff --git a/ChangeLog b/ChangeLog index 4eff46f3b..056717e29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-07-25 Bruno Haible + dup2: Remove call-in from fchdir.m4. + * m4/dup2.m4 (gl_FUNC_DUP2): Conditionally invoke gl_TEST_FCHDIR. + * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_DUP2. + fclose: Move AC_LIBOBJ invocation to module description. * m4/fclose.m4 (gl_REPLACE_FCLOSE): Remove macro. (gl_FUNC_FCLOSE): Instead of gl_REPLACE_FCLOSE, just set REPLACE_FCLOSE diff --git a/m4/dup2.m4 b/m4/dup2.m4 index 8d7f62c88..b4a22199e 100644 --- a/m4/dup2.m4 +++ b/m4/dup2.m4 @@ -1,4 +1,4 @@ -#serial 13 +#serial 14 dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -63,6 +63,14 @@ AC_DEFUN([gl_FUNC_DUP2], gl_REPLACE_DUP2 fi fi + dnl Replace dup2() for supporting the gnulib-defined fchdir() function, + dnl to keep fchdir's bookkeeping up-to-date. + m4_ifdef([gl_FUNC_FCHDIR], [ + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + gl_REPLACE_DUP2 + fi + ]) ]) AC_DEFUN([gl_REPLACE_DUP2], diff --git a/m4/fchdir.m4 b/m4/fchdir.m4 index 612c98f5d..26604e26d 100644 --- a/m4/fchdir.m4 +++ b/m4/fchdir.m4 @@ -27,7 +27,6 @@ AC_DEFUN([gl_FUNC_FCHDIR], REPLACE_OPENDIR=1 REPLACE_CLOSEDIR=1 REPLACE_DUP=1 - gl_REPLACE_DUP2 dnl dup3 is already unconditionally replaced gl_REPLACE_FCNTL AC_CACHE_CHECK([whether open can visit directories],