Rev 2003 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2003 | Rev 2057 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | 37 | ||
38 | #include <byteorder.h> |
38 | #include <byteorder.h> |
39 | 39 | ||
40 | #ifdef BIG_ENDIAN |
40 | #ifdef BIG_ENDIAN |
41 | 41 | ||
42 | #define uint32_t_le2host(n) uint64_t_byteorder_swap(n) |
42 | #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) |
43 | #define uint64_t_le2host(n) uint32_t_byteorder_swap(n) |
43 | #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) |
44 | 44 | ||
45 | #define uint32_t_be2host(n) (n) |
45 | #define uint32_t_be2host(n) (n) |
46 | #define uint64_t_be2host(n) (n) |
46 | #define uint64_t_be2host(n) (n) |
47 | 47 | ||
48 | #else |
48 | #else |
49 | 49 | ||
50 | #define uint32_t_le2host(n) (n) |
50 | #define uint32_t_le2host(n) (n) |
51 | #define uint64_t_le2host(n) (n) |
51 | #define uint64_t_le2host(n) (n) |
52 | 52 | ||
53 | #define uint32_t_be2host(n) uint64_t_byteorder_swap(n) |
53 | #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) |
54 | #define uint64_t_be2host(n) uint32_t_byteorder_swap(n) |
54 | #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) |
55 | 55 | ||
56 | #endif |
56 | #endif |
57 | 57 | ||
58 | #endif |
58 | #endif |
59 | 59 |