DEADSOFTWARE

Testing odcread against a bunch of existing .odc files
[odcread.git] / util.cc
1 #include <oberon.h>
3 namespace odc {
4 bool isBigEndian() { // http://stackoverflow.com/questions/1001307/detecting-endianness-programmatically-in-a-c-program
5 union {
6 uint32_t i;
7 uint8_t c[4];
8 } test = {0x01020304};
9 return test.c[0] == 1;
10 }
12 bool isLittleEndian() {
13 return !isBigEndian();
14 }
15 }