[Zope-Checkins] CVS: Products/DCOracle2/src - dco2.c:1.97
Matthew T. Kromer
matt@zope.com
Thu, 25 Oct 2001 14:38:58 -0400
Update of /cvs-repository/Products/DCOracle2/src
In directory cvs.zope.org:/tmp/cvs-serv23153/src
Modified Files:
dco2.c
Log Message:
Update a few definitions; alter win32 time to use a better res timer
=== Products/DCOracle2/src/dco2.c 1.96 => 1.97 ===
#include <unistd.h>
#else
+#define WIN32_LEAN_AND_MEAN
+#define USEFILETIME
#include <winsock.h>
#endif
#include <fcntl.h>
@@ -6614,8 +6616,15 @@
*/
static void gettimeofday(struct timeval *tv, void *zone) {
+#ifdef USEFILETIME
+ FILETIME filetime;
+ GetSystemTimeAsFileTime(&filetime);
+ tv->tv_usec = filetime.dwLowDateTime;
+ tv->tv_sec = filetime.dwHighDateTime;
+#else
tv->tv_sec = clock();
tv->tv_usec = 0;
+#endif
}
#endif
@@ -6765,6 +6774,7 @@
PyDict_SetItemString(dict, "__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
+ /* Record some of our build parameters */
PyDict_SetItemString(dict, "buildDefs", PyString_FromString(
""
#ifdef ORACLE8i
@@ -6773,13 +6783,31 @@
#ifdef ORACLE9i
"-DORACLE9i "
#endif
+#ifdef linux
+ "-Dlinux "
+#endif
+#ifdef WIN32
+ "-DWIN32 "
+# ifdef USEFILETIME
+ "-DUSEFILETIME "
+# endif
+#endif
+#ifdef DCO2MEMTRACE
+ "-DDCO2MEMTRACE "
+#endif
+#if NATIVENUMERIC
+ "-DNATIVENUMERIC=1 "
+#endif
+#ifdef COMMONENVIRONMENT
+ "-DCOMMONENVIRONMENT "
+#endif
));
+#if 0
if (PyErr_Occurred())
Py_FatalError("Can't initialize module dco2");
-#if 0
fprintf(stderr,"ServerContext size: %d\n", sizeof(ServerContext));
fprintf(stderr,"Binding size: %d\n", sizeof(Binding));
fprintf(stderr,"BindingArray size: %d\n", sizeof(BindingArray));