stat, fstat: Avoid warnings on mingw64.
authorBruno Haible <bruno@clisp.org>
Wed, 20 Jun 2012 00:01:14 +0000 (02:01 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 20 Jun 2012 00:01:14 +0000 (02:01 +0200)
* lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Undefine before
redefining.
* lib/fstat.c (stat, fstat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Likewise.
Reported by Daniel P. Berrange <berrange@redhat.com>.

ChangeLog
lib/fstat.c
lib/stat.c

index 999a357..073a9c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2012-06-19  Bruno Haible  <bruno@clisp.org>
 
+       stat, fstat: Avoid warnings on mingw64.
+       * lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Undefine before
+       redefining.
+       * lib/fstat.c (stat, fstat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Likewise.
+       Reported by Daniel P. Berrange <berrange@redhat.com>.
+
+2012-06-19  Bruno Haible  <bruno@clisp.org>
+
        stdioext: Add support for musl libc.
 
        * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether __fbufsize exists.
index ac2b1ef..6d5f5c2 100644 (file)
@@ -24,7 +24,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #if _GL_WINDOWS_64_BIT_ST_SIZE
+# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
 # define stat _stati64
+# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
 # define fstat _fstati64
 #endif
 #undef __need_system_sys_stat_h
index 1fc633e..7599540 100644 (file)
@@ -29,6 +29,7 @@
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 # if _GL_WINDOWS_64_BIT_ST_SIZE
+#  undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
 #  define stat _stati64
 #  define REPLACE_FUNC_STAT_DIR 1
 #  undef REPLACE_FUNC_STAT_FILE