]> Savannah Git Hosting - gnulib.git/commitdiff
canonicalize-lgpl: Fix conflict with z/OS <sys/stat.h>.
authorBruno Haible <bruno@clisp.org>
Sun, 8 Aug 2021 20:11:03 +0000 (22:11 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 8 Aug 2021 20:11:03 +0000 (22:11 +0200)
Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
<https://lists.gnu.org/archive/html/m4-discuss/2021-08/msg00000.html>
via Eric Blake.

* lib/canonicalize-lgpl.c (__stat): Remove macro.
(file_accessible): Use 'stat' instead.

ChangeLog
lib/canonicalize-lgpl.c

index a7c7fb9c11aa6f99a397fbb412a4e53be49dfdda..8482276384d3b2d807dd51c12ec79c17797386b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-08-08  Bruno Haible  <bruno@clisp.org>
+
+       canonicalize-lgpl: Fix conflict with z/OS <sys/stat.h>.
+       Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
+       <https://lists.gnu.org/archive/html/m4-discuss/2021-08/msg00000.html>
+       via Eric Blake.
+       * lib/canonicalize-lgpl.c (__stat): Remove macro.
+       (file_accessible): Use 'stat' instead.
+
 2021-08-08  Bruno Haible  <bruno@clisp.org>
 
        ptsname_r: Drop sync with glibc.
index c6fef174c4ff1060504b268ba5804cc607b0be60..92e96397206c969cfe321af457221f707b31213c 100644 (file)
@@ -74,7 +74,6 @@
 # define __pathconf pathconf
 # define __rawmemchr rawmemchr
 # define __readlink readlink
-# define __stat stat
 # if IN_RELOCWRAPPER
     /* When building the relocatable program wrapper, use the system's memmove
        function, not the gnulib override, otherwise we would get a link error.
@@ -105,7 +104,7 @@ file_accessible (char const *file)
   return __faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0;
 # else
   struct stat st;
-  return __stat (file, &st) == 0 || errno == EOVERFLOW;
+  return stat (file, &st) == 0 || errno == EOVERFLOW;
 # endif
 }