diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-01-01 01:51:18 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-01-01 01:52:03 -0800 |
commit | 1b59478f4cf442f5201500b0a9c66f4332fce640 (patch) | |
tree | 02787d99a0476a28836390ee9e2ff332445381a1 /lib/faccessat.c | |
parent | 50f3949119cd5bb2f058b90d14b2940a3a8a7a0e (diff) | |
download | emacs-1b59478f4cf442f5201500b0a9c66f4332fce640.tar.gz |
Update from Gnulib by running admin/merge-gnulib.
Diffstat (limited to 'lib/faccessat.c')
-rw-r--r-- | lib/faccessat.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/faccessat.c b/lib/faccessat.c index 93e99b48f0c..3a776466cf2 100644 --- a/lib/faccessat.c +++ b/lib/faccessat.c @@ -32,13 +32,6 @@ #include <sys/stat.h> #undef _GL_INCLUDING_UNISTD_H -#ifndef FACCESSAT_NEVER_EOVERFLOWS -# define FACCESSAT_NEVER_EOVERFLOWS 0 -#endif -#ifndef LSTAT_FOLLOWS_SLASHED_SYMLINK -# define LSTAT_FOLLOWS_SLASHED_SYMLINK 0 -#endif - #if HAVE_FACCESSAT static int orig_faccessat (int fd, char const *name, int mode, int flag) @@ -66,12 +59,7 @@ rpl_faccessat (int fd, char const *file, int mode, int flag) { int result = orig_faccessat (fd, file, mode, flag); - if (result != 0) - { - if (!FACCESSAT_NEVER_EOVERFLOWS && mode == F_OK && errno == EOVERFLOW) - return 0; - } - else if (!LSTAT_FOLLOWS_SLASHED_SYMLINK && file[strlen (file) - 1] == '/') + if (result == 0 && file[strlen (file) - 1] == '/') { struct stat st; result = fstatat (fd, file, &st, 0); |