diff lib-src/make-dump-id.c @ 406:b8cc9ab3f761 r21-2-33

Import from CVS: tag r21-2-33
author cvs
date Mon, 13 Aug 2007 11:17:09 +0200
parents 2f8bb876ab1d
children de805c49cfc1
line wrap: on
line diff
--- a/lib-src/make-dump-id.c	Mon Aug 13 11:16:09 2007 +0200
+++ b/lib-src/make-dump-id.c	Mon Aug 13 11:17:09 2007 +0200
@@ -23,6 +23,26 @@
 #include <stdlib.h>
 #include "../src/systime.h"
 
+#ifdef WINDOWSNT
+#include <sys/timeb.h>
+
+/* Emulate gettimeofday (Ulrich Leodolter, 1/11/95).  */
+void 
+gettimeofday (struct timeval *tv, struct timezone *tz)
+{
+  struct _timeb tb;
+  _ftime (&tb);
+
+  tv->tv_sec = tb.time;
+  tv->tv_usec = tb.millitm * 1000L;
+  if (tz) 
+    {
+      tz->tz_minuteswest = tb.timezone;	/* minutes west of Greenwich  */
+      tz->tz_dsttime = tb.dstflag;	/* type of dst correction  */
+    }
+}
+#endif
+
 /* Generates an (extremely) pseudo random number for the dump-id */
 static unsigned int
 generate_dump_id (void)