mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 15:12:31 +00:00
Do not detect byte-order using _BIG/_LITTLE_ENDIAN
These defines are present on some FreeBSD systems, regardless of whether the system is big- or little- endian. This was causing the FreeBSD CI to be incorrectly flagged as big-endian. Resolves https://github.com/ziglang/zig/issues/11391
This commit is contained in:
parent
04dd43934a
commit
319b5cbce5
14
deps/SoftFloat-3e-prebuilt/platform.h
vendored
14
deps/SoftFloat-3e-prebuilt/platform.h
vendored
@ -17,8 +17,6 @@
|
||||
#define BIGENDIAN 1
|
||||
#elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define BIGENDIAN 1
|
||||
#elif defined(_BIG_ENDIAN)
|
||||
#define BIGENDIAN 1
|
||||
#elif defined(__sparc)
|
||||
#define BIGENDIAN 1
|
||||
#elif defined(__sparc__)
|
||||
@ -37,7 +35,9 @@
|
||||
#define BIGENDIAN 1
|
||||
#elif defined(__s390__)
|
||||
#define BIGENDIAN 1
|
||||
#elif defined(__LITTLE_ENDIAN__)
|
||||
#endif
|
||||
|
||||
#if defined(__LITTLE_ENDIAN__)
|
||||
#define LITTLEENDIAN 1
|
||||
#elif defined(__ARMEL__)
|
||||
#define LITTLEENDIAN 1
|
||||
@ -53,8 +53,6 @@
|
||||
#define LITTLEENDIAN 1
|
||||
#elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
#define LITTLEENDIAN 1
|
||||
#elif defined(_LITTLE_ENDIAN)
|
||||
#define LITTLEENDIAN 1
|
||||
#elif defined(__i386__)
|
||||
#define LITTLEENDIAN 1
|
||||
#elif defined(__alpha__)
|
||||
@ -83,7 +81,11 @@
|
||||
#define LITTLEENDIAN 1
|
||||
#elif defined(__bfin__)
|
||||
#define LITTLEENDIAN 1
|
||||
#else
|
||||
#endif
|
||||
|
||||
#if defined(LITTLEENDIAN) && defined(BIGENDIAN)
|
||||
#error unable to detect endianness
|
||||
#elif !defined(LITTLEENDIAN) && !defined(BIGENDIAN)
|
||||
#error unable to detect endianness
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user