From c3b0fa04a663fe233765b83d3be41a42aa08c25d Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 3 May 2021 08:21:10 +0100 Subject: Initial import for public release --- tools/iDSK/src/endianPPC.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tools/iDSK/src/endianPPC.cpp (limited to 'tools/iDSK/src/endianPPC.cpp') diff --git a/tools/iDSK/src/endianPPC.cpp b/tools/iDSK/src/endianPPC.cpp new file mode 100644 index 0000000..7b51225 --- /dev/null +++ b/tools/iDSK/src/endianPPC.cpp @@ -0,0 +1,20 @@ +#include +#include +using namespace std; +#include "endianPPC.h" + +#ifndef _MSC_VER +#include +#include +#endif + +bool isBigEndian(void) +{ +#ifdef BYTE_ORDER + return BYTE_ORDER == BIG_ENDIAN; +#elif defined _MSC_VER + return true; // It doesn't run on anything except x86, right? +#else + return __BYTE_ORDER == __BIG_ENDIAN; +#endif +} -- cgit v1.2.3