From: Bruno Haible Date: Sat, 28 Sep 2019 11:45:22 +0000 (+0200) Subject: findprog-in: Fix comment. X-Git-Tag: v1.0~4645 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2838d7e4a3476f03b4a2fd7a5f37e738c6c2d361;p=gnulib.git findprog-in: Fix comment. Reported by Eli Zaretskii . * lib/findprog.h (find_in_given_path): Extend description of EACCES condition. * lib/stat.c (rpl_stat): Fix typo in comment. * lib/utime.c (_gl_utimens_windows): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 17fbaf4e3b..3b48b42d33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2019-09-15 Bruno Haible + + findprog-in: Fix comment. + Reported by Eli Zaretskii . + * lib/findprog.h (find_in_given_path): Extend description of EACCES + condition. + * lib/stat.c (rpl_stat): Fix typo in comment. + * lib/utime.c (_gl_utimens_windows): Likewise. + 2019-09-23 Paul Eggert Update URLs and associated text diff --git a/lib/findprog.h b/lib/findprog.h index 804f02a03c..263c53cbd9 100644 --- a/lib/findprog.h +++ b/lib/findprog.h @@ -50,8 +50,9 @@ extern const char *find_in_path (const char *progname); - Otherwise, it sets errno and returns NULL. Specific errno values include: - ENOENT: means that the program's file was not found. - - EACCESS: means that the program's file was found but lacks the - execute permissions. + - EACCES: means that the program's file cannot be accessed (due to some + issue with one of the ancestor directories) or lacks the execute + permissions. If OPTIMIZE_FOR_EXEC is true, the function saves some work, under the assumption that the resulting pathname will not be accessed directly, only through execl/execv or execlp/execvp. diff --git a/lib/stat.c b/lib/stat.c index 92285008c9..e3248a8e0a 100644 --- a/lib/stat.c +++ b/lib/stat.c @@ -375,7 +375,7 @@ rpl_stat (char const *name, struct stat *buf) case ERROR_ACCESS_DENIED: /* rname is such as 'C:\System Volume Information\foo'. */ case ERROR_SHARING_VIOLATION: /* rname is such as 'C:\pagefile.sys' (second approach only). */ - /* XXX map to EACCESS or EPERM? */ + /* XXX map to EACCES or EPERM? */ errno = EACCES; break; @@ -398,7 +398,7 @@ rpl_stat (char const *name, struct stat *buf) errno = ENAMETOOLONG; break; - case ERROR_DELETE_PENDING: /* XXX map to EACCESS or EPERM? */ + case ERROR_DELETE_PENDING: /* XXX map to EACCES or EPERM? */ errno = EPERM; break; diff --git a/lib/utime.c b/lib/utime.c index a0466f7a79..a5a362befc 100644 --- a/lib/utime.c +++ b/lib/utime.c @@ -224,7 +224,7 @@ _gl_utimens_windows (const char *name, struct timespec ts[2]) errno = ENAMETOOLONG; break; - case ERROR_DELETE_PENDING: /* XXX map to EACCESS or EPERM? */ + case ERROR_DELETE_PENDING: /* XXX map to EACCES or EPERM? */ errno = EPERM; break;