From: Bruno Haible Date: Wed, 20 Jun 2012 00:01:14 +0000 (+0200) Subject: stat, fstat: Avoid warnings on mingw64. X-Git-Tag: v0.1~611 X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=4f3bf3d1842d49f1ee1d5164fcc16e01738c6a29 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 . --- diff --git a/ChangeLog b/ChangeLog index 999a3579d..073a9c879 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2012-06-19 Bruno Haible + 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 . + +2012-06-19 Bruno Haible + stdioext: Add support for musl libc. * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether __fbufsize exists. diff --git a/lib/fstat.c b/lib/fstat.c index ac2b1effe..6d5f5c2b6 100644 --- a/lib/fstat.c +++ b/lib/fstat.c @@ -24,7 +24,9 @@ #include #include #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 diff --git a/lib/stat.c b/lib/stat.c index 1fc633eee..759954089 100644 --- a/lib/stat.c +++ b/lib/stat.c @@ -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