More MinGW64 fixes.
authorEli Zaretskii <eliz@gnu.org>
Tue, 26 Mar 2013 14:04:07 +0000 (16:04 +0200)
committerEli Zaretskii <eliz@gnu.org>
Tue, 26 Mar 2013 14:04:07 +0000 (16:04 +0200)
 src/w32.c Move inclusion of time.h before sys/time.h, so that MinGW64 could
 see its own definitions of 'struct timeval' and 'struct timezone'.

src/ChangeLog
src/w32.c

index a676dd8..ce0455a 100644 (file)
@@ -4,6 +4,8 @@
        Define only for _WIN32_WINNT less than 0x0500.
        (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
        MinGW64.
+       Move inclusion of time.h before sys/time.h, so that MinGW64 could
+       see its own definitions of 'struct timeval' and 'struct timezone'.
 
        Fix incompatibilities between MinGW.org and MinGW64 headers.
        * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
index 861e578..f3c98bf 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -29,10 +29,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <ctype.h>
 #include <signal.h>
 #include <sys/file.h>
+#include <time.h>      /* must be before nt/inc/sys/time.h, for MinGW64 */
 #include <sys/time.h>
 #include <sys/utime.h>
 #include <math.h>
-#include <time.h>
 
 /* must include CRT headers *before* config.h */