]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - tools/include/tools/endian.h
1 #ifndef _TOOLS_ENDIAN_H
2 #define _TOOLS_ENDIAN_H
6 #if __BYTE_ORDER == __LITTLE_ENDIAN
12 #define htole32(x) (x)
15 #define htole64(x) (x)
19 #define le16toh(x) (x)
23 #define le32toh(x) (x)
27 #define le64toh(x) (x)
30 #else /* __BYTE_ORDER */
33 #define htole16(x) __bswap_16(x)
36 #define htole32(x) __bswap_32(x)
39 #define htole64(x) __bswap_64(x)
43 #define le16toh(x) __bswap_16(x)
47 #define le32toh(x) __bswap_32(x)
51 #define le64toh(x) __bswap_64(x)
56 #endif /* _TOOLS_ENDIAN_H */