diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-10-18 17:38:50 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-10-18 17:38:50 +0000 |
commit | f897bca32fb315f6b1b396074670b6a7d96a6395 (patch) | |
tree | bc7c8dd4e1e347e19f618321a7d6a7315906431c /navit/endianess.h | |
parent | 435a8b94631494a5a5e1cf57f4a1b0c6dfee99b7 (diff) | |
download | navit-svn-f897bca32fb315f6b1b396074670b6a7d96a6395.tar.gz |
Fix:Core:Made compileable on wince
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1488 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/endianess.h')
-rw-r--r-- | navit/endianess.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/navit/endianess.h b/navit/endianess.h index b012a8dd..599bb20a 100644 --- a/navit/endianess.h +++ b/navit/endianess.h @@ -54,6 +54,10 @@ #define __bswap_16 OSSwapInt16 #define __bswap_32 OSSwapInt32 #define __bswap_64 OSSwapInt64 +#elif if defined(_WIN32) || defined(__CEGCC__) + #define __BIG_ENDIAN 4321 + #define __LITTLE_ENDIAN 1234 + #define __BYTE_ORDER __LITTLE_ENDIAN #else #define __bswap_16(value) \ ((((value) & 0xff) << 8) | ((value) >> 8)) @@ -65,15 +69,16 @@ << 32) | \ (uint64_t)bswap_32((uint32_t)((value) >> 32))) #endif +#endif -#if __BYTE_ORDER == __BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN #define le16_to_cpu(x) __bswap_16 (x) #define le32_to_cpu(x) __bswap_32 (x) #define le64_to_cpu(x) __bswap_64 (x) #define cpu_to_le16(x) __bswap_16 (x) #define cpu_to_le32(x) __bswap_32 (x) #define cpu_to_le64(x) __bswap_64 (x) -#elif __BYTE_ORDER == __LITTLE_ENDIAN +#elif __BYTE_ORDER == __LITTLE_ENDIAN #define le16_to_cpu(x) (x) #define le32_to_cpu(x) (x) #define cpu_to_le16(x) (x) |