diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/compat/endian.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/compat/endian.h b/include/compat/endian.h index 928affe..0945ece 100644 --- a/include/compat/endian.h +++ b/include/compat/endian.h | |||
| @@ -51,7 +51,9 @@ | |||
| 51 | #include <libkern/OSByteOrder.h> | 51 | #include <libkern/OSByteOrder.h> |
| 52 | #define be16toh(x) OSSwapBigToHostInt16((x)) | 52 | #define be16toh(x) OSSwapBigToHostInt16((x)) |
| 53 | #define htobe16(x) OSSwapHostToBigInt16((x)) | 53 | #define htobe16(x) OSSwapHostToBigInt16((x)) |
| 54 | #define le32toh(x) OSSwapLittleToHostInt32((x)) | ||
| 54 | #define be32toh(x) OSSwapBigToHostInt32((x)) | 55 | #define be32toh(x) OSSwapBigToHostInt32((x)) |
| 56 | #define htole32(x) OSSwapHostToLittleInt32(x) | ||
| 55 | #define htobe32(x) OSSwapHostToBigInt32(x) | 57 | #define htobe32(x) OSSwapHostToBigInt32(x) |
| 56 | #define htole64(x) OSSwapHostToLittleInt64(x) | 58 | #define htole64(x) OSSwapHostToLittleInt64(x) |
| 57 | #define htobe64(x) OSSwapHostToBigInt64(x) | 59 | #define htobe64(x) OSSwapHostToBigInt64(x) |
| @@ -64,7 +66,9 @@ | |||
| 64 | 66 | ||
| 65 | #define be16toh(x) ntohs((x)) | 67 | #define be16toh(x) ntohs((x)) |
| 66 | #define htobe16(x) htons((x)) | 68 | #define htobe16(x) htons((x)) |
| 69 | #define le32toh(x) (x) | ||
| 67 | #define be32toh(x) ntohl((x)) | 70 | #define be32toh(x) ntohl((x)) |
| 71 | #define htole32(x) (x) | ||
| 68 | #define htobe32(x) ntohl((x)) | 72 | #define htobe32(x) ntohl((x)) |
| 69 | #define be64toh(x) ntohll((x)) | 73 | #define be64toh(x) ntohll((x)) |
| 70 | 74 | ||
