Mercurial > gnulib
changeset 39153:1f525c927feb
faccessat: Make the last change more robust.
* m4/faccessat.m4 (gl_FUNC_FACCESSAT): Require
gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Treat "guessing yes" like "yes".
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 12 Nov 2017 13:16:15 +0100 |
parents | abd3b4b846c4 |
children | 55dc3d465b51 |
files | ChangeLog m4/faccessat.m4 |
diffstat | 2 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Nov 11 22:33:38 2017 -0800 +++ b/ChangeLog Sun Nov 12 13:16:15 2017 +0100 @@ -1,3 +1,9 @@ +2017-11-12 Bruno Haible <bruno@clisp.org> + + faccessat: Make the last change more robust. + * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Require + gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Treat "guessing yes" like "yes". + 2017-11-11 Paul Eggert <eggert@cs.ucla.edu> faccessat: port to macOS (Bug#29231)
--- a/m4/faccessat.m4 Sat Nov 11 22:33:38 2017 -0800 +++ b/m4/faccessat.m4 Sun Nov 12 13:16:15 2017 +0100 @@ -1,4 +1,4 @@ -# serial 7 +# serial 8 # See if we need to provide faccessat replacement. dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. @@ -11,6 +11,7 @@ AC_DEFUN([gl_FUNC_FACCESSAT], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) dnl Persuade glibc <unistd.h> to declare faccessat(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) @@ -18,8 +19,11 @@ AC_CHECK_FUNCS_ONCE([faccessat]) if test $ac_cv_func_faccessat = no; then HAVE_FACCESSAT=0 - elif test "$gl_cv_func_lstat_dereferences_slashed_symlink" != yes; then - REPLACE_FACCESSAT=1 + else + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *yes) ;; + *) REPLACE_FACCESSAT=1 ;; + esac fi ])