diff options
Diffstat (limited to 'include/endianness.h')
| -rw-r--r-- | include/endianness.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/endianness.h b/include/endianness.h index 88b63db..972e51b 100644 --- a/include/endianness.h +++ b/include/endianness.h | |||
| @@ -19,6 +19,13 @@ | |||
| 19 | #endif | 19 | #endif |
| 20 | #endif | 20 | #endif |
| 21 | 21 | ||
| 22 | #ifndef __BYTE_ORDER | ||
| 23 | #ifndef _WIN32 | ||
| 24 | #warning __BYTE_ORDER is not defined, assuming little endian | ||
| 25 | #endif | ||
| 26 | #define __BYTE_ORDER __LITTLE_ENDIAN | ||
| 27 | #endif | ||
| 28 | |||
| 22 | #ifndef be16toh | 29 | #ifndef be16toh |
| 23 | #if __BYTE_ORDER == __BIG_ENDIAN | 30 | #if __BYTE_ORDER == __BIG_ENDIAN |
| 24 | #define be16toh(x) (x) | 31 | #define be16toh(x) (x) |
