Date: Mon, 13 Nov 2006 15:27:29 +1100 From: Andrew Reilly <andrew-freebsd@areilly.bpc-users.org> To: Ruslan Ermilov <ru@FreeBSD.org> Cc: current@FreeBSD.org, Joseph Koshy <jkoshy@FreeBSD.org>, keramida@FreeBSD.org, arm@FreeBSD.org, "M. Warner Losh" <imp@bsdimp.com> Subject: Re: [head tinderbox] failure on arm/arm Message-ID: <20061113042729.GA79796@duncan.reilly.home> In-Reply-To: <20061112232854.GC45238@rambler-co.ru> References: <20061112132105.6bac38d6@kan.dnsalias.net> <20061112192810.GC1173@rambler-co.ru> <4557825E.3070009@errno.com> <20061112.160539.-1350496508.imp@bsdimp.com> <20061112232854.GC45238@rambler-co.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 13, 2006 at 02:28:54AM +0300, Ruslan Ermilov wrote: > We don't have a lot of packed structs yet, and we should certainly > have more of them. :-) Well, packed structs is one (non-portable) way to work around the fact that C doesn't really support the use of structs for parsing external (wire, file) data structures. They're internal-use, abstract devices. If you want the code to be portable now and into the future, then you'll use accessor macros that access the byte-stream explicitly, to build larger data types. Won't even have to do anything special for endian-compatability, that way. Yes, I realize that that's not the /traditional way/, and that there's a hell of a lot of inappropriate struct code in there. Cheers, -- Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061113042729.GA79796>