aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii2017-05-14 19:02:50 +0300
committerEli Zaretskii2017-05-14 19:02:50 +0300
commit792ffa022380e05d49437e47823cfdf82337a253 (patch)
treed9c17fb890a9010c1c8ed8de0d52d1de160c8cd2 /lib-src
parent3af6909f3249dc8d74349f000117f7063f71adff (diff)
downloademacs-792ffa022380e05d49437e47823cfdf82337a253.tar.gz
emacs-792ffa022380e05d49437e47823cfdf82337a253.zip
Remove gettimeofday from w32 sources
* lib-src/ntlib.c (gettimeofday): * nt/inc/sys/time.h (gettimeofday, struct timezone): Remove unused function 'gettimeofday' and all of its supporting code.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ntlib.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index 4bffc612f9b..78ba9061f6b 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -50,8 +50,6 @@ struct timezone
50}; 50};
51#endif 51#endif
52 52
53void gettimeofday (struct timeval *, struct timezone *);
54
55#define MAXPATHLEN _MAX_PATH 53#define MAXPATHLEN _MAX_PATH
56 54
57/* Emulate sleep...we could have done this with a define, but that 55/* Emulate sleep...we could have done this with a define, but that
@@ -229,29 +227,6 @@ getpass (const char * prompt)
229 return NULL; 227 return NULL;
230} 228}
231 229
232/* This is needed because lib/gettime.c calls gettimeofday, which MSVC
233 doesn't have. Copied from w32.c. */
234void
235gettimeofday (struct timeval *tv, struct timezone *tz)
236{
237 struct _timeb tb;
238 _ftime (&tb);
239
240 tv->tv_sec = tb.time;
241 tv->tv_usec = tb.millitm * 1000L;
242 /* Implementation note: _ftime sometimes doesn't update the dstflag
243 according to the new timezone when the system timezone is
244 changed. We could fix that by using GetSystemTime and
245 GetTimeZoneInformation, but that doesn't seem necessary, since
246 Emacs always calls gettimeofday with the 2nd argument NULL (see
247 current_emacs_time). */
248 if (tz)
249 {
250 tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */
251 tz->tz_dsttime = tb.dstflag; /* type of dst correction */
252 }
253}
254
255int 230int
256fchown (int fd, unsigned uid, unsigned gid) 231fchown (int fd, unsigned uid, unsigned gid)
257{ 232{