# HG changeset patch # User Bruno Haible # Date 1340150474 -7200 # Node ID d7028e1986c159544b44faf54f91e2a3a8f2d187 # Parent 3d02d25fa13d45e53ed7678da34eb81bb9191f7f 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 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +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. diff --git a/lib/fstat.c b/lib/fstat.c --- 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 --- 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