From: Eli Zaretskii Date: Thu, 28 Mar 2013 20:20:40 +0000 (+0200) Subject: Fix the gettimeofday_timezone test. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~229^2~63^2~72 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=97dababa47e5b2133f18f05f415dcf42c7066f84;p=emacs.git Fix the gettimeofday_timezone test. --- diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index aa51041bcd8..391898ef122 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h @@ -35,7 +35,9 @@ struct timezone }; #endif -void gettimeofday (struct timeval *, struct timezone *); +/* This needs to be compatible with Posix signature, in order to pass + the configure test for the type of the second argument. */ +int gettimeofday (struct timeval *, struct timezone *); #define ITIMER_REAL 0 #define ITIMER_PROF 1 diff --git a/src/w32.c b/src/w32.c index 431826c4b82..6933ddfed83 100644 --- a/src/w32.c +++ b/src/w32.c @@ -2394,7 +2394,7 @@ get_emacs_configuration_options (void) #include /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ -void +int gettimeofday (struct timeval *tv, struct timezone *tz) { struct _timeb tb; @@ -2413,6 +2413,7 @@ gettimeofday (struct timeval *tv, struct timezone *tz) tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */ tz->tz_dsttime = tb.dstflag; /* type of dst correction */ } + return 0; } /* Emulate fdutimens. */