(libretro-common) Fix retro_endianness.h

This commit is contained in:
twinaphex 2020-04-21 00:46:48 +02:00
parent 3529f2da4c
commit 3a2a365ec9

View File

@ -76,26 +76,23 @@
#include <winsock2.h> #include <winsock2.h>
#endif #endif
#if defined (BYTE_ORDER) && defined (BIG_ENDIAN) && defined (LITTLE_ENDIAN) #ifdef _MSC_VER
# if BYTE_ORDER == BIG_ENDIAN # if _M_IX86 || _M_AMD64 || _M_ARM || _M_ARM64
# define MSB_FIRST 1 # define MSB_FIRST 1
# elif BYTE_ORDER == LITTLE_ENDIAN # elif _M_PPC
# define LSB_FIRST 1 # define LSB_FIRST 1
# else # else
# error "Invalid endianness macros" /* 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 */
# endif # error "unknown platform, can't determine endianness"
#elif defined (__BYTE_ORDER__) && defined (__ORDER_BIG_ENDIAN__) && defined (__ORDER_LITTLE_ENDIAN__) # endif
# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #else
# define MSB_FIRST 1 # if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
# elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ # define MSB_FIRST 1
# define LSB_FIRST 1 # elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
# else # define LSB_FIRST 1
# error "Invalid endianness macros" # else
# endif # error "Invalid endianness macros"
#elif defined (__i386__) || defined(__x86_64__) # endif
# define LSB_FIRST 1
#else
# error "Unknown platform"
#endif #endif
#if defined(MSB_FIRST) && defined(LSB_FIRST) #if defined(MSB_FIRST) && defined(LSB_FIRST)