aboutsummaryrefslogtreecommitdiffstats
path: root/nt/inc
diff options
context:
space:
mode:
authorOscar Fuentes2014-11-17 23:06:13 +0100
committerOscar Fuentes2014-11-17 23:10:00 +0100
commit81e0cca7bbc99dbfda898a8aaab740ae121cf045 (patch)
tree7ee980226205173954792911af2d0d51686d5926 /nt/inc
parent67a22c6062fdaff39c27611d21cd5866661f8e15 (diff)
downloademacs-81e0cca7bbc99dbfda898a8aaab740ae121cf045.tar.gz
emacs-81e0cca7bbc99dbfda898a8aaab740ae121cf045.zip
Define MINGW_W64 and use it instead of _W64
... for detecting MinGW-w64. _W64 is not specific of MinGW-w64, it is defined for compatibility with MS VC++. * nt/inc/ms-w32.h: Define MINGW_W64. * admin/CPP-DEFINES: Mention MINGW_W64. * nt/addpm.c: Use it. * nt/addsection.c: Use it. * nt/preprep.c: Use it. * src/w32.c: Use MINGW_W64 instead of _W64 * src/w32term.c: Likewise.
Diffstat (limited to 'nt/inc')
-rw-r--r--nt/inc/ms-w32.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index 8f7c36ab1ee..1d45df743de 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -26,6 +26,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26 26
27#include <mingw_time.h> 27#include <mingw_time.h>
28 28
29/* MinGW-w64 gcc does not automotically define a macro for
30 differentiating it fom MinGW gcc. We need to test the presence of
31 __MINGW64_VERSION_MAJOR in _mingw.h: */
32#ifdef __MINGW32__
33# include <_mingw.h>
34# ifdef __MINGW64_VERSION_MAJOR
35# define MINGW_W64
36# endif
37#endif
38
29/* #undef const */ 39/* #undef const */
30 40
31/* Number of chars of output in the buffer of a stdio stream. */ 41/* Number of chars of output in the buffer of a stdio stream. */
@@ -139,7 +149,7 @@ extern char *getenv ();
139 versions we still support. MinGW64 defines this to a higher value 149 versions we still support. MinGW64 defines this to a higher value
140 in its system headers, and is not really compatible with values 150 in its system headers, and is not really compatible with values
141 lower than 0x0500, so leave it alone. */ 151 lower than 0x0500, so leave it alone. */
142#ifndef _W64 152#ifndef MINGW_W64
143# define _WIN32_WINNT 0x0400 153# define _WIN32_WINNT 0x0400
144#endif 154#endif
145 155
@@ -165,7 +175,7 @@ extern char *getenv ();
165 175
166#ifdef emacs 176#ifdef emacs
167 177
168#ifdef _W64 178#ifdef MINGW_W64
169/* MinGW64 specific stuff. */ 179/* MinGW64 specific stuff. */
170/* Make sure 'struct timespec' and 'struct timezone' are defined. */ 180/* Make sure 'struct timespec' and 'struct timezone' are defined. */
171#include <sys/types.h> 181#include <sys/types.h>
@@ -368,7 +378,7 @@ typedef int sigset_t;
368typedef int ssize_t; 378typedef int ssize_t;
369#endif 379#endif
370 380
371#ifdef _W64 /* MinGW64 */ 381#ifdef MINGW_W64
372#ifndef _POSIX 382#ifndef _POSIX
373typedef _sigset_t sigset_t; 383typedef _sigset_t sigset_t;
374#endif 384#endif