Subject: Re: FW: Re: wxwin port
From: [email-masked] (root)

10 Nov 1996 06:55:30 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Content-Type: text
Original-To: [email-masked] (Keith Gary Boyce)
Original-Cc: [email-masked]
In-Reply-To: <[email-masked]> from "Keith Gary Boyce" at Nov 10, 96 02:32:01 am
Content-Length: 1405      
Original-Sender: [email-masked]

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 
> <[email-masked]> 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
"[email-masked]" with one line of text: "help".