1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00

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.
This commit is contained in:
Eli Zaretskii 2013-06-03 20:15:44 +03:00
parent 22bcd514bc
commit e2d8a6f0a2
4 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2013-06-03 Eli Zaretskii <eliz@gnu.org>
* inc/sys/time.h (struct timeval): Remove the _W64 guards.
2013-06-01 Eli Zaretskii <eliz@gnu.org> 2013-06-01 Eli Zaretskii <eliz@gnu.org>
* inc/sys/time.h [!_TIMEZONE_DEFINED]: Define _TIMEZONE_DEFINED to * inc/sys/time.h [!_TIMEZONE_DEFINED]: Define _TIMEZONE_DEFINED to

View file

@ -8,7 +8,6 @@
/* The guards are for MinGW64, which defines these structs on its /* The guards are for MinGW64, which defines these structs on its
system headers which are included by ms-w32.h. */ system headers which are included by ms-w32.h. */
#ifndef _W64
/* Allow inclusion of sys/time.h and winsock2.h in any order. Needed /* Allow inclusion of sys/time.h and winsock2.h in any order. Needed
for running the configure test, which is only relevant to MinGW. */ for running the configure test, which is only relevant to MinGW. */
#ifndef _TIMEVAL_DEFINED #ifndef _TIMEVAL_DEFINED
@ -25,7 +24,6 @@ struct timeval
((tvp)->tv_usec cmp (uvp)->tv_usec)) ((tvp)->tv_usec cmp (uvp)->tv_usec))
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#endif /* _TIMEVAL_DEFINED */ #endif /* _TIMEVAL_DEFINED */
#endif /* _W64 */
#ifndef _TIMEZONE_DEFINED #ifndef _TIMEZONE_DEFINED
#define _TIMEZONE_DEFINED #define _TIMEZONE_DEFINED

View file

@ -1,3 +1,8 @@
2013-06-03 Eli Zaretskii <eliz@gnu.org>
* w32.c (gettimeofday): Make the signature identical to prototype
in nt/inc/sys/time.h.
2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca> 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
* eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to

View file

@ -2452,7 +2452,7 @@ get_emacs_configuration_options (void)
/* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */
int int
gettimeofday (struct timeval *restrict tv, struct timezone *restrict tz) gettimeofday (struct timeval *__restrict tv, struct timezone *__restrict tz)
{ {
struct _timeb tb; struct _timeb tb;
_ftime (&tb); _ftime (&tb);