Skip to content

Commit

Permalink
Merge pull request #20476 from charris/backport-20422
Browse files Browse the repository at this point in the history
BUG: Restore support for i386 and PowerPC (OS X)
  • Loading branch information
charris committed Nov 27, 2021
2 parents 08154bd + 9d36e08 commit 0df9501
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions numpy/core/include/numpy/numpyconfig.h
Expand Up @@ -23,12 +23,18 @@
#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__)
#if defined(__arm64__)
#define NPY_SIZEOF_LONGDOUBLE 8
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
#elif defined(__x86_64)
#define NPY_SIZEOF_LONGDOUBLE 16
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
#elif defined (__i386)
#define NPY_SIZEOF_LONGDOUBLE 12
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 24
#elif defined(__ppc__) || defined (__ppc64__)
#define NPY_SIZEOF_LONGDOUBLE 16
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
#else
#error "unknown architecture"
#endif
Expand Down

0 comments on commit 0df9501

Please sign in to comment.