bnicholes 01/08/06 13:49:17
Modified: misc/unix getuuid.c
Log:
Added the NetWare version of get_system_time()
Revision Changes Path
1.11 +11 -0 apr/misc/unix/getuuid.c
Index: getuuid.c
===================================================================
RCS file: /home/cvs/apr/misc/unix/getuuid.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- getuuid.c 2001/02/25 20:39:34 1.10
+++ getuuid.c 2001/08/06 20:49:17 1.11
@@ -128,6 +128,16 @@
static void get_system_time(apr_uint64_t *uuid_time)
{
+#ifdef NETWARE
+ uint64_t sec;
+ uint64_t usec;
+
+ NXGetTime(NX_SINCE_1970, NX_SECONDS, &sec);
+ NXGetTime(NX_SINCE_1970, NX_USECONDS, &usec);
+ *uuid_time = (sec * 10000000) + (usec * 10) +
+ 0x01B21DD213814000LL;
+EnterDebugger(); /* Check to make sure that we are actually getting what we
expect. */
+#else
struct timeval tp;
/* ### fix this call to be more portable? */
@@ -138,6 +148,7 @@
Unix base time is January 1, 1970. */
*uuid_time = (tp.tv_sec * 10000000) + (tp.tv_usec * 10) +
0x01B21DD213814000LL;
+#endif
}
/* true_random -- generate a crypto-quality random number. */