summaryrefslogtreecommitdiff
path: root/lib/gettimeofday.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-07-26 13:46:35 +0200
committerBruno Haible <bruno@clisp.org>2020-07-26 13:46:35 +0200
commita6fbda46c278750dec50b0b41a9a88026944dcb9 (patch)
tree000dece806892f5358a1ec3fddd37b72f0bb39a4 /lib/gettimeofday.c
parent994d7b1849b9157c154d8981ec8bdc0eb0f40acc (diff)
downloadgnulib-a6fbda46c278750dec50b0b41a9a88026944dcb9.tar.gz
gettimeofday: Remove workaround for Mac OS X 10.0.
* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Remove macro. (gl_FUNC_GETTIMEOFDAY): Don't invoke it. * lib/gettimeofday.c: Don't include localtime-buffer.h. (gettimeofday): Don't test GETTIMEOFDAY_CLOBBERS_LOCALTIME. * lib/localtime.c: Don't test GETTIMEOFDAY_CLOBBERS_LOCALTIME. * modules/gettimeofday (Depends-on): Remove localtime-buffer. * modules/localtime-buffer: Remove file. * lib/localtime-buffer.h: Remove file. * lib/localtime-buffer.c: Remove file. * m4/localtime-buffer.m4: Remove file. * MODULES.html.sh (Date and time <time.h>): Remove localtime-buffer.
Diffstat (limited to 'lib/gettimeofday.c')
-rw-r--r--lib/gettimeofday.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index 305ab984e0..8b758a1061 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -29,8 +29,6 @@
# include <windows.h>
#endif
-#include "localtime-buffer.h"
-
#ifdef WINDOWS_NATIVE
/* Don't assume that UNICODE is not defined. */
@@ -123,11 +121,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
#else
# if HAVE_GETTIMEOFDAY
-# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
- /* Save and restore the contents of the buffer used for localtime's
- result around the call to gettimeofday. */
- struct tm save = *localtime_buffer_addr;
-# endif
# if defined timeval /* 'struct timeval' overridden by gnulib? */
# undef timeval
@@ -142,10 +135,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
int result = gettimeofday (tv, (struct timezone *) tz);
# endif
-# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
- *localtime_buffer_addr = save;
-# endif
-
return result;
# else