xhost + # Workaround for: QXcbConnection: Could not connect to display :0
[appimagekit.git] / light_byteswap.h
blob6fe5c7c10aa90ff912134bb9d73a82bb41ea517a
1 #ifndef LIGHT_BYTESWAP
2 #define LIGHT_BYTESWAP
4 #define bswap_16(value) \
5 ((((value) & 0xff) << 8) | ((value) >> 8))
7 #define bswap_32(value) \
8 (((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
9 (uint32_t)bswap_16((uint16_t)((value) >> 16)))
11 #define bswap_64(value) \
12 (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \
13 << 32) | \
14 (uint64_t)bswap_32((uint32_t)((value) >> 32)))
16 #endif