diff options
| author | Rohit Goswami <rog32@hi.is> | 2022-03-07 00:04:47 +0000 |
|---|---|---|
| committer | Rohit Goswami <rog32@hi.is> | 2022-03-07 00:04:47 +0000 |
| commit | 5ffe257a19c5125ad981a5de018e5d492797d2e4 (patch) | |
| tree | a2bc9abf261fa92fd29f3f2533415bd08bd032a1 /numpy | |
| parent | 2eda78bd78679dc7c310ae0098e3ae41a69ca6e1 (diff) | |
| download | numpy-5ffe257a19c5125ad981a5de018e5d492797d2e4.tar.gz | |
MAINT: Use more NPY_OS
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/include/numpy/npy_os.h | 4 | ||||
| -rw-r--r-- | numpy/f2py/cfuncs.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/numpy/core/include/numpy/npy_os.h b/numpy/core/include/numpy/npy_os.h index efa0e4012..6d335f751 100644 --- a/numpy/core/include/numpy/npy_os.h +++ b/numpy/core/include/numpy/npy_os.h @@ -21,6 +21,10 @@ #define NPY_OS_CYGWIN #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) #define NPY_OS_WIN32 +#elif defined(_WIN64) || defined(__WIN64__) || defined(WIN64) + #define NPY_OS_WIN64 +#elif defined(__MINGW32__) || defined(__MINGW64__) + #define NPY_OS_MINGW #elif defined(__APPLE__) #define NPY_OS_DARWIN #else diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py index 1a9e12dfb..f69933543 100644 --- a/numpy/f2py/cfuncs.py +++ b/numpy/f2py/cfuncs.py @@ -572,13 +572,13 @@ cppmacros["F2PY_THREAD_LOCAL_DECL"] = """\ #ifndef F2PY_THREAD_LOCAL_DECL #if defined(_MSC_VER) #define F2PY_THREAD_LOCAL_DECL __declspec(thread) -#elif defined(__MINGW32__) || defined(__MINGW64__) +#elif defined(NPY_OS_MINGW) #define F2PY_THREAD_LOCAL_DECL __thread #elif defined(__STDC_VERSION__) \\ && (__STDC_VERSION__ >= 201112L) \\ && !defined(__STDC_NO_THREADS__) \\ && (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12)) \\ - && !defined(__OpenBSD__) + && !defined(NPY_OS_OPENBSD) /* __STDC_NO_THREADS__ was first defined in a maintenance release of glibc 2.12, see https://lists.gnu.org/archive/html/commit-hurd/2012-07/msg00180.html, so `!defined(__STDC_NO_THREADS__)` may give false positive for the existence |
