summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-09-28 13:45:22 +0200
committerBruno Haible <bruno@clisp.org>2019-09-28 13:45:47 +0200
commit2838d7e4a3476f03b4a2fd7a5f37e738c6c2d361 (patch)
tree276bed1c6c5afd993febb0d3a4c29473aa2fd958
parentab02af9d47248a1d8b4ade4e8ab2c927d0543ea1 (diff)
downloadgnulib-2838d7e4a3476f03b4a2fd7a5f37e738c6c2d361.tar.gz
gnulib-2838d7e4a3476f03b4a2fd7a5f37e738c6c2d361.tar.bz2
findprog-in: Fix comment.
Reported by Eli Zaretskii <eliz@gnu.org>. * 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.
-rw-r--r--ChangeLog9
-rw-r--r--lib/findprog.h5
-rw-r--r--lib/stat.c4
-rw-r--r--lib/utime.c2
4 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 17fbaf4e3b..3b48b42d33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2019-09-15 Bruno Haible <bruno@clisp.org>
+
+ findprog-in: Fix comment.
+ Reported by Eli Zaretskii <eliz@gnu.org>.
+ * 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 <eggert@cs.ucla.edu>
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;

Return to:

Send suggestions and report system problems to the System administrator.