diff options
author | Martin Szulecki | 2012-03-19 01:44:21 +0100 |
---|---|---|
committer | Martin Szulecki | 2012-03-19 01:44:21 +0100 |
commit | 86495a1f22cd53399697dd558d65f50ed60dcdb4 (patch) | |
tree | 9583dfc734dc5d754972842b66ffa7a3e595404b /include | |
parent | 7677cd4a5290b6b90f09825cdb5e2945ad276dab (diff) | |
download | libimobiledevice-86495a1f22cd53399697dd558d65f50ed60dcdb4.tar.gz libimobiledevice-86495a1f22cd53399697dd558d65f50ed60dcdb4.tar.bz2 |
Fix endianness detection macros and win32 is little endian too
Diffstat (limited to 'include')
-rw-r--r-- | include/endianness.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/endianness.h b/include/endianness.h index a34cbf4..1f99fa7 100644 --- a/include/endianness.h +++ b/include/endianness.h @@ -1,6 +1,24 @@ #ifndef ENDIANNESS_H #define ENDIANNESS_H +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN 1234 +#endif + +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN 4321 +#endif + +#ifndef __BYTE_ORDER +#ifdef __LITTLE_ENDIAN__ +#define __BYTE_ORDER __LITTLE_ENDIAN +#else +#ifdef __BIG_ENDIAN__ +#define __BYTE_ORDER __BIG_ENDIAN +#endif +#endif +#endif + #ifndef be16toh #if __BYTE_ORDER == __BIG_ENDIAN #define be16toh(x) (x) |