Rev 2794 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2794 | Rev 2797 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | */ |
33 | */ |
34 | 34 | ||
35 | #ifndef KERN_mips32_BYTEORDER_H_ |
35 | #ifndef KERN_mips32_BYTEORDER_H_ |
36 | #define KERN_mips32_BYTEORDER_H_ |
36 | #define KERN_mips32_BYTEORDER_H_ |
37 | 37 | ||
38 | #include <byteorder.h> |
- | |
39 | - | ||
40 | #ifdef BIG_ENDIAN |
38 | #ifdef BIG_ENDIAN |
41 | - | ||
42 | #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) |
- | |
43 | #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) |
- | |
44 | #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) |
- | |
45 | - | ||
46 | #define uint16_t_be2host(n) (n) |
- | |
47 | #define uint32_t_be2host(n) (n) |
- | |
48 | #define uint64_t_be2host(n) (n) |
39 | #define ARCH_IS_BIG_ENDIAN |
49 | - | ||
50 | #else |
40 | #else |
51 | - | ||
52 | #define uint16_t_le2host(n) (n) |
- | |
53 | #define uint32_t_le2host(n) (n) |
- | |
54 | #define uint64_t_le2host(n) (n) |
41 | #define ARCH_IS_LITTLE_ENDIAN |
55 | - | ||
56 | #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) |
- | |
57 | #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) |
- | |
58 | #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) |
- | |
59 | - | ||
60 | #endif |
42 | #endif |
61 | 43 | ||
62 | #endif |
44 | #endif |
63 | 45 | ||
64 | /** @} |
46 | /** @} |