diff options
| author | Eli Zaretskii | 2017-05-14 19:02:50 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-05-14 19:02:50 +0300 |
| commit | 792ffa022380e05d49437e47823cfdf82337a253 (patch) | |
| tree | d9c17fb890a9010c1c8ed8de0d52d1de160c8cd2 /src | |
| parent | 3af6909f3249dc8d74349f000117f7063f71adff (diff) | |
| download | emacs-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 'src')
| -rw-r--r-- | src/w32.c | 27 |
1 files changed, 0 insertions, 27 deletions
| @@ -2978,33 +2978,6 @@ emacs_root_dir (void) | |||
| 2978 | return root_dir; | 2978 | return root_dir; |
| 2979 | } | 2979 | } |
| 2980 | 2980 | ||
| 2981 | #include <sys/timeb.h> | ||
| 2982 | |||
| 2983 | /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ | ||
| 2984 | int | ||
| 2985 | gettimeofday (struct timeval *__restrict tv, void *__restrict tzv) | ||
| 2986 | { | ||
| 2987 | struct _timeb tb; | ||
| 2988 | _ftime (&tb); | ||
| 2989 | |||
| 2990 | tv->tv_sec = tb.time; | ||
| 2991 | tv->tv_usec = tb.millitm * 1000L; | ||
| 2992 | /* Implementation note: _ftime sometimes doesn't update the dstflag | ||
| 2993 | according to the new timezone when the system timezone is | ||
| 2994 | changed. We could fix that by using GetSystemTime and | ||
| 2995 | GetTimeZoneInformation, but that doesn't seem necessary, since | ||
| 2996 | Emacs always calls gettimeofday with the 2nd argument NULL (see | ||
| 2997 | current_emacs_time). */ | ||
| 2998 | if (tzv) | ||
| 2999 | { | ||
| 3000 | struct timezone *tz = (struct timezone *)tzv; | ||
| 3001 | |||
| 3002 | tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */ | ||
| 3003 | tz->tz_dsttime = tb.dstflag; /* type of dst correction */ | ||
| 3004 | } | ||
| 3005 | return 0; | ||
| 3006 | } | ||
| 3007 | |||
| 3008 | /* Emulate fdutimens. */ | 2981 | /* Emulate fdutimens. */ |
| 3009 | 2982 | ||
| 3010 | /* Set the access and modification time stamps of FD (a.k.a. FILE) to be | 2983 | /* Set the access and modification time stamps of FD (a.k.a. FILE) to be |