which does not force the use of -std= switch to GCC, and that
causes compilation errors with 'restrict', which is a C99
extension. */
-int gettimeofday (struct timeval *__restrict, struct timezone *__restrict);
+int gettimeofday (struct timeval *__restrict, void *__restrict);
#define ITIMER_REAL 0
#define ITIMER_PROF 1
/* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */
int
-gettimeofday (struct timeval *__restrict tv, struct timezone *__restrict tz)
+gettimeofday (struct timeval *__restrict tv, void *__restrict tzv)
{
struct _timeb tb;
_ftime (&tb);
GetTimeZoneInformation, but that doesn't seem necessary, since
Emacs always calls gettimeofday with the 2nd argument NULL (see
current_emacs_time). */
- if (tz)
+ if (tzv)
{
+ struct timezone *tz = (struct timezone *)tzv;
+
tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */
tz->tz_dsttime = tb.dstflag; /* type of dst correction */
}