This commit is contained in:
twinaphex 2020-04-21 00:49:02 +02:00
parent 3a2a365ec9
commit 8a15f0094a

View File

@ -76,23 +76,23 @@
#include <winsock2.h>
#endif
#ifdef _MSC_VER
# if _M_IX86 || _M_AMD64 || _M_ARM || _M_ARM64
# define MSB_FIRST 1
# elif _M_PPC
# define LSB_FIRST 1
# else
/* MSVC can run on _M_ALPHA and _M_IA64 too, but they're both bi-endian; need to find what mode MSVC runs them at */
# error "unknown platform, can't determine endianness"
# endif
#else
# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
# define MSB_FIRST 1
# elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
# define LSB_FIRST 1
# else
# error "Invalid endianness macros"
# endif
#ifdef _MSC_VER
#if _M_IX86 || _M_AMD64 || _M_ARM || _M_ARM64
#define LSB_FIRST 1
#elif _M_PPC
#define MSB_FIRST 1
#else
/* MSVC can run on _M_ALPHA and _M_IA64 too, but they're both bi-endian; need to find what mode MSVC runs them at */
#error "unknown platform, can't determine endianness"
#endif
#else
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define MSB_FIRST 1
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define LSB_FIRST 1
#else
#error "Invalid endianness macros"
#endif
#endif
#if defined(MSB_FIRST) && defined(LSB_FIRST)