changeset 3650:f33e39ae9aec

Don't include gtod.h. (GTOD_init): Remove function. (rpl_gettimeofday): Do its job here instead, rather than aborting.
author Jim Meyering <jim@meyering.net>
date Mon, 26 Nov 2001 12:29:43 +0000
parents d7c8efc501d6
children f11f67627a82
files lib/gettimeofday.c
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
   int result;
 
   if (! localtime_buffer_addr)
-    abort ();
+    {
+      time_t t = 0;
+      localtime_buffer_addr = localtime (&t);
+    }
 
   save = *localtime_buffer_addr;
   result = gettimeofday (tv, tz);