zig.h: Use __BYTE_ORDER__ instead of __LITTLE_ENDIAN__ for endianness check.

The former is supported by most compilers while the latter is Clang-only.
This commit is contained in:
Alex Rønne Petersen 2024-12-01 14:03:17 +01:00
parent 4e09e363cd
commit 43a1b88bc8
No known key found for this signature in database

View File

@ -41,7 +41,7 @@ typedef char bool;
#define zig_has_attribute(attribute) 0
#endif
#if __LITTLE_ENDIAN__ || _MSC_VER
#if defined(_MSC_VER) || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define zig_little_endian 1
#define zig_big_endian 0
#else