|
8 | 8 | #define PDP_ENDIAN __ORDER_PDP_ENDIAN__ |
9 | 9 |
|
10 | 10 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
11 | | -#define htobe16(x) bswap_16(x) |
12 | | -#define be16toh(x) bswap_16(x) |
13 | | -#define betoh16(x) bswap_16(x) |
14 | | -#define htobe32(x) bswap_32(x) |
15 | | -#define be32toh(x) bswap_32(x) |
16 | | -#define betoh32(x) bswap_32(x) |
17 | | -#define htobe64(x) bswap_64(x) |
18 | | -#define be64toh(x) bswap_64(x) |
19 | | -#define betoh64(x) bswap_64(x) |
20 | | -#define htole16(x) (uint16_t)(x) |
21 | | -#define le16toh(x) (uint16_t)(x) |
22 | | -#define letoh16(x) (uint16_t)(x) |
23 | | -#define htole32(x) (uint32_t)(x) |
24 | | -#define le32toh(x) (uint32_t)(x) |
25 | | -#define letoh32(x) (uint32_t)(x) |
26 | | -#define htole64(x) (uint64_t)(x) |
27 | | -#define le64toh(x) (uint64_t)(x) |
28 | | -#define letoh64(x) (uint64_t)(x) |
| 11 | +#define htobe16(x) bswap_16(x) |
| 12 | +#define be16toh(x) bswap_16(x) |
| 13 | +#define betoh16(x) bswap_16(x) |
| 14 | +#define htobe32(x) bswap_32(x) |
| 15 | +#define be32toh(x) bswap_32(x) |
| 16 | +#define betoh32(x) bswap_32(x) |
| 17 | +#define htobe64(x) bswap_64(x) |
| 18 | +#define be64toh(x) bswap_64(x) |
| 19 | +#define betoh64(x) bswap_64(x) |
| 20 | +#define htobe128(x) bswap_128(x) |
| 21 | +#define be128toh(x) bswap_128(x) |
| 22 | +#define betoh128(x) bswap_128(x) |
| 23 | +#define htole16(x) (uint16_t)(x) |
| 24 | +#define le16toh(x) (uint16_t)(x) |
| 25 | +#define letoh16(x) (uint16_t)(x) |
| 26 | +#define htole32(x) (uint32_t)(x) |
| 27 | +#define le32toh(x) (uint32_t)(x) |
| 28 | +#define letoh32(x) (uint32_t)(x) |
| 29 | +#define htole64(x) (uint64_t)(x) |
| 30 | +#define le64toh(x) (uint64_t)(x) |
| 31 | +#define letoh64(x) (uint64_t)(x) |
| 32 | +#define htole128(x) (uint128_t)(x) |
| 33 | +#define le128toh(x) (uint128_t)(x) |
| 34 | +#define letoh128(x) (uint128_t)(x) |
29 | 35 | #else |
30 | | -#define htobe16(x) (uint16_t)(x) |
31 | | -#define be16toh(x) (uint16_t)(x) |
32 | | -#define betoh16(x) (uint16_t)(x) |
33 | | -#define htobe32(x) (uint32_t)(x) |
34 | | -#define be32toh(x) (uint32_t)(x) |
35 | | -#define betoh32(x) (uint32_t)(x) |
36 | | -#define htobe64(x) (uint64_t)(x) |
37 | | -#define be64toh(x) (uint64_t)(x) |
38 | | -#define betoh64(x) (uint64_t)(x) |
39 | | -#define htole16(x) bswap_16(x) |
40 | | -#define le16toh(x) bswap_16(x) |
41 | | -#define letoh16(x) bswap_16(x) |
42 | | -#define htole32(x) bswap_32(x) |
43 | | -#define le32toh(x) bswap_32(x) |
44 | | -#define letoh32(x) bswap_32(x) |
45 | | -#define htole64(x) bswap_64(x) |
46 | | -#define le64toh(x) bswap_64(x) |
47 | | -#define letoh64(x) bswap_64(x) |
| 36 | +#define htobe16(x) (uint16_t)(x) |
| 37 | +#define be16toh(x) (uint16_t)(x) |
| 38 | +#define betoh16(x) (uint16_t)(x) |
| 39 | +#define htobe32(x) (uint32_t)(x) |
| 40 | +#define be32toh(x) (uint32_t)(x) |
| 41 | +#define betoh32(x) (uint32_t)(x) |
| 42 | +#define htobe64(x) (uint64_t)(x) |
| 43 | +#define be64toh(x) (uint64_t)(x) |
| 44 | +#define betoh64(x) (uint64_t)(x) |
| 45 | +#define htobe128(x) (uint128_t)(x) |
| 46 | +#define be128toh(x) (uint128_t)(x) |
| 47 | +#define betoh128(x) (uint128_t)(x) |
| 48 | +#define htole16(x) bswap_16(x) |
| 49 | +#define le16toh(x) bswap_16(x) |
| 50 | +#define letoh16(x) bswap_16(x) |
| 51 | +#define htole32(x) bswap_32(x) |
| 52 | +#define le32toh(x) bswap_32(x) |
| 53 | +#define letoh32(x) bswap_32(x) |
| 54 | +#define htole64(x) bswap_64(x) |
| 55 | +#define le64toh(x) bswap_64(x) |
| 56 | +#define letoh64(x) bswap_64(x) |
| 57 | +#define htole128(x) bswap_128(x) |
| 58 | +#define le128toh(x) bswap_128(x) |
| 59 | +#define letoh128(x) bswap_128(x) |
48 | 60 | #endif |
49 | 61 |
|
50 | 62 | #endif /* COSMOPOLITAN_LIBC_BITS_NEWBIE_H_ */ |
0 commit comments