1 /* 2 * Copyright 2022, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _OBSD_COMPAT_SYS_ENDIAN_H_ 6 #define _OBSD_COMPAT_SYS_ENDIAN_H_ 7 8 9 #include_next <sys/endian.h> 10 11 12 /* original BSD names */ 13 #define betoh16(x) be16toh(x) 14 #define betoh32(x) be32toh(x) 15 #define betoh64(x) be64toh(x) 16 #define letoh16(x) le16toh(x) 17 #define letoh32(x) le32toh(x) 18 #define letoh64(x) le64toh(x) 19 20 #define swap16(x) bswap16(x) 21 #define swap32(x) bswap32(x) 22 #define swap64(x) bswap64(x) 23 24 25 #endif /* _OBSD_COMPAT_SYS_ENDIAN_H_ */ 26