From: jjf@dsbc.icl.co.uk (J.J.Farrell)
Subject: Re: FW: Re: wxwin port
10 Nov 1996 22:11:38 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199611102333.6951.0.cygnus.gnu-win32@dsbc.icl.co.uk>
Content-Type: text
Original-To: garp@opustel.com (Keith Gary Boyce)
Original-Cc: gnu-win32@cygnus.com
In-Reply-To: <Chameleon.847611180.garp@garp.worldnet.att.net> from "Keith Gary Boyce" at Nov 10, 96 02:32:01 am
X-Mailer: ELM [version 2.4 PL23]
Content-Length: 874       
Original-Sender: owner-gnu-win32@cygnus.com

> From: Keith Gary Boyce <garp@opustel.com>
> 
> Does anyone have any input on why 16 bytes from gnu-win32 and
> 14 for other compiler
> 
> >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
> 
> 3 * 2 + 2 * 4 = 14

The C language allows compilers to add padding between structure
members and at the end of a structure as they see fit. It looks
like the compilers you are using have different views on what is
fitting! You cannot portably determine the size of a structure
from the sizes of its members. The documentation should include
information on how the compiler does this padding.

Regards,
		jjf
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
