[ECOS] structure size
Gary Thomas
gary@mlbassoc.com
Mon Jan 5 04:22:00 GMT 2004
On Sun, 2004-01-04 at 20:21, Aravind B wrote:
> hi,
> i have used structure whhich has char short int as its member.
> if i take its sizeof it is giving me some extra bytes.
> is there any soln to get rid of it.
Try using packed attributes.
struct xyz {
...
} __attribute__ ((aligned(1), packed));
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list