diff options
author | 2021-11-24 03:46:42 +0100 | |
---|---|---|
committer | 2021-11-24 03:46:42 +0100 | |
commit | 2c6121db9ad84b8aad05b937e071ff7dcc9c8867 (patch) | |
tree | a255055506781da1bd6c0d3cf42f5996189d23a2 /include/endianness.h | |
parent | fa8bfb65c70edd4d2617fbbf970302beb9a4ced2 (diff) | |
download | libimobiledevice-2c6121db9ad84b8aad05b937e071ff7dcc9c8867.tar.gz libimobiledevice-2c6121db9ad84b8aad05b937e071ff7dcc9c8867.tar.bz2 |
Add Reverse Proxy implementation
Diffstat (limited to 'include/endianness.h')
-rw-r--r-- | include/endianness.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/endianness.h b/include/endianness.h index 2d6ad0e..1d414b3 100644 --- a/include/endianness.h +++ b/include/endianness.h | |||
@@ -31,6 +31,18 @@ | |||
31 | #define htobe16 be16toh | 31 | #define htobe16 be16toh |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #ifndef le16toh | ||
35 | #if __BYTE_ORDER == __BIG_ENDIAN | ||
36 | #define le16toh(x) ((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8)) | ||
37 | #else | ||
38 | #define le16toh(x) (x) | ||
39 | #endif | ||
40 | #endif | ||
41 | |||
42 | #ifndef htole16 | ||
43 | #define htole16 le16toh | ||
44 | #endif | ||
45 | |||
34 | #ifndef __bswap_32 | 46 | #ifndef __bswap_32 |
35 | #define __bswap_32(x) ((((x) & 0xFF000000) >> 24) \ | 47 | #define __bswap_32(x) ((((x) & 0xFF000000) >> 24) \ |
36 | | (((x) & 0x00FF0000) >> 8) \ | 48 | | (((x) & 0x00FF0000) >> 8) \ |