diff options
author | David Cournapeau <cournape@gmail.com> | 2008-11-17 12:41:13 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-11-17 12:41:13 +0000 |
commit | 3c4c7fa9a9a4980ec2569ee003909a8c3b30840b (patch) | |
tree | 25bc85b2cb1cd7ce33f27935ee2437762c501627 | |
parent | 9feb5b07aae1c8ac434577abf9bf5c9038b70931 (diff) | |
download | numpy-3c4c7fa9a9a4980ec2569ee003909a8c3b30840b.tar.gz |
Set __MSVCRT_VERSION__ to make _ftime64 visible from time.h header when we need to workaround mingw bug.
-rw-r--r-- | numpy/random/mtrand/randomkit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/random/mtrand/randomkit.c b/numpy/random/mtrand/randomkit.c index 900d6adb1..c13e59f7a 100644 --- a/numpy/random/mtrand/randomkit.c +++ b/numpy/random/mtrand/randomkit.c @@ -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 */ |