From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9674 invoked by alias); 10 Jan 2008 10:07:02 -0000 Received: (qmail 9536 invoked by uid 22791); 10 Jan 2008 10:07:01 -0000 X-Spam-Check-By: sourceware.org Received: from smtp2-v.fe.bosch.de (HELO smtp2-v.fe.bosch.de) (139.15.237.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 Jan 2008 10:06:36 +0000 Received: from vsmta1.fe.internet.bosch.com (unknown [10.4.98.30]) by imta5.fe.bosch.de (Postfix) with ESMTP id DE8CA3C00C for ; Thu, 10 Jan 2008 11:06:32 +0100 (CET) Received: from si-imc02.de.bosch.com (vsgw1.fe.internet.bosch.com [10.4.98.15]) by vsmta1.fe.internet.bosch.com (Postfix) with ESMTP id BDC1AF98007 for ; Thu, 10 Jan 2008 11:06:32 +0100 (CET) Received: from si-mail07.de.bosch.com ([10.3.2.166]) by si-imc02.de.bosch.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 10 Jan 2008 11:06:32 +0100 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 10 Jan 2008 10:07:00 -0000 Message-ID: In-Reply-To: References: <015801c85322$bf2055e0$887ba8c0@PAULD> From: "EXTERNAL Gladis Olaf (Praktikant; CR/AEM)" To: , "Paul D. DeRocco" Cc: X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: RE: [ECOS] Re: pragma pack X-SW-Source: 2008-01/txt/msg00039.txt.bz2 =20 -----Original Message----- From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Alexandre Sent: Donnerstag, 10. Januar 2008 10:43 To: Paul D. DeRocco Cc: ecos-discuss@ecos.sourceware.org Subject: Re: [ECOS] Re: pragma pack > Actually i had some problems accessing my packed structures without > flows, I think that may help resolve things a bit. > Eg with things like that: >=20 > cyg_uint8 i =3D 0; > struct s_pelco_pattern_array a; >=20 > a.command2_byte =3D i++; > a.data3 =3D i++; > a.data4 =3D i++; > a.timestamp =3D i; >=20 > I finish having a structure which looks like this in memory: >=20 > cm2: 0x00 > data3: 0x01 > data4: 0x02 > ts: 0x0300 >=20 > Which is really not what i want to have eventually. >=20 I would say this looks correct. Maybe you thought there must be 0x0003 in the last one? But if you have a little endian CPU it swaps the bytes. If you have more questions about Endianness take a look at http://en.wikipedia.org/wiki/Endianness Greets olaf -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss