summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorMatthew Brett <matthew.brett@gmail.com>2022-06-29 23:15:04 +0100
committerMatthew Brett <matthew.brett@gmail.com>2022-06-29 23:20:23 +0100
commit467be385f57cfdf373ba076836054fee3a8218ca (patch)
tree312637f7ddbb0c0f3580b64677cf4b44d441c016 /numpy
parent2c79206d6048886635d5548721de0017c3fd9e74 (diff)
downloadnumpy-467be385f57cfdf373ba076836054fee3a8218ca.tar.gz
Allow GCC compile on mingw-w64-based systems
Macro `__MINGW32__` always defined for Mingw-w64 compilers (32- or 64-bit): https://sourceforge.net/p/predef/wiki/Compilers/
Diffstat (limited to 'numpy')
-rw-r--r--numpy/random/src/mt19937/mt19937.h2
-rw-r--r--numpy/random/src/pcg64/pcg64.h2
-rw-r--r--numpy/random/src/philox/philox.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/numpy/random/src/mt19937/mt19937.h b/numpy/random/src/mt19937/mt19937.h
index 1b39e0b64..83129336a 100644
--- a/numpy/random/src/mt19937/mt19937.h
+++ b/numpy/random/src/mt19937/mt19937.h
@@ -2,7 +2,7 @@
#include <math.h>
#include <stdint.h>
-#ifdef _WIN32
+#if defined(_WIN32) && !defined (__MINGW32__)
#define inline __forceinline
#endif
diff --git a/numpy/random/src/pcg64/pcg64.h b/numpy/random/src/pcg64/pcg64.h
index 90a83fd5e..fb8281201 100644
--- a/numpy/random/src/pcg64/pcg64.h
+++ b/numpy/random/src/pcg64/pcg64.h
@@ -52,7 +52,7 @@
#include <inttypes.h>
-#ifdef _WIN32
+#if defined(_WIN32) && !defined (__MINGW32__)
#include <stdlib.h>
#define inline __forceinline
#endif
diff --git a/numpy/random/src/philox/philox.h b/numpy/random/src/philox/philox.h
index 8844acc15..81e034a47 100644
--- a/numpy/random/src/philox/philox.h
+++ b/numpy/random/src/philox/philox.h
@@ -33,7 +33,7 @@ static NPY_INLINE uint64_t mulhilo64(uint64_t a, uint64_t b, uint64_t *hip) {
return (uint64_t)product;
}
#else
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__MINGW32__)
#include <intrin.h>
#if defined(_WIN64) && defined(_M_AMD64)
#pragma intrinsic(_umul128)