From owner-freebsd-current@FreeBSD.ORG Mon Nov 13 04:30:37 2006 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5419E16A403 for ; Mon, 13 Nov 2006 04:30:37 +0000 (UTC) (envelope-from andrew@areilly.bpa.nu) Received: from omta01ps.mx.bigpond.com (omta01ps.mx.bigpond.com [144.140.82.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B6AE43D46 for ; Mon, 13 Nov 2006 04:30:36 +0000 (GMT) (envelope-from andrew@areilly.bpa.nu) Received: from oaamta01ps.mx.bigpond.com ([141.168.2.3]) by omta01ps.mx.bigpond.com with ESMTP id <20061113043035.EMMZ24786.omta01ps.mx.bigpond.com@oaamta01ps.mx.bigpond.com> for ; Mon, 13 Nov 2006 04:30:35 +0000 Received: from areilly.bpa.nu ([141.168.2.3]) by oaamta01ps.mx.bigpond.com with ESMTP id <20061113043035.CISZ13696.oaamta01ps.mx.bigpond.com@areilly.bpa.nu> for ; Mon, 13 Nov 2006 04:30:35 +0000 Received: (qmail 80213 invoked by uid 501); 13 Nov 2006 04:27:29 -0000 Date: Mon, 13 Nov 2006 15:27:29 +1100 From: Andrew Reilly To: Ruslan Ermilov Message-ID: <20061113042729.GA79796@duncan.reilly.home> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061112232854.GC45238@rambler-co.ru> User-Agent: Mutt/1.4.2.2i X-Mailman-Approved-At: Mon, 13 Nov 2006 05:23:16 +0000 Cc: current@FreeBSD.org, Joseph Koshy , keramida@FreeBSD.org, arm@FreeBSD.org, "M. Warner Losh" Subject: Re: [head tinderbox] failure on arm/arm X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 04:30:37 -0000 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