]> Savannah Git Hosting - gnulib.git/commitdiff
findprog-in: Fix comment.
authorBruno Haible <bruno@clisp.org>
Sat, 28 Sep 2019 11:45:22 +0000 (13:45 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 28 Sep 2019 11:45:47 +0000 (13:45 +0200)
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.

ChangeLog
lib/findprog.h
lib/stat.c
lib/utime.c

index 17fbaf4e3b48092b18a8fbcd09652b364a2492e7..3b48b42d33054c4d6df5ab02e04a9a15f073316f 100644 (file)
--- 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
index 804f02a03c9116fd4d5b51f7498936d7d29b70d4..263c53cbd9084a6e288be3cfde26a3f0c08d053c 100644 (file)
@@ -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.
index 92285008c97b66fbfd5c48302ef304eccf5020b7..e3248a8e0a7964ae0b73556667b22536a2cb4a1c 100644 (file)
@@ -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;
 
index a0466f7a79c7d6e2e8cabded786d5ec12284bf58..a5a362befca8ebaef4635bfca74e656e6b9b71f7 100644 (file)
@@ -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;