Skip to content

Commit 71befb4

Browse files
committed
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".
1 parent dd1890b commit 71befb4

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2017-11-12 Bruno Haible <[email protected]>
2+
3+
faccessat: Make the last change more robust.
4+
* m4/faccessat.m4 (gl_FUNC_FACCESSAT): Require
5+
gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Treat "guessing yes" like "yes".
6+
17
2017-11-11 Paul Eggert <[email protected]>
28

39
faccessat: port to macOS (Bug#29231)

m4/faccessat.m4

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# serial 7
1+
# serial 8
22
# See if we need to provide faccessat replacement.
33

44
dnl Copyright (C) 2009-2017 Free Software Foundation, Inc.
@@ -11,15 +11,19 @@ dnl with or without modifications, as long as this notice is preserved.
1111
AC_DEFUN([gl_FUNC_FACCESSAT],
1212
[
1313
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
14+
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
1415
1516
dnl Persuade glibc <unistd.h> to declare faccessat().
1617
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
1718
1819
AC_CHECK_FUNCS_ONCE([faccessat])
1920
if test $ac_cv_func_faccessat = no; then
2021
HAVE_FACCESSAT=0
21-
elif test "$gl_cv_func_lstat_dereferences_slashed_symlink" != yes; then
22-
REPLACE_FACCESSAT=1
22+
else
23+
case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
24+
*yes) ;;
25+
*) REPLACE_FACCESSAT=1 ;;
26+
esac
2327
fi
2428
])
2529

0 commit comments

Comments
 (0)