diff options
| author | Eli Zaretskii | 2017-05-14 17:53:39 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-05-14 17:53:39 +0300 |
| commit | 3af6909f3249dc8d74349f000117f7063f71adff (patch) | |
| tree | a7765e34bdb841f665c2636bb9900c81a445431a | |
| parent | 4132bd74e9816ca913f862835cc062e092ab8b79 (diff) | |
| download | emacs-3af6909f3249dc8d74349f000117f7063f71adff.tar.gz emacs-3af6909f3249dc8d74349f000117f7063f71adff.zip | |
Fix the MS-Windows build
* nt/inc/sys/time.h (gettimeofday):
* src/w32.c (gettimeofday): Adjust signature to match Gnulib.
| -rw-r--r-- | nt/inc/sys/time.h | 2 | ||||
| -rw-r--r-- | src/w32.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index f8fb022d221..88ea32bc808 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h | |||
| @@ -42,7 +42,7 @@ struct timezone | |||
| 42 | which does not force the use of -std= switch to GCC, and that | 42 | which does not force the use of -std= switch to GCC, and that |
| 43 | causes compilation errors with 'restrict', which is a C99 | 43 | causes compilation errors with 'restrict', which is a C99 |
| 44 | extension. */ | 44 | extension. */ |
| 45 | int gettimeofday (struct timeval *__restrict, struct timezone *__restrict); | 45 | int gettimeofday (struct timeval *__restrict, void *__restrict); |
| 46 | 46 | ||
| 47 | #define ITIMER_REAL 0 | 47 | #define ITIMER_REAL 0 |
| 48 | #define ITIMER_PROF 1 | 48 | #define ITIMER_PROF 1 |
| @@ -2982,7 +2982,7 @@ emacs_root_dir (void) | |||
| 2982 | 2982 | ||
| 2983 | /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ | 2983 | /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ |
| 2984 | int | 2984 | int |
| 2985 | gettimeofday (struct timeval *__restrict tv, struct timezone *__restrict tz) | 2985 | gettimeofday (struct timeval *__restrict tv, void *__restrict tzv) |
| 2986 | { | 2986 | { |
| 2987 | struct _timeb tb; | 2987 | struct _timeb tb; |
| 2988 | _ftime (&tb); | 2988 | _ftime (&tb); |
| @@ -2995,8 +2995,10 @@ gettimeofday (struct timeval *__restrict tv, struct timezone *__restrict tz) | |||
| 2995 | GetTimeZoneInformation, but that doesn't seem necessary, since | 2995 | GetTimeZoneInformation, but that doesn't seem necessary, since |
| 2996 | Emacs always calls gettimeofday with the 2nd argument NULL (see | 2996 | Emacs always calls gettimeofday with the 2nd argument NULL (see |
| 2997 | current_emacs_time). */ | 2997 | current_emacs_time). */ |
| 2998 | if (tz) | 2998 | if (tzv) |
| 2999 | { | 2999 | { |
| 3000 | struct timezone *tz = (struct timezone *)tzv; | ||
| 3001 | |||
| 3000 | tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */ | 3002 | tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */ |
| 3001 | tz->tz_dsttime = tb.dstflag; /* type of dst correction */ | 3003 | tz->tz_dsttime = tb.dstflag; /* type of dst correction */ |
| 3002 | } | 3004 | } |