diff --git a/src/PommeTypes.h b/src/PommeTypes.h index c8c864b..07f5199 100644 --- a/src/PommeTypes.h +++ b/src/PommeTypes.h @@ -19,7 +19,7 @@ typedef unsigned short UInt16; typedef unsigned int UInt32; typedef unsigned long long UInt64; -#if TARGET_RT_BIGENDIAN +#if __BIG_ENDIAN__ typedef struct { UInt32 hi, lo; } UnsignedWide; #else typedef struct { UInt32 lo, hi; } UnsignedWide; @@ -283,7 +283,7 @@ typedef UInt8 KeyMapByteArray[16]; //----------------------------------------------------------------------------- // 'vers' resource -#if TARGET_RT_BIG_ENDIAN +#if __BIG_ENDIAN__ //BCD encoded, e.g. "4.2.1a3" is 0x04214003 typedef struct NumVersion { diff --git a/src/Utilities/bigendianstreams.h b/src/Utilities/bigendianstreams.h index f5becf4..c6d7e4b 100644 --- a/src/Utilities/bigendianstreams.h +++ b/src/Utilities/bigendianstreams.h @@ -48,7 +48,7 @@ namespace Pomme { char b[sizeof(T)]; Read(b, sizeof(T)); -#if !(TARGET_RT_BIGENDIAN) +#if !(__BIG_ENDIAN__) if constexpr (sizeof(T) > 1) { std::reverse(b, b + sizeof(T)); @@ -80,7 +80,7 @@ namespace Pomme void Write(T value) { char* b = (char*) &value; -#if !(TARGET_RT_BIGENDIAN) +#if !(__BIG_ENDIAN__) if constexpr (sizeof(T) > 1) { std::reverse(b, b + sizeof(T)); diff --git a/src/Utilities/structpack.h b/src/Utilities/structpack.h index 4b404f7..a53b755 100644 --- a/src/Utilities/structpack.h +++ b/src/Utilities/structpack.h @@ -8,7 +8,7 @@ template T ByteswapScalar(T x) { -#if TARGET_RT_BIGENDIAN +#if __BIG_ENDIAN__ return x; #else char* b = (char*)&x;