[Numpy-svn] r6070 - trunk/numpy/random/mtrand
numpy-svn at scipy.org
numpy-svn at scipy.org
Mon Nov 17 07:41:21 EST 2008
Author: cdavid
Date: 2008-11-17 06:41:13 -0600 (Mon, 17 Nov 2008)
New Revision: 6070
Modified:
trunk/numpy/random/mtrand/randomkit.c
Log:
Set __MSVCRT_VERSION__ to make _ftime64 visible from time.h header when we need to workaround mingw bug.
Modified: trunk/numpy/random/mtrand/randomkit.c
===================================================================
--- trunk/numpy/random/mtrand/randomkit.c 2008-11-17 12:36:17 UTC (rev 6069)
+++ trunk/numpy/random/mtrand/randomkit.c 2008-11-17 12:41:13 UTC (rev 6070)
@@ -75,8 +75,10 @@
#ifdef _WIN32
/* Windows */
-#include <time.h>
#ifdef NPY_NEEDS_MINGW_TIME_WORKAROUND
+/* FIXME: ideally, we should set this to the real version of MSVCRT. We need
+ * something higher than 0x601 to enable _ftime64 and co */
+#define __MSVCRT_VERSION__ 0x0700
/* mingw msvcr lib import wrongly export _ftime, which does not exist in the
* actual msvc runtime for version >= 8; we make it an alist to _ftime64, which
* is available in those versions of the runtime and should be ABI compatible
@@ -85,6 +87,7 @@
#else
#define _FTIME(x) _ftime((x))
#endif
+#include <time.h>
#include <sys/timeb.h>
#ifndef RK_NO_WINCRYPT
/* Windows crypto */
More information about the Numpy-svn
mailing list