Date: Wed, 9 May 2007 19:59:37 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Julian Elischer <julian@elischer.org> Cc: Kostik Belousov <kostikbel@gmail.com>, Hans Petter Selasky <hselasky@c2i.net>, Giorgos Keramidas <keramida@FreeBSD.org>, freebsd-arch@FreeBSD.org Subject: Re: Missing LIST_PREV() ? Message-ID: <20070509194746.F56462@besplex.bde.org> In-Reply-To: <4640F0EE.2080206@elischer.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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070509194746.F56462>