Subject: Re: fallout from use of u_int32_t in i386
To: None <mike.long@analog.com>
From: J.T. Conklin <jconklin@netcom.com>
List: current-users
Date: 05/06/1996 18:05:42
> I had to fix some files in order to get my system to build after
> /sys/arch/i386/include/endian.h was changed to use u_int{16,32}_t
> in the [hn]to[nh][sl]() macros.  It is now necessary to #include
> <sys/types.h> before <machine/endian.h> on the i386.  Some of the
> affected files (the ones I remember) were:

Bleh.  

Changing htonl() and friends to use fixed sized was clearly the right
thing to do, but we should have checked for standards/prior art before
it was done.  Since this is usually my domain, I take responsibility.

XPG4.2 declares the types of these functions to be in_port_t and
in_addr_t.  in_port_t is a "Unsigned integral type of exactly 16 bits"
and in_addr_t is a "Unsigned integral type of exactly 32 bits.  Both
types are to be defined in netinet/in.h and arpa/inet.h.

Since machine/endian.h is a machine dependent header, I think we can
safely define the in_addr_t / in_port_t types without reference to 
u_int{16,32}.

	--jtc