summaryrefslogtreecommitdiff
path: root/nt
diff options
context:
space:
mode:
authorTed Zlatanov <tzz@lifelogs.com>2014-11-26 21:31:11 -0500
committerTed Zlatanov <tzz@lifelogs.com>2014-11-26 21:31:11 -0500
commitba4502fe1465f7803beca3ae187e41f0b25bef10 (patch)
treede8bdc219eeeba72e1a8b271ac96234c3c5af447 /nt
parentb121ef10f500c0377c2ce665e8ccd8b97a6aedfd (diff)
parent81e0cca7bbc99dbfda898a8aaab740ae121cf045 (diff)
downloademacs-ba4502fe1465f7803beca3ae187e41f0b25bef10.tar.gz
Merge branch 'emacs-24'
Conflicts: nt/addsection.c nt/inc/ms-w32.h src/w32.c
Diffstat (limited to 'nt')
-rw-r--r--nt/ChangeLog10
-rw-r--r--nt/addpm.c5
-rw-r--r--nt/inc/ms-w32.h17
-rw-r--r--nt/preprep.c2
4 files changed, 26 insertions, 8 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 01dc0b1feed..ae292add9c6 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,13 @@
+2014-11-17 Oscar Fuentes <ofv@wanadoo.es>
+
+ * inc/ms-w32.h: Define MINGW_W64.
+
+ * nt/addpm.c: Use it.
+
+ * nt/addsection.c: Use it.
+
+ * nt/preprep.c: Use it.
+
2014-11-24 Glenn Morris <rgm@gnu.org>
* Makefile.in (../src/emacs.res): New target.
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/>. */
#include <stdio.h>
#include <malloc.h>
-/* MinGW64 defines _W64 and barfs if _WIN32_IE is defined to anything
- below 0x500. */
-#ifndef _W64
+/* MinGW64 barfs if _WIN32_IE is defined to anything below 0x500. */
+#ifndef MINGW_W64
#define _WIN32_IE 0x400
#endif
/* Request C Object macros for COM interfaces. */
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index edb143c68d4..e54ab87c7eb 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/>. */
#include <mingw_time.h>
+/* MinGW-w64 gcc does not automotically define a macro for
+ differentiating it fom MinGW gcc. We need to test the presence of
+ __MINGW64_VERSION_MAJOR in _mingw.h: */
+#ifdef __MINGW32__
+# include <_mingw.h>
+# ifdef __MINGW64_VERSION_MAJOR
+# define MINGW_W64
+# endif
+#endif
+
/* #undef const */
/* Number of chars of output in the buffer of a stdio stream. */
@@ -139,8 +149,7 @@ extern char *getenv ();
versions we still support. MinGW64 defines this to a higher value
in its system headers, and is not really compatible with values
lower than 0x0500, so leave it alone. */
-#ifndef _W64
-# undef _WIN32_WINNT
+#ifndef MINGW_W64
# define _WIN32_WINNT 0x0400
#endif
@@ -167,7 +176,7 @@ extern char *getenv ();
#ifdef emacs
-#ifdef _W64
+#ifdef MINGW_W64
/* MinGW64 specific stuff. */
/* Make sure 'struct timespec' and 'struct timezone' are defined. */
#include <sys/types.h>
@@ -370,7 +379,7 @@ typedef int sigset_t;
typedef int ssize_t;
#endif
-#ifdef _W64 /* MinGW64 */
+#ifdef MINGW_W64
#ifndef _POSIX
typedef _sigset_t sigset_t;
#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/>.
#include <stdio.h>
#include <fcntl.h>
#include <time.h>
-#if defined(__GNUC__) && !defined(_W64)
+#if defined(__GNUC__) && !defined(MINGW_W64)
#define _ANONYMOUS_UNION
#define _ANONYMOUS_STRUCT
#endif