[or-cvs] It is possible to have struct timeval but not gettimeofday.
Nick Mathewson
nickm at seul.org
Tue Aug 3 23:31:24 UTC 2004
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv21868/src/common
Modified Files:
util.c util.h
Log Message:
It is possible to have struct timeval but not gettimeofday.
Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- util.c 23 Jul 2004 21:25:28 -0000 1.116
+++ util.c 3 Aug 2004 23:31:22 -0000 1.117
@@ -31,6 +31,12 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
+#ifndef HAVE_GETTIMEOFDAY
+#ifdef HAVE_FTIME
+#include <sys/timeb.h>
+#endif
+#endif
+
#include "util.h"
#include "log.h"
#include "crypto.h"
Index: util.h
===================================================================
RCS file: /home/or/cvsroot/src/common/util.h,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- util.h 20 Jul 2004 21:23:50 -0000 1.75
+++ util.h 3 Aug 2004 23:31:22 -0000 1.76
@@ -26,16 +26,12 @@
#elif defined(_MSC_VER)
#include <winsock.h>
#endif
-#ifndef HAVE_GETTIMEOFDAY
-#ifdef HAVE_FTIME
-#define USING_FAKE_TIMEVAL
-#include <sys/timeb.h>
+#ifndef HAVE_STRUCT_TIMEVAL_TV_SEC
struct timeval {
time_t tv_sec;
unsigned int tv_usec;
};
#endif
-#endif
#ifdef MS_WINDOWS
/* Windows names string functions differently from most other platforms. */
More information about the tor-commits
mailing list