* m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Ensure dependency order.
* m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
* modules/unistd (Makefile.am): Substitute GNULIB_READLINKAT.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Offer GNULIB_READLINKAT.
* modules/symlinkat (configure.ac): Set GNULIB_READLINKAT.
* lib/unistd.in.h (readlinkat): Declare if GNULIB_READLINKAT is
set.
Signed-off-by: Eric Blake <ebb9@byu.net>
+2009-09-06 Eric Blake <ebb9@byu.net>
+
+ faccessat, symlinkat: continue cleanup of previous patch
+ * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Ensure dependency order.
+ * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
+ * modules/unistd (Makefile.am): Substitute GNULIB_READLINKAT.
+ * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Offer GNULIB_READLINKAT.
+ * modules/symlinkat (configure.ac): Set GNULIB_READLINKAT.
+ * lib/unistd.in.h (readlinkat): Declare if GNULIB_READLINKAT is
+ set.
+
2009-09-06 Bruno Haible <bruno@clisp.org>
* lib/sys_stat.in.h (fchmodat): Declare if GNULIB_FCHMODAT is set.
# if !@HAVE_SYMLINKAT@
int symlinkat (char const *contents, int fd, char const *file);
# endif
-# if !@HAVE_READLINKAT@
-ssize_t readlinkat (int fd, char const *file, char *buf, size_t len);
-# endif
#elif defined GNULIB_POSIXCHECK
# undef symlinkat
# define symlinkat(c,d,n) \
(GL_LINK_WARNING ("symlinkat is not portable - " \
"use gnulib module symlinkat for portability"), \
symlinkat (c, d, n))
+#endif
+
+#if @GNULIB_READLINKAT@
+# if !@HAVE_READLINKAT@
+ssize_t readlinkat (int fd, char const *file, char *buf, size_t len);
+# endif
+#elif defined GNULIB_POSIXCHECK
# undef readlinkat
# define readlinkat(d,n,b,l) \
(GL_LINK_WARNING ("faccessat is not portable - " \
-# serial 2
+# serial 3
# See if we need to provide faccessat replacement.
dnl Copyright (C) 2009 Free Software Foundation, Inc.
[
AC_REQUIRE([gl_FUNC_OPENAT])
AC_REQUIRE([gl_FUNC_EUIDACCESS])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS_ONCE([access])
AC_CHECK_FUNCS_ONCE([faccessat])
-# serial 1
+# serial 2
# See if we need to provide symlinkat/readlinkat replacement.
dnl Copyright (C) 2009 Free Software Foundation, Inc.
AC_DEFUN([gl_FUNC_SYMLINKAT],
[
AC_REQUIRE([gl_FUNC_OPENAT])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS_ONCE([symlink symlinkat readlinkat])
if test $ac_cv_func_symlinkat = no; then
-# unistd_h.m4 serial 23
+# unistd_h.m4 serial 24
dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
+ GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT])
configure.ac:
gl_FUNC_SYMLINKAT
gl_UNISTD_MODULE_INDICATOR([symlinkat])
+gl_UNISTD_MODULE_INDICATOR([readlinkat])
Makefile.am:
-e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
-e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
-e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
-e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
-e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
-e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \