Subject: uint32_t & u_int32_t
To: None <current-users@netbsd.org>
From: Masao Uebayashi <uebayasi@pultek.co.jp>
List: current-users
Date: 12/17/2002 14:37:28
Hello,

I found usages of uint32 & u_int32_t are inconsistent in our source.
In endian.h, ntohl(3) is declared as

	__BEGIN_DECLS
	uint32_t	htonl __P((uint32_t)) __attribute__((__const__));
	uint16_t	htons __P((uint16_t)) __attribute__((__const__));
	uint32_t	ntohl __P((uint32_t)) __attribute__((__const__));
	uint16_t	ntohs __P((uint16_t)) __attribute__((__const__));
	__END_DECLS

OTOH the manual page says

	in_addr_t
	ntohl(in_addr_t net32);

	(...)

	These routines convert 16 and 32 bit quantities between
	network byte or- der and host byte order. The types in_addr_t
	and in_port_t are defined by X/Open as:

		typedef u_int32_t in_addr_t;
		typedef u_int16_t in_port_t;

Regards,
Masao