From 67fb342b086501f95fdadb3cf69ff9abb7a714e7 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 15 Jan 2001 13:16:59 +0000 Subject: Makeheader files be more like GNU --- include/netinet/in.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include/netinet/in.h') diff --git a/include/netinet/in.h b/include/netinet/in.h index 0fc347a4c..07b7193e5 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -223,8 +223,6 @@ struct ipv6_mreq /* Get system-specific definitions. */ #include -#include -#include /* Functions to convert between host and network byte order. @@ -233,6 +231,16 @@ struct ipv6_mreq this was a short-sighted decision since on different systems the types may have different representations but the values are always the same. */ +extern uint32_t ntohl __P ((uint32_t __netlong)); +extern uint16_t ntohs __P ((uint16_t __netshort)); +extern uint32_t htonl __P ((uint32_t __hostlong)); +extern uint16_t htons __P ((uint16_t __hostshort)); + +#include + +/* Get machine dependent optimized versions of byte swapping functions. */ +#include + #if __BYTE_ORDER == __BIG_ENDIAN /* The host byte order is the same as network byte order, so these functions are all just identity. */ @@ -246,8 +254,6 @@ struct ipv6_mreq # define ntohs(x) __bswap_16 (x) # define htonl(x) __bswap_32 (x) # define htons(x) __bswap_16 (x) -# else -# error "What kind of system is this?" # endif #endif -- cgit v1.2.3