/* System description file for Windows NT.
-Copyright (C) 1993-1995, 2001-2014 Free Software Foundation, Inc.
+Copyright (C) 1993-1995, 2001-2015 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#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. */
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
#ifdef emacs
-#ifdef _W64
+#ifdef MINGW_W64
/* MinGW64 specific stuff. */
/* Make sure 'struct timespec' and 'struct timezone' are defined. */
#include <sys/types.h>
typedef int ssize_t;
#endif
-#ifdef _W64 /* MinGW64 */
+#ifdef MINGW_W64
#ifndef _POSIX
typedef _sigset_t sigset_t;
#endif