Mail Archives: cygwin/1996/11/10/06:55:30
Wizard Julian writes anno domini 1996:
>
> Does anyone have any input on why 16 bytes from gnu-win32 and
> 14 for other compiler
> --- On Sat, 09 Nov 1996 22:08:23 +0000 Julian Smart
> <julian DOT smart AT ukonline DOT co DOT uk> wrote:
> VC++ version is:
>
> >typedef struct tagBITMAPFILEHEADER {
> > WORD bfType;
> > DWORD bfSize;
> > WORD bfReserved1;
> > WORD bfReserved2;
> > DWORD bfOffBits;
> >} BITMAPFILEHEADER, FAR *LPBITMAPFILEHEADER, *PBITMAPFILEHEADER;
>
> WORD is 16 bits=2 bytes, DWORD is 32 bits=4 bytes, so this is
>
You are lost my dear friends. The solution to this riddle is easy: it is
called
>>>>> ALIGNMENT <<<<<<<
This evil monster lurks behind the devilish gcc compiler, adding HIDDEN
alignment bits to structures, to make gary and friends crash. To stop it,
the good creators of gcc have forethought of a logical incantation formula,
to be repeated at compilation time. Sorry, but my feeble intellect didn't
thought that it would useful to remember it by heart, so I can't tell you
WHAT spell you have to repeat to make that monster go away...
>
> but I can't imagine those types (WORD and DWORD) are anything but 2 and 4 bytes.
>
> Strange.
>
> Julian
Yes indeed... But be fearless. Help is at hand!
--
Jacob Navia Logiciels/Informatique
41 rue Maurice Ravel Tel (1) 48.23.51.44
93430 Villetaneuse Fax (1) 48.23.95.39
France
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -