summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-05-14 19:02:50 +0300
committerEli Zaretskii <eliz@gnu.org>2017-05-14 19:02:50 +0300
commit792ffa022380e05d49437e47823cfdf82337a253 (patch)
treed9c17fb890a9010c1c8ed8de0d52d1de160c8cd2 /lib-src
parent3af6909f3249dc8d74349f000117f7063f71adff (diff)
downloademacs-792ffa022380e05d49437e47823cfdf82337a253.tar.gz
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
};
#endif
-void gettimeofday (struct timeval *, struct timezone *);
-
#define MAXPATHLEN _MAX_PATH
/* Emulate sleep...we could have done this with a define, but that
@@ -229,29 +227,6 @@ getpass (const char * prompt)
return NULL;
}
-/* This is needed because lib/gettime.c calls gettimeofday, which MSVC
- doesn't have. Copied from w32.c. */
-void
-gettimeofday (struct timeval *tv, struct timezone *tz)
-{
- struct _timeb tb;
- _ftime (&tb);
-
- tv->tv_sec = tb.time;
- tv->tv_usec = tb.millitm * 1000L;
- /* Implementation note: _ftime sometimes doesn't update the dstflag
- according to the new timezone when the system timezone is
- changed. We could fix that by using GetSystemTime and
- GetTimeZoneInformation, but that doesn't seem necessary, since
- Emacs always calls gettimeofday with the 2nd argument NULL (see
- current_emacs_time). */
- if (tz)
- {
- tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */
- tz->tz_dsttime = tb.dstflag; /* type of dst correction */
- }
-}
-
int
fchown (int fd, unsigned uid, unsigned gid)
{