4 #include "config-host.h"
16 (((uint16_t)(__x) & (uint16_t)0x00ffU) << 8) | \
17 (((uint16_t)(__x) & (uint16_t)0xff00U) >> 8) )); \
24 (((uint32_t)(__x) & (uint32_t)0x000000ffUL) << 24) | \
25 (((uint32_t)(__x) & (uint32_t)0x0000ff00UL) << 8) | \
26 (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \
27 (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) )); \
34 (uint64_t)(((uint64_t)(__x) & (uint64_t)0x00000000000000ffULL) << 56) | \
35 (uint64_t)(((uint64_t)(__x) & (uint64_t)0x000000000000ff00ULL) << 40) | \
36 (uint64_t)(((uint64_t)(__x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \
37 (uint64_t)(((uint64_t)(__x) & (uint64_t)0x00000000ff000000ULL) << 8) | \
38 (uint64_t)(((uint64_t)(__x) & (uint64_t)0x000000ff00000000ULL) >> 8) | \
39 (uint64_t)(((uint64_t)(__x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \
40 (uint64_t)(((uint64_t)(__x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \
41 (uint64_t)(((uint64_t)(__x) & (uint64_t)0xff00000000000000ULL) >> 56) )); \
44 #endif /* !HAVE_BYTESWAP_H */
46 #if defined(__alpha__) || defined (__ia64__)
47 #define HOST_LONG_BITS 64
49 #define HOST_LONG_BITS 32
52 #define HOST_LONG_SIZE (HOST_LONG_BITS / 8)
54 static inline uint16_t bswap16(uint16_t x
)
59 static inline uint32_t bswap32(uint32_t x
)
64 static inline uint64_t bswap64(uint64_t x
)
69 static inline void bswap16s(uint16_t *s
)
74 static inline void bswap32s(uint32_t *s
)
79 static inline void bswap64s(uint64_t *s
)