1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Update Gnulib.

All changes in this commit are autogenerated by running
admin/merge-gnulib.
This commit is contained in:
Paul Eggert 2020-12-25 02:33:29 -08:00
parent 5880c7caab
commit 42d58264db
13 changed files with 368 additions and 120 deletions

View file

@ -107,7 +107,10 @@ euidaccess (const char *file, int mode)
safe. */
if (mode == F_OK)
return stat (file, &stats);
{
int result = stat (file, &stats);
return result != 0 && errno == EOVERFLOW ? 0 : result;
}
else
{
int result;
@ -142,8 +145,8 @@ euidaccess (const char *file, int mode)
/* If we are not set-uid or set-gid, access does the same. */
return access (file, mode);
if (stat (file, &stats) != 0)
return -1;
if (stat (file, &stats) == -1)
return mode == F_OK && errno == EOVERFLOW ? 0 : -1;
/* The super-user can read and write any file, and execute any file
that anyone can execute. */