--- embedaddon/iperf/src/portable_endian.h 2021/03/17 00:36:46 1.1.1.2 +++ embedaddon/iperf/src/portable_endian.h 2023/09/27 11:14:54 1.1.1.3 @@ -20,19 +20,8 @@ #elif defined(HAVE_SYS_ENDIAN_H) # include -# if defined(__OpenBSD__) +# if defined(__sgi) -# define be16toh(x) betoh16(x) -# define le16toh(x) letoh16(x) - -# define be32toh(x) betoh32(x) -# define le32toh(x) letoh32(x) - -# define be64toh(x) betoh64(x) -# define le64toh(x) letoh64(x) - -# elif defined(__sgi) - # include # include @@ -49,12 +38,12 @@ # define htole16(x) OSSwapHostToLittleInt16(x) # define be16toh(x) OSSwapBigToHostInt16(x) # define le16toh(x) OSSwapLittleToHostInt16(x) - + # define htobe32(x) OSSwapHostToBigInt32(x) # define htole32(x) OSSwapHostToLittleInt32(x) # define be32toh(x) OSSwapBigToHostInt32(x) # define le32toh(x) OSSwapLittleToHostInt32(x) - + # define htobe64(x) OSSwapHostToBigInt64(x) # define htole64(x) OSSwapHostToLittleInt64(x) # define be64toh(x) OSSwapBigToHostInt64(x) @@ -95,12 +84,12 @@ # define htole16(x) (x) # define be16toh(x) ntohs(x) # define le16toh(x) (x) - + # define htobe32(x) htonl(x) # define htole32(x) (x) # define be32toh(x) ntohl(x) # define le32toh(x) (x) - + # define htobe64(x) htonll(x) # define htole64(x) (x) # define be64toh(x) ntohll(x) @@ -113,12 +102,12 @@ # define htole16(x) __builtin_bswap16(x) # define be16toh(x) (x) # define le16toh(x) __builtin_bswap16(x) - + # define htobe32(x) (x) # define htole32(x) __builtin_bswap32(x) # define be32toh(x) (x) # define le32toh(x) __builtin_bswap32(x) - + # define htobe64(x) (x) # define htole64(x) __builtin_bswap64(x) # define be64toh(x) (x) @@ -173,4 +162,3 @@ #endif #endif -