10 #ifndef ENDIAN_FUNC_HPP
11 #define ENDIAN_FUNC_HPP
17 #if TTD_ENDIAN == TTD_BIG_ENDIAN
18 # define FROM_BE16(x) (x)
19 # define FROM_BE32(x) (x)
20 # define TO_BE16(x) (x)
21 # define TO_BE32(x) (x)
22 # define TO_BE32X(x) (x)
23 # define FROM_LE16(x) BSWAP16(x)
24 # define FROM_LE32(x) BSWAP32(x)
25 # define TO_LE16(x) BSWAP16(x)
26 # define TO_LE32(x) BSWAP32(x)
27 # define TO_LE32X(x) BSWAP32(x)
29 # define FROM_BE16(x) BSWAP16(x)
30 # define FROM_BE32(x) BSWAP32(x)
31 # define TO_BE16(x) BSWAP16(x)
32 # define TO_BE32(x) BSWAP32(x)
33 # define TO_BE32X(x) BSWAP32(x)
34 # define FROM_LE16(x) (x)
35 # define FROM_LE32(x) (x)
36 # define TO_LE16(x) (x)
37 # define TO_LE32(x) (x)
38 # define TO_LE32X(x) (x)
Functions related to bit mathematics.
Definition of various endian-dependant macros.