]> Savannah Git Hosting - gnulib.git/commit
faccessat: work around F_OK EOVERFLOW bug
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Dec 2020 19:38:48 +0000 (11:38 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Dec 2020 20:06:48 +0000 (12:06 -0800)
commit6c98a29696b591c9a357183fac657f5547b6118a
tree2ea11b739489d0d9a8968c927867fb0648006bad
parent340dcbd879d050aebcd7081ec5f2208f0e2418b6
faccessat: work around F_OK EOVERFLOW bug

Also, tune when LSTAT_FOLLOWS_SLASHED_SYMLINK.
* doc/posix-functions/faccessat.texi: Mention the problem.
* lib/faccessat.c (FACCESSAT_NEVER_EOVERFLOWS)
(LSTAT_FOLLOWS_SLASHED_SYMLINK): Default to 0.
(rpl_faccessat): If !FACCESSAT_NEVER_EOVERFLOWS, check
for F_OK and EOVERFLOW, which means we can return 0.
If LSTAT_FOLLOWS_SLASHED_SYMLINK, don't worry about
file names ending in slashes, as faccessat should already
do the right thing for them.
* m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW): New macro.
(gl_FUNC_FACCESSAT): Use it.
ChangeLog
doc/posix-functions/faccessat.texi
lib/faccessat.c
m4/faccessat.m4