From e2d8a6f0a229b4ebe26484b892ec4f14888f58b6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 3 Jun 2013 20:15:44 +0300 Subject: [PATCH] Attempt to resolve gettimeofday compilation errors with MinGW64. src/w32.c (gettimeofday): Make the signature identical to prototype in nt/inc/sys/time.h. nt/inc/sys/time.h (struct timeval): Remove the _W64 guards. --- nt/ChangeLog | 4 ++++ nt/inc/sys/time.h | 2 -- src/ChangeLog | 5 +++++ src/w32.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index 646b472ba7..b5322f5103 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2013-06-03 Eli Zaretskii + + * inc/sys/time.h (struct timeval): Remove the _W64 guards. + 2013-06-01 Eli Zaretskii * inc/sys/time.h [!_TIMEZONE_DEFINED]: Define _TIMEZONE_DEFINED to diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index 308748437d..f8fb022d22 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h @@ -8,7 +8,6 @@ /* The guards are for MinGW64, which defines these structs on its system headers which are included by ms-w32.h. */ -#ifndef _W64 /* Allow inclusion of sys/time.h and winsock2.h in any order. Needed for running the configure test, which is only relevant to MinGW. */ #ifndef _TIMEVAL_DEFINED @@ -25,7 +24,6 @@ struct timeval ((tvp)->tv_usec cmp (uvp)->tv_usec)) #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #endif /* _TIMEVAL_DEFINED */ -#endif /* _W64 */ #ifndef _TIMEZONE_DEFINED #define _TIMEZONE_DEFINED diff --git a/src/ChangeLog b/src/ChangeLog index 2b719b068a..a1aa4efcc8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-06-03 Eli Zaretskii + + * w32.c (gettimeofday): Make the signature identical to prototype + in nt/inc/sys/time.h. + 2013-06-03 Stefan Monnier * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to diff --git a/src/w32.c b/src/w32.c index 7d63c73eb1..7a39a617ee 100644 --- a/src/w32.c +++ b/src/w32.c @@ -2452,7 +2452,7 @@ get_emacs_configuration_options (void) /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ int -gettimeofday (struct timeval *restrict tv, struct timezone *restrict tz) +gettimeofday (struct timeval *__restrict tv, struct timezone *__restrict tz) { struct _timeb tb; _ftime (&tb); -- 2.20.1