Mail Archives: djgpp/1997/11/14/02:16:14
On 13 Nov 1997 18:40:36 GMT in comp.os.msdos.djgpp Johan Levin <johan AT technologist DOT com> wrote:
: In this case all elements of the structure becomes
: dword-aligned. That might be good for speed, but
: I'm trying to read the header of a file that doesn't
: align it's fields like this. Is it possible to disable
: this aligning for a structure?
Please refer to section 22.9 of the FAQ; it explains this in depth.
Briefly, you need to use the __attribute__ system to tell gcc to
`pack' the struct, i.e. remove all the padding.
--
Regards,
george DOT foot AT merton DOT oxford DOT ac DOT uk
- Raw text -