From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KYLna-0000QN-TC for qemu-devel@nongnu.org; Wed, 27 Aug 2008 10:15:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KYLnY-0000PI-7P for qemu-devel@nongnu.org; Wed, 27 Aug 2008 10:15:02 -0400 Received: from [199.232.76.173] (port=49502 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYLnX-0000P9-S4 for qemu-devel@nongnu.org; Wed, 27 Aug 2008 10:14:59 -0400 Received: from bsdimp.com ([199.45.160.85]:50481 helo=harmony.bsdimp.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KYLnX-00049t-Dp for qemu-devel@nongnu.org; Wed, 27 Aug 2008 10:14:59 -0400 Date: Wed, 27 Aug 2008 08:12:18 -0600 (MDT) Message-Id: <20080827.081218.843649315.imp@bsdimp.com> Subject: Re: [Qemu-devel] [patch] add byteordered types From: "M. Warner Losh" In-Reply-To: <48B550F3.709@redhat.com> References: <48B53E23.5040107@redhat.com> <200808271320.23183.paul@codesourcery.com> <48B550F3.709@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kraxel@redhat.com In message: <48B550F3.709@redhat.com> Gerd Hoffmann writes: : Paul Brook wrote: : > On Wednesday 27 August 2008, Gerd Hoffmann wrote: : >> +typedef struct { uint16_t le; } le16; : > : > This won't do what you expect on some targets. In particular older ARM targets : > align all structs to a word (4-byte) boundary. : : Is this a default which can be changed by adding alignment atttributes? : Or is it done unconditionally? packed and alignment attributes. Warner