12 #if TARGET_win32 || TARGET_win64 13 #define __BYTE_ORDER __LITTLE_ENDIAN 14 inline uint16_t __bswap_16(uint16_t v){
16 const char* sp = (
const char*)&v;
24 inline uint32_t __bswap_32(uint32_t v){
26 const char* sp = (
const char*)&v;
36 inline uint64_t __bswap_64(uint64_t v){
38 const char* sp = (
const char*)&v;
58 # if __BYTE_ORDER == __LITTLE_ENDIAN 59 # define htobe16(x) __bswap_16 (x) 60 # define htole16(x) (x) 61 # define be16toh(x) __bswap_16 (x) 62 # define le16toh(x) (x) 64 # define htobe32(x) __bswap_32 (x) 65 # define htole32(x) (x) 66 # define be32toh(x) __bswap_32 (x) 67 # define le32toh(x) (x) 69 # define htobe64(x) __bswap_64 (x) 70 # define htole64(x) (x) 71 # define be64toh(x) __bswap_64 (x) 72 # define le64toh(x) (x) 74 # define htobe16(x) (x) 75 # define htole16(x) __bswap_16 (x) 76 # define be16toh(x) (x) 77 # define le16toh(x) __bswap_16 (x) 79 # define htobe32(x) (x) 80 # define htole32(x) __bswap_32 (x) 81 # define be32toh(x) (x) 82 # define le32toh(x) __bswap_32 (x) 84 # define htobe64(x) (x) 85 # define htole64(x) __bswap_64 (x) 86 # define be64toh(x) (x) 87 # define le64toh(x) __bswap_64 (x) 92 const char* sp = (
const char*)s;
99 const char* sp = (
const char*)s;
107 const char* sp = (
const char*)s;
117 const char* sp = (
const char*)s;
130 void bswap_copy(
int swap,
const void* src,
void* dst,
BUInt32 nBytes,
const char* swapType);
#define htobe16(x)
Definition: BEndian.h:59
uint16_t htole(uint16_t v)
Definition: BEndian.h:133
void bswap_p8(const void *s, void *d)
Definition: BEndian.h:91
uint16_t betoh(uint16_t v)
Definition: BEndian.h:279
#define le16toh(x)
Definition: BEndian.h:62
#define le64toh(x)
Definition: BEndian.h:72
#define le32toh(x)
Definition: BEndian.h:67
void bswap_copy(int swap, const void *src, void *dst, BUInt32 nBytes, const char *swapType)
Definition: BEndian.cpp:9
#define htole64(x)
Definition: BEndian.h:70
uint32_t BUInt32
Definition: BTypes.h:21
#define htobe64(x)
Definition: BEndian.h:69
#define be32toh(x)
Definition: BEndian.h:66
#define be64toh(x)
Definition: BEndian.h:71
#define htobe32(x)
Definition: BEndian.h:64
void bswap_p32(const void *s, void *d)
Definition: BEndian.h:106
#define htole32(x)
Definition: BEndian.h:65
#define be16toh(x)
Definition: BEndian.h:61
void bswap_p16(const void *s, void *d)
Definition: BEndian.h:98
uint16_t htobe(uint16_t v)
Definition: BEndian.h:181
void bswap_p64(const void *s, void *d)
Definition: BEndian.h:116
#define htole16(x)
Definition: BEndian.h:60
uint16_t letoh(uint16_t v)
Definition: BEndian.h:230