diff options
| author | Eli Zaretskii | 2016-10-06 18:08:31 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-10-06 18:08:31 +0300 |
| commit | 34b6df19a4dafe0227ab663c971079e68e17f393 (patch) | |
| tree | 0de552eb621d62e870215cab1b0c2db9530b649f /nt | |
| parent | 4ef9ea2b2ad0db53d674ce6c691b605d894ae558 (diff) | |
| download | emacs-34b6df19a4dafe0227ab663c971079e68e17f393.tar.gz emacs-34b6df19a4dafe0227ab663c971079e68e17f393.zip | |
Fix compilation with MinGW runtime 3.22.2 and w32api 3.18.2
* nt/inc/ms-w32.h (_WIN32_WINNT) [!MINGW_W64]: Undefine before
defining to avoid redefinition warnings.
* nt/inc/sys/stat.h (_SYS_STAT_H, _INC_STAT_H): Define, to avoid
inclusion of sys/stat.h from the system headers, which could then
lead to compilation errors due to redefinition of 'struct stat'
etc. This is needed because latest versions of MinGW runtime
include sys/stat.h from wchar.h.
* src/image.c (__MINGW_MAJOR_VERSION) [WINDOWSNT]: Temporarily
redefine to 4 to avoid conflict between 2 definitions of
MemoryBarrier. (Bug#24613)
Do not merge to master!
Diffstat (limited to 'nt')
| -rw-r--r-- | nt/inc/ms-w32.h | 1 | ||||
| -rw-r--r-- | nt/inc/sys/stat.h | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index d1534336c49..b4eb5622242 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h | |||
| @@ -146,6 +146,7 @@ extern char *getenv (); | |||
| 146 | in its system headers, and is not really compatible with values | 146 | in its system headers, and is not really compatible with values |
| 147 | lower than 0x0500, so leave it alone. */ | 147 | lower than 0x0500, so leave it alone. */ |
| 148 | #ifndef MINGW_W64 | 148 | #ifndef MINGW_W64 |
| 149 | # undef _WIN32_WINNT | ||
| 149 | # define _WIN32_WINNT 0x0400 | 150 | # define _WIN32_WINNT 0x0400 |
| 150 | #endif | 151 | #endif |
| 151 | 152 | ||
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h index 45bc2ea1e0c..ea14f075471 100644 --- a/nt/inc/sys/stat.h +++ b/nt/inc/sys/stat.h | |||
| @@ -30,6 +30,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | # define __MINGW_NOTHROW | 30 | # define __MINGW_NOTHROW |
| 31 | #endif | 31 | #endif |
| 32 | 32 | ||
| 33 | /* Prevent the MinGW stat.h header from being included, ever. */ | ||
| 34 | #ifndef _SYS_STAT_H | ||
| 35 | # define _SYS_STAT_H | ||
| 36 | #endif | ||
| 37 | #ifndef _INC_STAT_H | ||
| 38 | # define _INC_STAT_H | ||
| 39 | #endif | ||
| 40 | |||
| 33 | #include <sys/types.h> | 41 | #include <sys/types.h> |
| 34 | #include <time.h> | 42 | #include <time.h> |
| 35 | 43 | ||