]> Savannah Git Hosting - gnulib.git/commitdiff
faccessat: Make the last change more robust.
authorBruno Haible <bruno@clisp.org>
Sun, 12 Nov 2017 12:16:15 +0000 (13:16 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 12 Nov 2017 12:16:15 +0000 (13:16 +0100)
* m4/faccessat.m4 (gl_FUNC_FACCESSAT): Require
gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Treat "guessing yes" like "yes".

ChangeLog
m4/faccessat.m4

index 651a9eb0079417c33a9afa51459189b5c2905127..15ceb2dac5ebad2d30889bf6df96e0008972a8cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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)
index f4cb49d166cde90953afb8ca9384142a9d7952bf..c64545abd4674cf31acee497c1ee72492973de8b 100644 (file)
@@ -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 @@ dnl with or without modifications, as long as this notice is preserved.
 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_DEFUN([gl_FUNC_FACCESSAT],
   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
 ])