summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-11-03 18:24:53 -0600
committerGitHub <noreply@github.com>2021-11-03 18:24:53 -0600
commitb134e90b5ba19f118c9e5184708e0169009abf81 (patch)
treeb72d35f56d3938a99f507030861508bb288ea997
parentacbbf1a66179f8c83c75022ddbdbf1d15c35cdaa (diff)
parent3a7424d0a13128fd1e1a49d70ec7687db42f8f79 (diff)
downloadnumpy-b134e90b5ba19f118c9e5184708e0169009abf81.tar.gz
Merge pull request #20293 from charris/backport-20270
BUG: Fix headers for universal2 builds
-rw-r--r--numpy/core/include/numpy/numpyconfig.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/numpyconfig.h b/numpy/core/include/numpy/numpyconfig.h
index a1b1de0ef..3909aa9c8 100644
--- a/numpy/core/include/numpy/numpyconfig.h
+++ b/numpy/core/include/numpy/numpyconfig.h
@@ -19,6 +19,19 @@
#define NPY_SIZEOF_LONG 4
#define NPY_SIZEOF_PY_INTPTR_T 4
#endif
+
+ #undef NPY_SIZEOF_LONGDOUBLE
+ #undef NPY_SIZEOF_COMPLEX_LONGDOUBLE
+
+ #ifdef __x86_64
+ #define NPY_SIZEOF_LONGDOUBLE 16
+ #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+ #elif defined(__arm64__)
+ #define NPY_SIZEOF_LONGDOUBLE 8
+ #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
+ #else
+ #error "unknown architecture"
+ #endif
#endif
/**