From: root AT jacob DOT remcomp DOT fr (root) Subject: Re: FW: Re: wxwin port 10 Nov 1996 06:55:30 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: Content-Type: text Original-To: garp AT opustel DOT com (Keith Gary Boyce) Original-Cc: gnu-win32 AT cygnus DOT com In-Reply-To: from "Keith Gary Boyce" at Nov 10, 96 02:32:01 am Content-Length: 1405 Original-Sender: owner-gnu-win32 AT cygnus DOT com 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 > 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".