]> Savannah Git Hosting - gnulib.git/commitdiff
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 999a3579de2b3171895d39f8655125a1ca92f487..073a9c87968f37b597e71cd646493ccecdb9f176 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
index ac2b1effe31e9c70e89621dc28301f76eddc0807..6d5f5c2b6ffc02a4e91a237ae6694802572752b0 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 1fc633eeef035cf6af3c4e0994a1e5f9dc01ed6e..75995408906a72167b658a6885171a2bba8492c1 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