Skip to content

Commit 3dec661

Browse files
authored
Merge pull request #24813 from charris/backport-24762
BUG: Fix order of Windows OS detection macros.
2 parents ac5b97a + 0a17169 commit 3dec661

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

numpy/core/include/numpy/npy_os.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@
1919
#define NPY_OS_SOLARIS
2020
#elif defined(__CYGWIN__)
2121
#define NPY_OS_CYGWIN
22-
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
23-
#define NPY_OS_WIN32
24-
#elif defined(_WIN64) || defined(__WIN64__) || defined(WIN64)
25-
#define NPY_OS_WIN64
26-
#elif defined(__MINGW32__) || defined(__MINGW64__)
22+
/* We are on Windows.*/
23+
#elif defined(_WIN32)
24+
/* We are using MinGW (64-bit or 32-bit)*/
25+
#if defined(__MINGW32__) || defined(__MINGW64__)
2726
#define NPY_OS_MINGW
27+
/* Otherwise, if _WIN64 is defined, we are targeting 64-bit Windows*/
28+
#elif defined(_WIN64)
29+
#define NPY_OS_WIN64
30+
/* Otherwise assume we are targeting 32-bit Windows*/
31+
#else
32+
#define NPY_OS_WIN32
33+
#endif
2834
#elif defined(__APPLE__)
2935
#define NPY_OS_DARWIN
3036
#elif defined(__HAIKU__)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy