From owner-freebsd-current Fri Oct 27 0:12:23 2000 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id B112537B4CF for ; Fri, 27 Oct 2000 00:12:18 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id SAA04146; Fri, 27 Oct 2000 18:12:03 +1100 Date: Fri, 27 Oct 2000 18:11:51 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Brian Somers Cc: kargl@apl.washington.edu, freebsd-current@FreeBSD.ORG Subject: Re: more endian.h breakage; patch included. In-Reply-To: <200010181846.e9IIkZY00872@hak.lan.Awfulhak.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 '' is > the cleanest solution.... Except this isn't backwards compatible and there is no reason to put it in . Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message