summaryrefslogtreecommitdiff
path: root/py/modcmath.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-05-07 13:36:52 +1000
committerDamien George <damien.p.george@gmail.com>2018-05-11 21:51:34 +1000
commit9630376dbca0202321f2aae6ef88ef75cdb5374e (patch)
tree3a65e707be79fe2ae1eba5cf09f7797c6857cd93 /py/modcmath.c
parent7541be5637c545cbfd8811a6b51e253f9257b833 (diff)
py/mpconfig.h: Be stricter when autodetecting machine endianness.
This patch changes 2 things in the endianness detection: 1. Don't assume that __BYTE_ORDER__ not being __ORDER_LITTLE_ENDIAN__ means that the machine is big endian, so add an explicit check that this macro is indeed __ORDER_BIG_ENDIAN__ (same with __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN). A machine could have PDP endianness. 2. Remove the checks which base their autodetection decision on whether any little or big endian macros are defined (eg __LITTLE_ENDIAN__ or __BIG_ENDIAN__). Just because a system defines these does not mean it has that endianness. See issue #3760.
Diffstat (limited to 'py/modcmath.c')
0 files changed, 0 insertions, 0 deletions