aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Fuentes2014-11-17 23:06:13 +0100
committerOscar Fuentes2014-11-17 23:10:00 +0100
commit81e0cca7bbc99dbfda898a8aaab740ae121cf045 (patch)
tree7ee980226205173954792911af2d0d51686d5926
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.
-rw-r--r--admin/CPP-DEFINES3
-rw-r--r--admin/ChangeLog4
-rw-r--r--nt/ChangeLog10
-rw-r--r--nt/addpm.c5
-rw-r--r--nt/addsection.c2
-rw-r--r--nt/inc/ms-w32.h16
-rw-r--r--nt/preprep.c2
-rw-r--r--src/ChangeLog6
-rw-r--r--src/w32.c6
-rw-r--r--src/w32term.c4
10 files changed, 44 insertions, 14 deletions
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES
index 27d87dcaa2a..e475b422500 100644
--- a/admin/CPP-DEFINES
+++ b/admin/CPP-DEFINES
@@ -19,8 +19,9 @@ __MSDOS__ Ditto.
19__DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c. 19__DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c.
20DOS_NT Compiling for either the MS-DOS or native MS-Windows port. 20DOS_NT Compiling for either the MS-DOS or native MS-Windows port.
21WINDOWSNT Compiling the native MS-Windows (W32) port. 21WINDOWSNT Compiling the native MS-Windows (W32) port.
22__MINGW32__ Compiling the W32 port with the MinGW port of GCC. 22__MINGW32__ Compiling the W32 port with the MinGW or MinGW-w64 ports of GCC.
23_MSC_VER Compiling the W32 port with the Microsoft C compiler. 23_MSC_VER Compiling the W32 port with the Microsoft C compiler.
24MINGW_W64 Compiling the W32 port with the MinGW-w64 port of GCC.
24DARWIN_OS Compiling on Mac OS X or pure Darwin (and using s/darwin.h). 25DARWIN_OS Compiling on Mac OS X or pure Darwin (and using s/darwin.h).
25SOLARIS2 26SOLARIS2
26USG 27USG
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 72ce74bd629..0ec6d920ad0 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,7 @@
12014-11-17 Oscar Fuentes <ofv@wanadoo.es>
2
3 * admin/CPP-DEFINES: Mention MINGW_W64.
4
12014-11-15 Glenn Morris <rgm@gnu.org> 52014-11-15 Glenn Morris <rgm@gnu.org>
2 6
3 * update_autogen: Auto-detect VCS in use. 7 * update_autogen: Auto-detect VCS in use.
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 5ffab4d0151..cb2f33f947b 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,13 @@
12014-11-17 Oscar Fuentes <ofv@wanadoo.es>
2
3 * inc/ms-w32.h: Define MINGW_W64.
4
5 * nt/addpm.c: Use it.
6
7 * nt/addsection.c: Use it.
8
9 * nt/preprep.c: Use it.
10
12014-10-31 Eric S. Raymond <esr@thyrsus.com> 112014-10-31 Eric S. Raymond <esr@thyrsus.com>
2 12
3 * Neutralize language specific to a repository type. 13 * Neutralize language specific to a repository type.
diff --git a/nt/addpm.c b/nt/addpm.c
index 18057b58b49..f7cfba39d08 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -38,9 +38,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
38#include <stdio.h> 38#include <stdio.h>
39#include <malloc.h> 39#include <malloc.h>
40 40
41/* MinGW64 defines _W64 and barfs if _WIN32_IE is defined to anything 41/* MinGW64 barfs if _WIN32_IE is defined to anything below 0x500. */
42 below 0x500. */ 42#ifndef MINGW_W64
43#ifndef _W64
44#define _WIN32_IE 0x400 43#define _WIN32_IE 0x400
45#endif 44#endif
46/* Request C Object macros for COM interfaces. */ 45/* Request C Object macros for COM interfaces. */
diff --git a/nt/addsection.c b/nt/addsection.c
index a897573480d..832066b68c0 100644
--- a/nt/addsection.c
+++ b/nt/addsection.c
@@ -25,7 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25#include <stdio.h> 25#include <stdio.h>
26#include <fcntl.h> 26#include <fcntl.h>
27#include <time.h> 27#include <time.h>
28#if defined(__GNUC__) && !defined(_W64) 28#if defined(__GNUC__) && !defined(MINGW_W64)
29#define _ANONYMOUS_UNION 29#define _ANONYMOUS_UNION
30#define _ANONYMOUS_STRUCT 30#define _ANONYMOUS_STRUCT
31#endif 31#endif
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
diff --git a/nt/preprep.c b/nt/preprep.c
index fda937df0e0..39a9b70e953 100644
--- a/nt/preprep.c
+++ b/nt/preprep.c
@@ -25,7 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25#include <stdio.h> 25#include <stdio.h>
26#include <fcntl.h> 26#include <fcntl.h>
27#include <time.h> 27#include <time.h>
28#if defined(__GNUC__) && !defined(_W64) 28#if defined(__GNUC__) && !defined(MINGW_W64)
29#define _ANONYMOUS_UNION 29#define _ANONYMOUS_UNION
30#define _ANONYMOUS_STRUCT 30#define _ANONYMOUS_STRUCT
31#endif 31#endif
diff --git a/src/ChangeLog b/src/ChangeLog
index f9f3a0f96b7..1f2a0c4c9b8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-11-17 Oscar Fuentes <ofv@wanadoo.es>
2
3 * src/w32.c: Use MINGW_W64 instead of _W64.
4
5 * src/w32term.c: Likewise.
6
12014-11-16 Stefan Monnier <monnier@iro.umontreal.ca> 72014-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003). 9 * frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003).
diff --git a/src/w32.c b/src/w32.c
index aba0b5a81f9..34f28d01af3 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -72,8 +72,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
72#include <pwd.h> 72#include <pwd.h>
73#include <grp.h> 73#include <grp.h>
74 74
75/* MinGW64 (_W64) defines these in its _mingw.h. */ 75/* MinGW64 defines these in its _mingw.h. */
76#if defined(__GNUC__) && !defined(_W64) 76#if defined(__GNUC__) && !defined(MINGW_W64)
77#define _ANONYMOUS_UNION 77#define _ANONYMOUS_UNION
78#define _ANONYMOUS_STRUCT 78#define _ANONYMOUS_STRUCT
79#endif 79#endif
@@ -149,7 +149,7 @@ typedef struct _PROCESS_MEMORY_COUNTERS_EX {
149#define SDDL_REVISION_1 1 149#define SDDL_REVISION_1 1
150#endif /* SDDL_REVISION_1 */ 150#endif /* SDDL_REVISION_1 */
151 151
152#if defined(_MSC_VER) || defined(_W64) 152#if defined(_MSC_VER) || defined(MINGW_W64)
153/* MSVC and MinGW64 don't provide the definition of 153/* MSVC and MinGW64 don't provide the definition of
154 REPARSE_DATA_BUFFER and the associated macros, except on ntifs.h, 154 REPARSE_DATA_BUFFER and the associated macros, except on ntifs.h,
155 which cannot be included because it triggers conflicts with other 155 which cannot be included because it triggers conflicts with other
diff --git a/src/w32term.c b/src/w32term.c
index 66cdbfaecb0..41ab645f31d 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -100,10 +100,10 @@ extern Cursor w32_load_cursor (LPCTSTR name);
100struct w32_display_info one_w32_display_info; 100struct w32_display_info one_w32_display_info;
101struct w32_display_info *x_display_list; 101struct w32_display_info *x_display_list;
102 102
103#if _WIN32_WINNT < 0x0500 && !defined(_W64) 103#if _WIN32_WINNT < 0x0500 && !defined(MINGW_W64)
104/* Pre Windows 2000, this was not available, but define it here so 104/* Pre Windows 2000, this was not available, but define it here so
105 that Emacs compiled on such a platform will run on newer versions. 105 that Emacs compiled on such a platform will run on newer versions.
106 MinGW64 (_W64) defines these unconditionally, so avoid redefining. */ 106 MinGW64 defines these unconditionally, so avoid redefining. */
107 107
108typedef struct tagWCRANGE 108typedef struct tagWCRANGE
109{ 109{