comparison 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
comparison
equal deleted inserted replaced
405:0e08f63c74d2 406:b8cc9ab3f761
20 20
21 #include <config.h> 21 #include <config.h>
22 #include <stdio.h> 22 #include <stdio.h>
23 #include <stdlib.h> 23 #include <stdlib.h>
24 #include "../src/systime.h" 24 #include "../src/systime.h"
25
26 #ifdef WINDOWSNT
27 #include <sys/timeb.h>
28
29 /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */
30 void
31 gettimeofday (struct timeval *tv, struct timezone *tz)
32 {
33 struct _timeb tb;
34 _ftime (&tb);
35
36 tv->tv_sec = tb.time;
37 tv->tv_usec = tb.millitm * 1000L;
38 if (tz)
39 {
40 tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */
41 tz->tz_dsttime = tb.dstflag; /* type of dst correction */
42 }
43 }
44 #endif
25 45
26 /* Generates an (extremely) pseudo random number for the dump-id */ 46 /* Generates an (extremely) pseudo random number for the dump-id */
27 static unsigned int 47 static unsigned int
28 generate_dump_id (void) 48 generate_dump_id (void)
29 { 49 {