Subject: Re: cross-cygwin32; alignement problems
To: None <arto.huusko@utu.fi, tech-pkg@netbsd.org>
From: TAMURA Kent <kent@hauN.org>
List: tech-pkg
Date: 10/10/2001 13:51:35
In message "Re: cross-cygwin32; alignement problems"
    on 01/10/03, Arto Huusko <arto.huusko@utu.fi> writes:
> > To be usefull, the cross compiler needs to honour #pragma pack(push),
> > #pragma pack(<number>) and #pragma pack(pop).
> 
> Apparently the i386-cygwin32 cross-compiler does not honour it. It
> works just fine with the real cygwin's compiler (gcc 2.95.something).

The i386-cygwin32 is based on egcs-1.1.1, which does not support
"#pragma pack".  The resolution of the problem is
  - Adding "__attribute__((packed))" to each structure as Martin wrote, or
  - Upgrading to gcc-2.95.x.

The i386-netbsdpe is based on gcc-2.95.2 and it has no problem
on structure packing.

-- 
TAMURA Kent <kent@hauN.org> <kent@netbsd.org>