summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-11-12 13:16:15 +0100
committerBruno Haible <bruno@clisp.org>2017-11-12 13:16:15 +0100
commit71befb4f6c4023b397fabca604ad339eed4791de (patch)
tree5ab0878cd54183e658227d5828e7969ea92216a3 /m4
parentdd1890b79725d4a044039b476e6ad4592d2c9399 (diff)
downloadgnulib-71befb4f6c4023b397fabca604ad339eed4791de.tar.gz
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".
Diffstat (limited to 'm4')
-rw-r--r--m4/faccessat.m410
1 files changed, 7 insertions, 3 deletions
diff --git a/m4/faccessat.m4 b/m4/faccessat.m4
index f4cb49d166..c64545abd4 100644
--- a/m4/faccessat.m4
+++ b/m4/faccessat.m4
@@ -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
])