Mail Archives: djgpp/1996/06/14/03:03:15
In article <199606111539 DOT IAA08233 AT netcom9 DOT netcom DOT com>, elf AT netcom DOT com (Marc Singer) writes:
> There is a design flaw in the BMP file format. They chose to misalign
> the BMPFILE structure such that the first WORD which contains the
> letters "BM" can cause the rest of the structure to be offset by two
> bytes. The latest GNU C compiler (I believe) does not handle the
> alignment attribute correctly, so you have to either write the first
> two bytes and then the rest of the structure, or you may need to
> switch compilers.
Or litter your code with __attribute__ ((packed)) like I've been doing lately.
I don't suppose there's an -fall_structs_packed that I missed?
--
Mark H. Wood, Lead Systems Programmer +1 317 274 0749 [@disclaimer@]
Internet: MWOOD AT INDYVAX DOT IUPUI DOT EDU BITNET: MWOOD AT INDYVAX
Trapped in a world he never made.
- Raw text -