Blob


1 #include "config.h"
3 #if HAVE_ENDIAN_H
4 # include_next <endian.h>
5 #elif HAVE_SYS_ENDIAN_H
6 # include <sys/endian.h>
7 #else
8 # include <machine/endian.h>
9 # include <libkern/OSByteOrder.h>
11 # define htobe16(x) OSSwapHostToBigInt16(x)
12 # define htole16(x) OSSwapHostToLittleInt16(x)
13 # define be16toh(x) OSSwapBigToHostInt16(x)
14 # define le16toh(x) OSSwapLittleToHostInt16(x)
16 # define htobe32(x) OSSwapHostToBigInt32(x)
17 # define htole32(x) OSSwapHostToLittleInt32(x)
18 # define be32toh(x) OSSwapBigToHostInt32(x)
19 # define le32toh(x) OSSwapLittleToHostInt32(x)
21 # define htobe64(x) OSSwapHostToBigInt64(x)
22 # define htole64(x) OSSwapHostToLittleInt64(x)
23 # define be64toh(x) OSSwapBigToHostInt64(x)
24 # define le64toh(x) OSSwapLittleToHostInt64(x)
25 #endif