From: Jim Meyering Date: Mon, 26 Nov 2001 12:29:43 +0000 (+0000) Subject: Don't include gtod.h. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40b0444065b3855a74870f45bc28da4457d56b4f;p=pspp Don't include gtod.h. (GTOD_init): Remove function. (rpl_gettimeofday): Do its job here instead, rather than aborting. --- diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index f0c1d907cf..48f286945d 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -39,17 +39,9 @@ #endif #include -#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);