diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-04-04 03:05:38 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-04-04 03:05:38 +0000 |
commit | 070270753eb548ade327461eeabe1385897dd253 (patch) | |
tree | d6302609fa972f49c304a6c5b4440c178da886d1 /sys/arch/mvme88k | |
parent | acb1068371a2e2eb0b7cd006968611ceda63862a (diff) |
Define in_addr_t and in_port_t everywhere but use u_intXX_t for
htonl and friends.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/include/endian.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/arch/mvme88k/include/endian.h b/sys/arch/mvme88k/include/endian.h index de4a384a294..c5e61bd0620 100644 --- a/sys/arch/mvme88k/include/endian.h +++ b/sys/arch/mvme88k/include/endian.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)endian.h 8.1 (Berkeley) 6/11/93 - * $Id: endian.h,v 1.4 1997/03/03 20:20:58 rahnds Exp $ + * $Id: endian.h,v 1.5 1997/04/04 03:05:32 millert Exp $ */ #ifndef _ENDIAN_H_ @@ -57,11 +57,14 @@ #include <sys/cdefs.h> +typedef u_int32_t in_addr_t; +typedef u_int16_t in_port_t; + __BEGIN_DECLS -unsigned long htonl __P((unsigned long)); -unsigned short htons __P((unsigned short)); -unsigned long ntohl __P((unsigned long)); -unsigned short ntohs __P((unsigned short)); +u_int32_t htonl __P((u_int32_t)); +u_int16_t htons __P((u_int16_t)); +u_int32_t ntohl __P((u_int32_t)); +u_int16_t ntohs __P((u_int16_t)); __END_DECLS /* @@ -80,10 +83,10 @@ __END_DECLS #else -#define NTOHL(x) (x) = ntohl((u_long)x) -#define NTOHS(x) (x) = ntohs((u_short)x) -#define HTONL(x) (x) = htonl((u_long)x) -#define HTONS(x) (x) = htons((u_short)x) +#define NTOHL(x) (x) = ntohl((u_int32_t)x) +#define NTOHS(x) (x) = ntohs((u_int16_t)x) +#define HTONL(x) (x) = htonl((u_int32_t)x) +#define HTONS(x) (x) = htons((u_int16_t)x) #endif #endif /* ! _POSIX_SOURCE */ #endif /* !_ENDIAN_H_ */ |