diff options
-rw-r--r-- | tools/include/tools/endian.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/include/tools/endian.h b/tools/include/tools/endian.h index 5d42e20ab83d..8001194008da 100644 --- a/tools/include/tools/endian.h +++ b/tools/include/tools/endian.h | |||
@@ -15,6 +15,18 @@ | |||
15 | #define htole64(x) (x) | 15 | #define htole64(x) (x) |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | #ifndef le16toh | ||
19 | #define le16toh(x) (x) | ||
20 | #endif | ||
21 | |||
22 | #ifndef le32toh | ||
23 | #define le32toh(x) (x) | ||
24 | #endif | ||
25 | |||
26 | #ifndef le64toh | ||
27 | #define le64toh(x) (x) | ||
28 | #endif | ||
29 | |||
18 | #else /* __BYTE_ORDER */ | 30 | #else /* __BYTE_ORDER */ |
19 | 31 | ||
20 | #ifndef htole16 | 32 | #ifndef htole16 |
@@ -27,6 +39,18 @@ | |||
27 | #define htole64(x) __bswap_64(x) | 39 | #define htole64(x) __bswap_64(x) |
28 | #endif | 40 | #endif |
29 | 41 | ||
42 | #ifndef le16toh | ||
43 | #define le16toh(x) __bswap_16(x) | ||
44 | #endif | ||
45 | |||
46 | #ifndef le32toh | ||
47 | #define le32toh(x) __bswap_32(x) | ||
48 | #endif | ||
49 | |||
50 | #ifndef le64toh | ||
51 | #define le64toh(x) __bswap_64(x) | ||
52 | #endif | ||
53 | |||
30 | #endif | 54 | #endif |
31 | 55 | ||
32 | #endif /* _TOOLS_ENDIAN_H */ | 56 | #endif /* _TOOLS_ENDIAN_H */ |