[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3af6909: Fix the MS-Windows build
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 3af6909: Fix the MS-Windows build |
Date: |
Sun, 14 May 2017 10:54:34 -0400 (EDT) |
branch: master
commit 3af6909f3249dc8d74349f000117f7063f71adff
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix the MS-Windows build
* nt/inc/sys/time.h (gettimeofday):
* src/w32.c (gettimeofday): Adjust signature to match Gnulib.
---
nt/inc/sys/time.h | 2 +-
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 f8fb022..88ea32b 100644
--- a/nt/inc/sys/time.h
+++ b/nt/inc/sys/time.h
@@ -42,7 +42,7 @@ struct timezone
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
diff --git a/src/w32.c b/src/w32.c
index f35ad67..878b224 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -2982,7 +2982,7 @@ emacs_root_dir (void)
/* 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);
@@ -2995,8 +2995,10 @@ gettimeofday (struct timeval *__restrict tv, struct
timezone *__restrict tz)
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 */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3af6909: Fix the MS-Windows build,
Eli Zaretskii <=