Mercurial > hg > octave-lyh > gnulib-hg
changeset 11967:399ddfe4310e
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.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Sun, 06 Sep 2009 20:53:59 -0600 |
parents | 715fd167345f |
children | 98e4db1661cc |
files | ChangeLog lib/unistd.in.h m4/faccessat.m4 m4/symlinkat.m4 m4/unistd_h.m4 modules/symlinkat modules/unistd |
diffstat | 7 files changed, 26 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +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.
--- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -193,15 +193,19 @@ # 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 - " \
--- a/m4/faccessat.m4 +++ b/m4/faccessat.m4 @@ -1,4 +1,4 @@ -# serial 2 +# serial 3 # See if we need to provide faccessat replacement. dnl Copyright (C) 2009 Free Software Foundation, Inc. @@ -12,6 +12,7 @@ [ 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])
--- a/m4/symlinkat.m4 +++ b/m4/symlinkat.m4 @@ -1,4 +1,4 @@ -# serial 1 +# serial 2 # See if we need to provide symlinkat/readlinkat replacement. dnl Copyright (C) 2009 Free Software Foundation, Inc. @@ -11,6 +11,7 @@ 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
--- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# 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, @@ -55,6 +55,7 @@ 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])
--- a/modules/symlinkat +++ b/modules/symlinkat @@ -15,6 +15,7 @@ configure.ac: gl_FUNC_SYMLINKAT gl_UNISTD_MODULE_INDICATOR([symlinkat]) +gl_UNISTD_MODULE_INDICATOR([readlinkat]) Makefile.am:
--- a/modules/unistd +++ b/modules/unistd @@ -48,6 +48,7 @@ -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' \