diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-11-03 18:24:53 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-03 18:24:53 -0600 |
commit | b134e90b5ba19f118c9e5184708e0169009abf81 (patch) | |
tree | b72d35f56d3938a99f507030861508bb288ea997 | |
parent | acbbf1a66179f8c83c75022ddbdbf1d15c35cdaa (diff) | |
parent | 3a7424d0a13128fd1e1a49d70ec7687db42f8f79 (diff) | |
download | numpy-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.h | 13 |
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 /** |