From owner-freebsd-arch Tue Oct 15 15:46:40 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3DC237B401; Tue, 15 Oct 2002 15:46:38 -0700 (PDT) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CB8D43E65; Tue, 15 Oct 2002 15:46:38 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.3/8.12.5) with ESMTP id g9FMkagQ007724 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 15 Oct 2002 18:46:37 -0400 (EDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.3/8.12.5/Submit) id g9FMka0o007721; Tue, 15 Oct 2002 18:46:36 -0400 (EDT) (envelope-from wollman) Date: Tue, 15 Oct 2002 18:46:36 -0400 (EDT) From: Garrett Wollman Message-Id: <200210152246.g9FMka0o007721@khavrinen.lcs.mit.edu> To: Poul-Henning Kamp Cc: net@FreeBSD.ORG, arch@FreeBSD.ORG Subject: RFC: eliminating the _IP_VHL hack. In-Reply-To: <60637.1034720233@critter.freebsd.dk> References: <60637.1034720233@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > In the meantime absolutely no code has picked up on this idea, It was copied in spirit from OSF/1. > The side effect of having some source-files using the _IP_VHL hack and > some not is that sizeof(struct ip) varies from file to file, Not so. Any compiler which allocates different amounts of storage to one eight-bit member versus two four-bit bitfield members is seriously broken (and would defeat the whole purpose). > I would therefore propose to eliminate the _IP_VHL hack from the kernel > to end this state of (potential) confusion, and invite comments to the > following patch: Much better to delete the bogus BYTE_ORDER kluge from ip.h. (Note that the definition of the bitfields in question has nothing whatsoever to do with the actual byte order in use; it simply relies on the historical behavior of compilers which allocated space for bitfields in BYTE_ORDER order.) -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message