From 6cb4b6673e8e5aa5c0101e179cc7afcdcf07236c Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 1 Feb 2025 08:50:40 +0000 Subject: Initial import --- iDSK/src/endianPPC.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 iDSK/src/endianPPC.cpp (limited to 'iDSK/src/endianPPC.cpp') diff --git a/iDSK/src/endianPPC.cpp b/iDSK/src/endianPPC.cpp new file mode 100644 index 0000000..f3146d6 --- /dev/null +++ b/iDSK/src/endianPPC.cpp @@ -0,0 +1,24 @@ +#include +#include +using namespace std; +#include "endianPPC.h" + +#ifndef _MSC_VER +#include +#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__MORPHOS__) +#include +#else +#include +#endif +#endif + +bool isBigEndian(void) +{ +#ifdef BYTE_ORDER + return BYTE_ORDER == BIG_ENDIAN; +#elif defined _MSC_VER + return false; // Modern VC++ only runs on x86, x64 and ARM, doesn't require big/little endian conversion +#else + return __BYTE_ORDER == __BIG_ENDIAN; +#endif +} -- cgit v1.2.3