diff options
| author | Claudio Bley | 2014-01-11 16:48:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2014-01-11 16:48:51 +0200 |
| commit | f0b5cd897f387dfc3d72857d57734407178840b4 (patch) | |
| tree | f8c69c8afceb360d22f36d1fdc33889a1f68859f | |
| parent | 5d1a2888576990e60c95cdd15f21a1fbb6343fdd (diff) | |
| download | emacs-f0b5cd897f387dfc3d72857d57734407178840b4.tar.gz emacs-f0b5cd897f387dfc3d72857d57734407178840b4.zip | |
Fix MS-Windows build with MinGW runtime 4.x.
nt/inc/sys/stat.h (_WSTAT_DEFINED): Define, to avoid compilation
failures when wchar.h is included.
| -rw-r--r-- | nt/ChangeLog | 5 | ||||
| -rw-r--r-- | nt/inc/sys/stat.h | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 551b973b016..5605fafb5e1 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-01-11 Claudio Bley <claudio.bley@googlemail.com> | ||
| 2 | |||
| 3 | * inc/sys/stat.h (_WSTAT_DEFINED): Define, to avoid compilation | ||
| 4 | failures when wchar.h is included. | ||
| 5 | |||
| 1 | 2014-01-11 Fabrice Popineau <fabrice.popineau@supelec.fr> | 6 | 2014-01-11 Fabrice Popineau <fabrice.popineau@supelec.fr> |
| 2 | 7 | ||
| 3 | * inc/ms-w32.h (pthread_sigmask): Undefine if defined, for MinGW64. | 8 | * inc/ms-w32.h (pthread_sigmask): Undefine if defined, for MinGW64. |
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h index d9a01ee112b..7dfe78a27c3 100644 --- a/nt/inc/sys/stat.h +++ b/nt/inc/sys/stat.h | |||
| @@ -141,6 +141,13 @@ extern int w32_stat_get_owner_group; | |||
| 141 | 141 | ||
| 142 | /* Prevent redefinition by other headers, e.g. wchar.h. */ | 142 | /* Prevent redefinition by other headers, e.g. wchar.h. */ |
| 143 | #define _STAT_DEFINED | 143 | #define _STAT_DEFINED |
| 144 | /* This prevents definition in MinGW's wchar.h of inline functions | ||
| 145 | that use struct _stat64i32 etc., which we don't define and don't | ||
| 146 | support in our implementation of 'stat' and 'fstat'. If we don't | ||
| 147 | prevent definition of those inline functions, any program (e.g., | ||
| 148 | test programs run by configure) that includes both wchar.h and | ||
| 149 | sys/stat.h will fail to compile. */ | ||
| 150 | #define _WSTAT_DEFINED | ||
| 144 | 151 | ||
| 145 | int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); | 152 | int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); |
| 146 | int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); | 153 | int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); |