diff options
author | Jim Meyering <jim@meyering.net> | 2001-11-26 12:29:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-11-26 12:29:43 +0000 |
commit | 225d614f6fdf137ff912a2446dd639af3d2c2c78 (patch) | |
tree | 84e43b88fe3b9fb71329f9ca57d6f1942c711d9c /lib | |
parent | 8087128c07af528666a48156743572f15d1267e8 (diff) | |
download | coreutils-225d614f6fdf137ff912a2446dd639af3d2c2c78.tar.xz |
Don't include gtod.h.
(GTOD_init): Remove function.
(rpl_gettimeofday): Do its job here instead, rather than aborting.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gettimeofday.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index f0c1d907c..48f286945 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -39,17 +39,9 @@ #endif #include <stdlib.h> -#include "gtod.h" static struct tm *localtime_buffer_addr; -void -GTOD_init (void) -{ - time_t t = 0; - localtime_buffer_addr = localtime (&t); -} - /* This is a wrapper for gettimeofday. It is used only on systems for which gettimeofday clobbers the static buffer used for localtime's result. @@ -63,7 +55,10 @@ rpl_gettimeofday (struct timeval *tv, struct timezone *tz) int result; if (! localtime_buffer_addr) - abort (); + { + time_t t = 0; + localtime_buffer_addr = localtime (&t); + } save = *localtime_buffer_addr; result = gettimeofday (tv, tz); |