diff options
author | Eli Zaretskii <[email protected]> | 2013-03-26 15:45:01 +0200 |
---|---|---|
committer | Eli Zaretskii <[email protected]> | 2013-03-26 15:45:01 +0200 |
commit | a18d7de6144f9b0ce1202c6ac9c065cbd8e78168 (patch) | |
tree | 7c19231e5557b44bbafed3cf74c7d3476ace1fd9 /nt | |
parent | f46ba47d8b340125b17b2f13229079419f61a85e (diff) |
Fix more MinGW64 incompatibilities.
Reported by ׃scar Fuentes in
http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00733.html
nt/inc/ms-w32.h (_WIN32_WINNT) [!_W64]: Don't define for MinGW64.
nt/inc/sys/stat.h (chmod): Remove _CRTIMP from prototype.
src/w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
Define only for _WIN32_WINNT less than 0x0500.
Diffstat (limited to 'nt')
-rw-r--r-- | nt/ChangeLog | 4 | ||||
-rw-r--r-- | nt/inc/ms-w32.h | 8 | ||||
-rw-r--r-- | nt/inc/sys/stat.h | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index f4fa0a7ee5..10f145a0dd 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -2,11 +2,15 @@ Fix more incompatibilities between MinGW.org and MinGW64 headers reported by Óscar Fuentes in + http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00733.html http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00699.html and in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00707.html. * inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS) [_W64]: Define to 1. For MinGW64, include sys/types.h and time.h. + (_WIN32_WINNT) [!_W64]: Don't define for MinGW64. + + * inc/sys/stat.h (chmod): Remove _CRTIMP from prototype. * inc/sys/time.h (struct timeval) [!_W64]: Guard definition with _W64. diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index ccab3695c6..f721676f73 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -129,9 +129,11 @@ extern char *getenv (); /* Prevent accidental use of features unavailable in older Windows versions we still support. MinGW64 defines this to a higher value - in its system headers, so define our override before including any - system headers. */ -#define _WIN32_WINNT 0x0400 + in its system headers, and is not really compatible with values + lower than 0x0500, so leave it alone. */ +#ifndef _W64 +# define _WIN32_WINNT 0x0400 +#endif /* Make a leaner executable. */ #define WIN32_LEAN_AND_MEAN 1 diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h index 31129bbf4f..f6785c5647 100644 --- a/nt/inc/sys/stat.h +++ b/nt/inc/sys/stat.h @@ -111,6 +111,6 @@ int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); int __cdecl __MINGW_NOTHROW lstat (const char*, struct stat*); int __cdecl __MINGW_NOTHROW fstatat (int, char const *, struct stat *, int); -_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); +int __cdecl __MINGW_NOTHROW chmod (const char*, int); #endif /* INC_SYS_STAT_H_ */ |