summaryrefslogtreecommitdiff
path: root/numpy/random/mtrand/randomkit.c
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-11-17 13:53:25 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-11-17 13:53:25 +0000
commiteb52b1d8ff31a3eb48319b20de272acc26f88bdd (patch)
treea4b0be8a054b5cd9fde961548532914ee66ab73c /numpy/random/mtrand/randomkit.c
parent13b3ffbd8a844168d95af92271291dc9a3888153 (diff)
downloadnumpy-eb52b1d8ff31a3eb48319b20de272acc26f88bdd.tar.gz
Conditionally setup mingw workaround on __GNUC__ since we can't detect if we are built with mingw in distutils setup.py.
Diffstat (limited to 'numpy/random/mtrand/randomkit.c')
-rw-r--r--numpy/random/mtrand/randomkit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/random/mtrand/randomkit.c b/numpy/random/mtrand/randomkit.c
index 23ea4b738..bff033064 100644
--- a/numpy/random/mtrand/randomkit.c
+++ b/numpy/random/mtrand/randomkit.c
@@ -73,7 +73,9 @@
#ifdef _WIN32
/* Windows */
-#ifdef NPY_NEEDS_MINGW_TIME_WORKAROUND
+/* XXX: we have to use this ugly defined(__GNUC__) because it is not easy to
+ * detect the compiler used in distutils itself */
+#if (defined(__GNUC__) && defined(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