From 765a8fac94fece34cead0bd03f89bdb1b8c43da6 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Wed, 17 May 2023 16:49:25 +0200 Subject: endian.h: Use POSIX names instead old BSD names --- include/compat/endian.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/compat/endian.h b/include/compat/endian.h index ca3465d..d9f7eb2 100644 --- a/include/compat/endian.h +++ b/include/compat/endian.h @@ -50,24 +50,24 @@ #if defined(__APPLE__) && !defined(HAVE_ENDIAN_H) #include -#define betoh16(x) OSSwapBigToHostInt16((x)) +#define be16toh(x) OSSwapBigToHostInt16((x)) #define htobe16(x) OSSwapHostToBigInt16((x)) -#define betoh32(x) OSSwapBigToHostInt32((x)) +#define be32toh(x) OSSwapBigToHostInt32((x)) #define htobe32(x) OSSwapHostToBigInt32(x) #define htole64(x) OSSwapHostToLittleInt64(x) #define htobe64(x) OSSwapHostToBigInt64(x) -#define letoh64(x) OSSwapLittleToHostInt64(x) -#define betoh64(x) OSSwapBigToHostInt64(x) +#define le64toh(x) OSSwapLittleToHostInt64(x) +#define be64toh(x) OSSwapBigToHostInt64(x) #endif /* __APPLE__ && !HAVE_ENDIAN_H */ #if defined(_WIN32) && !defined(HAVE_ENDIAN_H) #include -#define betoh16(x) ntohs((x)) +#define be16toh(x) ntohs((x)) #define htobe16(x) htons((x)) -#define betoh32(x) ntohl((x)) +#define be32toh(x) ntohl((x)) #define htobe32(x) ntohl((x)) -#define betoh64(x) ntohll((x)) +#define be64toh(x) ntohll((x)) #if !defined(ntohll) #define ntohll(x) ((1==htonl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32)) -- cgit v1.2.3-55-g6feb