From owner-freebsd-arch@FreeBSD.ORG Wed May 9 09:59:40 2007 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7957616A404; Wed, 9 May 2007 09:59:40 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1-3.pacific.net.au [61.8.2.210]) by mx1.freebsd.org (Postfix) with ESMTP id 3E9B113C455; Wed, 9 May 2007 09:59:40 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id C43235AFFCC; Wed, 9 May 2007 19:59:38 +1000 (EST) Received: from besplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id A3D668C3F; Wed, 9 May 2007 19:59:37 +1000 (EST) Date: Wed, 9 May 2007 19:59:37 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Julian Elischer In-Reply-To: <4640F0EE.2080206@elischer.org> Message-ID: <20070509194746.F56462@besplex.bde.org> References: <200705051617.34162.hselasky@c2i.net> <20070507202034.GA80846@kobe.laptop> <20070507202517.GA88340@kobe.laptop> <200705081128.25708.jhb@freebsd.org> <20070508211714.GQ83173@deviant.kiev.zoral.com.ua> <4640F0EE.2080206@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Kostik Belousov , Hans Petter Selasky , Giorgos Keramidas , freebsd-arch@FreeBSD.org Subject: Re: Missing LIST_PREV() ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2007 09:59:40 -0000 On Tue, 8 May 2007, Julian Elischer wrote: > Kostik Belousov wrote: >> On Tue, May 08, 2007 at 11:28:25AM -0400, John Baldwin wrote: >>> I'm not sure how portable offsetof() would be though. In general if you >>> want >> >> offsetof() itself is defined by C standard to be present both in >> freestanding and hosted environment (and be available by stddef.h). > > You learn something every day! interesting (but still scary).. Quite a lot of standard headers are required to be present in freestanding environments: float.h, iso646.h, limits.h, stdarg.g, stdbool.h, stddef.h and stdint.h. Of course, these aren't required to have their usual extensions and pollution (e.g., POSIX limits in limits.h), but just things like INT_MAX which don't depend on the library. offsetof() isn't usable in sys/queue.h, but sys/queue.h already uses the equivalent __offsetof() for similar purposes. Bruce