@ -30,15 +30,22 @@ For more information, please refer to <http://unlicense.org/>
@@ -30,15 +30,22 @@ For more information, please refer to <http://unlicense.org/>
#ifndef BUILD_H
#define BUILD_H
// All XASH_* macros set by this header are guaranteed to have positive value otherwise not defined
@ -53,21 +60,19 @@ For more information, please refer to <http://unlicense.org/>
@@ -53,21 +60,19 @@ For more information, please refer to <http://unlicense.org/>
#undef XASH_ARMv7
#undef XASH_ARMv8
#undef XASH_BIG_ENDIAN
#undef XASH_BSD
#undef XASH_DOS4GW
#undef XASH_E2K
#undef XASH_EMSCRIPTEN
#undef XASH_FREEBSD
#undef XASH_HAIKU
#undef XASH_IOS
#undef XASH_IRIX
#undef XASH_JS
#undef XASH_LINUX
#undef XASH_LINUX_UNKNOWN
#undef XASH_LITTLE_ENDIAN
#undef XASH_MINGW
#undef XASH_MIPS
#undef XASH_PPC
#undef XASH_MOBILE_PLATFORM
#undef XASH_MSVC
#undef XASH_NETBSD
#undef XASH_OPENBSD
#undef XASH_POSIX
@ -77,74 +82,63 @@ For more information, please refer to <http://unlicense.org/>
@@ -77,74 +82,63 @@ For more information, please refer to <http://unlicense.org/>
#error "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug"
#error
#endif
#endif
#if defined XASH_ANDROID || defined XASH_IOS || defined XASH_NSWITCH || defined XASH_PSVITA
#if XASH_ANDROID || defined XASH_IOS || defined XASH_NSWITCH || defined XASH_PSVITA
#define XASH_MOBILE_PLATFORM 1
#endif
@ -154,27 +148,17 @@ For more information, please refer to <http://unlicense.org/>
@@ -154,27 +148,17 @@ For more information, please refer to <http://unlicense.org/>
//!!! Probably all WinNT installations runs in little endian
#define XASH_LITTLE_ENDIAN 1
#elif __BIG_ENDIAN__
#define XASH_BIG_ENDIAN 1
#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && defined(__ORDER_LITTLE_ENDIAN__)// some compilers define this
#elif defined __BYTE_ORDER__ && defined __ORDER_BIG_ENDIAN__ && defined __ORDER_LITTLE_ENDIAN__ // some compilers define this
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define XASH_BIG_ENDIAN 1
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define XASH_LITTLE_ENDIAN 1
#else
#error "Unknown endianness!"
#endif
#else
#include<sys/param.h>
@ -182,8 +166,6 @@ For more information, please refer to <http://unlicense.org/>
@@ -182,8 +166,6 @@ For more information, please refer to <http://unlicense.org/>
#define XASH_BIG_ENDIAN 1
#elif __BYTE_ORDER == __LITTLE_ENDIAN
#define XASH_LITTLE_ENDIAN 1
#else
#error "Unknown endianness!"
#endif
#endif // !XASH_WIN32
#endif
@ -193,18 +175,28 @@ For more information, please refer to <http://unlicense.org/>
@@ -193,18 +175,28 @@ For more information, please refer to <http://unlicense.org/>
@ -216,34 +208,17 @@ For more information, please refer to <http://unlicense.org/>
@@ -216,34 +208,17 @@ For more information, please refer to <http://unlicense.org/>
#error "Unknown ARM"
#endif
#if defined _M_ARM
#error "No WinMobile port yet! Need to determine which ARM float ABI msvc uses if applicable"
#endif
#if defined __SOFTFP__ || __ARM_PCS_VFP == 0
#define XASH_ARM_SOFTFP 1
#else // __SOFTFP__
#define XASH_ARM_HARDFP 1
#endif // __SOFTFP__
#elif defined __mips__
#define XASH_MIPS 1
#elif defined __powerpc__
#define XASH_PPC 1
#if defined __powerpc64__
#define XASH_64BIT 1
#endif
#elif defined __EMSCRIPTEN__
#define XASH_JS 1
#elif defined __e2k__
#define XASH_64BIT 1
#define XASH_E2K 1
#elif defined __riscv
#define XASH_RISCV 1
#if __riscv_xlen == 64
#define XASH_64BIT 1
#elif __riscv_xlen == 32
// ...
#else
#elif __riscv_xlen != 32
#error "Unknown RISC-V ABI"
#endif
@ -260,10 +235,6 @@ For more information, please refer to <http://unlicense.org/>
@@ -260,10 +235,6 @@ For more information, please refer to <http://unlicense.org/>
#error "Place your architecture name here! If this is a mistake, try to fix conditions above and report a bug"