include:endian.h add openbsd style
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
9ad75fd95d
commit
21934122d5
@ -137,4 +137,21 @@
|
||||
# define le64toh(n) (n)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* OpenBSD style */
|
||||
|
||||
#define swap16 __swap_uint16
|
||||
#define swap32 __swap_uint32
|
||||
#define swap64 __swap_uint64
|
||||
|
||||
#define betoh16 be16toh
|
||||
#define letoh16 le16toh
|
||||
#define betoh32 be32toh
|
||||
#define letoh32 le32toh
|
||||
|
||||
#ifdef CONFIG_HAVE_LONG_LONG
|
||||
#define betoh64 be64toh
|
||||
#define letoh64 le64toh
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_ENDIAN_H */
|
||||
|
Loading…
Reference in New Issue
Block a user