From 7970925fe4c399032bf90fde07a1d690ed588a5a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 11 Jun 2023 19:33:24 -0500 Subject: [PATCH] Introduce macro function to determine endianness --- src/Platform.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Platform.h b/src/Platform.h index e12395e..1d60605 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -107,6 +107,7 @@ #define BE16(x) (x) #define BE32(x) (x) #define BE64(x) (x) +#define IS_LITTLE_ENDIAN() (false) #else #define LE16(x) (x) #define LE32(x) (x) @@ -114,6 +115,7 @@ #define BE16(x) BSWAP16(x) #define BE32(x) BSWAP32(x) #define BE64(x) BSWAP64(x) +#define IS_LITTLE_ENDIAN() (true) #endif int initializePlatform(void);