Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2000 19:44:33 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        kargl@apl.washington.edu, freebsd-current@FreeBSD.ORG
Subject:   Re: more endian.h breakage; patch included. 
Message-ID:  <Pine.BSF.4.21.0010161936340.2691-100000@besplex.bde.org>
In-Reply-To: <200010160739.e9G7dNY21088@hak.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 16 Oct 2000, Brian Somers wrote:

> > On Sun, 15 Oct 2000, Steven G. Kargl wrote:
> > 
> > > There is another patch needed in libdialog.
> > 
> > No patches are needed in applications; endian.h should be unbroken.
> 
> In what way ?

endian.h shouldn't depend on <sys/types.h> or include <sys/types.h> and
its associated namespace pollution.  It never did before.

> ntohl() & ntonl() were previously wrong to return u_long.

Not wrong.  They have always been documented to return u_long.

> They now return uint32_t (which requires sys/types.h).

In NetBSD and in FreeBSD for all arches except i386's they return 
in_addr_t which happens to be u_int32_t.

> They *could* be changed to return u_int32_t, but this doesn't seem to 
> be the best way forward.

I agree that it's not the best way forward, but u_int32_t is traditional
namespace pollution in <sys/types.h>, so using it is safer than using
uint32_t.

> They *could* be changed to return unsigned, but I think this is worse 
> than u_int32_t.

It is no different for an arch where unsigned is u_int32_t (both conflict
with the man page :-).

Bruce



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0010161936340.2691-100000>