aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2012-02-04 15:24:07 +0200
committerEli Zaretskii2012-02-04 15:24:07 +0200
commite0aeebda1f9d0c7011ef09be2f5bf5b08caa5c2b (patch)
tree7d4a05abba9eda7b8f90eb52c4391cee31bed5d0
parent3b95a6f950fac76439e91f07534f99448be985d6 (diff)
downloademacs-e0aeebda1f9d0c7011ef09be2f5bf5b08caa5c2b.tar.gz
emacs-e0aeebda1f9d0c7011ef09be2f5bf5b08caa5c2b.zip
Avoid MS-Windows compilation errors when struct stat is redefined.
nt/inc/sys/stat.h (_STAT_DEFINED): Define, to prevent redefinitions by other headers.
-rw-r--r--nt/ChangeLog5
-rw-r--r--nt/inc/sys/stat.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 675e85c7945..81bf6a1e105 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,8 @@
12012-02-04 Eli Zaretskii <eliz@gnu.org>
2
3 * inc/sys/stat.h (_STAT_DEFINED): Define, to prevent redefinitions
4 by other headers.
5
12011-11-27 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change) 62011-11-27 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
2 7
3 * inc/stdint.h (uint32_t, uint64_t) [_WIN64]: New typedefs. 8 * 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 {
97 char st_gname[260]; 97 char st_gname[260];
98}; 98};
99 99
100/* Prevent redefinition by other headers, e.g. wchar.h. */
101#define _STAT_DEFINED
102
100_CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); 103_CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*);
101_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); 104_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
102_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); 105_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);