Fix the endianness test on powerpc so NetBSD/powerpc builds & works.

NetBSD/powerpc was mis-categorized as little-endian because
_LITTLE_ENDIAN is defined -- what matters on NetBSD is the value
of _BYTE_ORDER.  Retain the old test in the #else clause.

Add some whitespace for added readability.
This commit is contained in:
Havard Eidnes 2018-06-02 22:03:33 +02:00
parent fb5e522fbc
commit 73c583202e

View File

@ -339,12 +339,21 @@
#if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) #if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE)
#error "No support for PowerPC CPUs without double-precision FPU" #error "No support for PowerPC CPUs without double-precision FPU"
#endif #endif
#if defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN)
# if (_BYTE_ORDER == _LITTLE_ENDIAN)
# error "No support for little-endian PowerPC"
# endif
#else
# if defined(_LITTLE_ENDIAN) # if defined(_LITTLE_ENDIAN)
# error "No support for little-endian PowerPC" # error "No support for little-endian PowerPC"
# endif # endif
#endif
#if defined(_LP64) #if defined(_LP64)
#error "No support for PowerPC 64 bit mode" #error "No support for PowerPC 64 bit mode"
#endif #endif
#elif LJ_TARGET_MIPS #elif LJ_TARGET_MIPS
#if defined(__mips_soft_float) #if defined(__mips_soft_float)
#error "No support for MIPS CPUs without FPU" #error "No support for MIPS CPUs without FPU"