+2011-07-25 Bruno Haible <bruno@clisp.org>
+
+ fchdir: Start to remove gl_REPLACE_* idiom.
+ * m4/fchdir.m4 (gl_TEST_FCHDIR): New macro.
+ (gl_FUNC_FCHDIR): Invoke it.
+
2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
* lib/ftell.c (ftell): Comment out cast.
-# fchdir.m4 serial 16
+# fchdir.m4 serial 17
dnl Copyright (C) 2006-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,
HAVE_DECL_FCHDIR=0
fi
- AC_CHECK_FUNCS_ONCE([fchdir])
- if test $ac_cv_func_fchdir = no; then
- HAVE_FCHDIR=0
+ AC_REQUIRE([gl_TEST_FCHDIR])
+ if test $HAVE_FCHDIR = 0; then
AC_LIBOBJ([fchdir])
gl_PREREQ_FCHDIR
AC_DEFINE([REPLACE_FCHDIR], [1],
fi
])
+# Determine whether to use the overrides in lib/fchdir.c.
+AC_DEFUN([gl_TEST_FCHDIR],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([fchdir])
+ if test $ac_cv_func_fchdir = no; then
+ HAVE_FCHDIR=0
+ fi
+])
+
# Prerequisites of lib/fchdir.c.
AC_DEFUN([gl_PREREQ_FCHDIR], [:])