diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-05-16 00:21:24 +0200 |
---|---|---|
committer | dec05eba <0xdec05eba@gmail.com> | 2018-05-16 00:21:27 +0200 |
commit | 8315157349bc1a98613bcc9c6e3a6bec532b4691 (patch) | |
tree | 714b129d9e3726ba348b3b285e092de332e585b8 /tests/main.cpp | |
parent | e85a6b1e7cd8da631fd181d95e4bed7bd95f3386 (diff) |
Optimize for little endian instead of big endian1.0.0
Diffstat (limited to 'tests/main.cpp')
-rw-r--r-- | tests/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/main.cpp b/tests/main.cpp index 4b6c7a7..e879e6a 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -15,6 +15,15 @@ struct TestStruct int main() { +#if BYTE_ORDER == BIG_ENDIAN + const char *endianessStr = "big"; +#elif BYTE_ORDER == LITTLE_ENDIAN + const char *endianessStr = "little"; +#else + const char *endianessStr = "Unknown"; +#endif + printf("System endianess: %s\n", endianessStr); + TestStruct expectedTestStruct; expectedTestStruct.a = 0x38956326; expectedTestStruct.b = 0x34; |