Diff for /embedaddon/iperf/src/portable_endian.h between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2021/03/17 00:36:46 version 1.1.1.3, 2023/09/27 11:14:54
Line 20 Line 20
 #elif defined(HAVE_SYS_ENDIAN_H)  #elif defined(HAVE_SYS_ENDIAN_H)
 #       include <sys/endian.h>  #       include <sys/endian.h>
   
#       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 <netinet/in.h>  #               include <netinet/in.h>
 #               include <inttypes.h>  #               include <inttypes.h>
   
Line 49 Line 38
 #       define htole16(x) OSSwapHostToLittleInt16(x)  #       define htole16(x) OSSwapHostToLittleInt16(x)
 #       define be16toh(x) OSSwapBigToHostInt16(x)  #       define be16toh(x) OSSwapBigToHostInt16(x)
 #       define le16toh(x) OSSwapLittleToHostInt16(x)  #       define le16toh(x) OSSwapLittleToHostInt16(x)
 
 #       define htobe32(x) OSSwapHostToBigInt32(x)  #       define htobe32(x) OSSwapHostToBigInt32(x)
 #       define htole32(x) OSSwapHostToLittleInt32(x)  #       define htole32(x) OSSwapHostToLittleInt32(x)
 #       define be32toh(x) OSSwapBigToHostInt32(x)  #       define be32toh(x) OSSwapBigToHostInt32(x)
 #       define le32toh(x) OSSwapLittleToHostInt32(x)  #       define le32toh(x) OSSwapLittleToHostInt32(x)
 
 #       define htobe64(x) OSSwapHostToBigInt64(x)  #       define htobe64(x) OSSwapHostToBigInt64(x)
 #       define htole64(x) OSSwapHostToLittleInt64(x)  #       define htole64(x) OSSwapHostToLittleInt64(x)
 #       define be64toh(x) OSSwapBigToHostInt64(x)  #       define be64toh(x) OSSwapBigToHostInt64(x)
Line 95 Line 84
 #               define htole16(x) (x)  #               define htole16(x) (x)
 #               define be16toh(x) ntohs(x)  #               define be16toh(x) ntohs(x)
 #               define le16toh(x) (x)  #               define le16toh(x) (x)
 
 #               define htobe32(x) htonl(x)  #               define htobe32(x) htonl(x)
 #               define htole32(x) (x)  #               define htole32(x) (x)
 #               define be32toh(x) ntohl(x)  #               define be32toh(x) ntohl(x)
 #               define le32toh(x) (x)  #               define le32toh(x) (x)
 
 #               define htobe64(x) htonll(x)  #               define htobe64(x) htonll(x)
 #               define htole64(x) (x)  #               define htole64(x) (x)
 #               define be64toh(x) ntohll(x)  #               define be64toh(x) ntohll(x)
Line 113 Line 102
 #               define htole16(x) __builtin_bswap16(x)  #               define htole16(x) __builtin_bswap16(x)
 #               define be16toh(x) (x)  #               define be16toh(x) (x)
 #               define le16toh(x) __builtin_bswap16(x)  #               define le16toh(x) __builtin_bswap16(x)
 
 #               define htobe32(x) (x)  #               define htobe32(x) (x)
 #               define htole32(x) __builtin_bswap32(x)  #               define htole32(x) __builtin_bswap32(x)
 #               define be32toh(x) (x)  #               define be32toh(x) (x)
 #               define le32toh(x) __builtin_bswap32(x)  #               define le32toh(x) __builtin_bswap32(x)
 
 #               define htobe64(x) (x)  #               define htobe64(x) (x)
 #               define htole64(x) __builtin_bswap64(x)  #               define htole64(x) __builtin_bswap64(x)
 #               define be64toh(x) (x)  #               define be64toh(x) (x)
Line 173 Line 162
 #endif  #endif
   
 #endif  #endif
   

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>