From: Eli Zaretskii Date: Sat, 4 Feb 2012 13:24:07 +0000 (+0200) Subject: Avoid MS-Windows compilation errors when struct stat is redefined. X-Git-Tag: emacs-pretest-24.0.94~330 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e0aeebda1f9d0c7011ef09be2f5bf5b08caa5c2b;p=emacs.git Avoid MS-Windows compilation errors when struct stat is redefined. nt/inc/sys/stat.h (_STAT_DEFINED): Define, to prevent redefinitions by other headers. --- diff --git a/nt/ChangeLog b/nt/ChangeLog index 675e85c7945..81bf6a1e105 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2012-02-04 Eli Zaretskii + + * inc/sys/stat.h (_STAT_DEFINED): Define, to prevent redefinitions + by other headers. + 2011-11-27 Fabrice Popineau (tiny change) * inc/stdint.h (uint32_t, uint64_t) [_WIN64]: New typedefs. diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h index d09925db5ec..57fabff4b0c 100644 --- a/nt/inc/sys/stat.h +++ b/nt/inc/sys/stat.h @@ -97,6 +97,9 @@ struct stat { char st_gname[260]; }; +/* Prevent redefinition by other headers, e.g. wchar.h. */ +#define _STAT_DEFINED + _CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); _CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); _CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);