]> Savannah Git Hosting - gnulib.git/commitdiff
glob: Avoid warning on mingw.
authorBruno Haible <bruno@clisp.org>
Tue, 17 Dec 2019 08:51:22 +0000 (09:51 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 17 Dec 2019 08:54:06 +0000 (09:54 +0100)
Reported by Christian Biesinger <cbiesinger@google.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00122.html>.

* lib/glob.c (__stat64): Undefine first.

ChangeLog
lib/glob.c

index 41d8be0eddf02e324362efcb0f2c1eb00ba95de2..5e6677fa0d59c93b2dd5f27108a3ebb3944b519c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-12-17  Bruno Haible  <bruno@clisp.org>
+
+       glob: Avoid warning on mingw.
+       Reported by Christian Biesinger <cbiesinger@google.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00122.html>.
+       * lib/glob.c (__stat64): Undefine first.
+
 2019-12-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        xalloc: tune xzalloc for fresh allocations
index 9ecc5150a9c684e2c09bb3fe4b48363261df5edf..fae6e6175a25aa896a7ab8d876c56b5a3e845b39 100644 (file)
 # define __glob                 glob
 # define __getlogin_r(buf, len) getlogin_r (buf, len)
 # define __lstat64(fname, buf)  lstat (fname, buf)
+# ifdef __MINGW32__
+   /* Avoid GCC warning.  mingw has an unused __stat64 macro.  */
+#  undef __stat64
+# endif
 # define __stat64(fname, buf)   stat (fname, buf)
 # define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag)
 # define struct_stat64          struct stat