On Wed, 18 Oct 2000, Brian Somers wrote:

> > On Mon, 16 Oct 2000, Brian Somers wrote:
> > > ntohl() & ntonl() were previously wrong to return u_long.
> > 
> > Not wrong.  They have always been documented to return u_long.
> But if sizeof(u_long) != 4, this is wrong.

It's not best, but not wrong, since u_long is large enough to hold
all values of interest and the interfaces don't involve any pointers.

[... lots deleted]

> I think the best way forward is to prototype things in terms of 
> in_addr_t and in_port_t and to leave them as inlines for __GNUC__ 
> (I don't know where other compilers are supposed to get this 
> functionality).

I agree.

> I think we should *not* include sys/types.h and should leave all of 
> the sys/types.h additions that I've done to files that include 
> sys/wait.h, but this idea conflicts with all other endian.h files 
> (both ours and {Net,Open}BSDs), and is probably wrong in that 
> requiring sys/anything for machine/anything is probably not too good.

Just define in_addr_t and in_port_t in terms of basic types, like we
already do for int32_t, etc.

> Maybe the NetBSD way of moving machine/endian.h to sys/endian.h and 
> having machine/endian.h as a simple ``#include <sys/endian.h>'' is 
> the cleanest solution....

Except this isn't backwards compatible and there is no reason to put it
in <sys>.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to