delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/04/16/03:36:43

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: Alignment of Variables
16 Apr 1998 03:36:43 -0700 :
Message-ID: <Pine.SUN.3.93.980415172144.19503B-100000.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <00A877F500000002*@MHS>
Mime-Version: 1.0
To: Thomas DOT Irlet AT x400 DOT gr DOT admin DOT ch
Cc: gnu-win32 AT cygnus DOT com

On 14 Apr 1998 Thomas DOT Irlet AT x400 DOT gr DOT admin DOT ch wrote:

> I am using EGCS V1.0 with the MINGW32 Headers. Now I have a problem wi
> th the alignment of variables in the structure "BITMAPFILEHEADER". The
>  structure is defined as
>  
> typedef struct tagBITMAPFILEHEADER {
>  WORD     bfType;
>  DWORD  bfSize;
>  WORD     bfReserved1;
>  WORD     bfReserved2;
>  DWORD  bfOffBits;
> } BITMAPFILEHEADER;

The egcs-1.0.2 for mingw32/cygwin32 has the packed attribute (can't
remember who sent in the fix -- Earnie was it?).


typedef struct tagBITMAPFILEHEADER {
  ...
} __attribute__((packed)) BITMAPFILEHEADER;

Please try it out.

btw, there have lots of fixes to the headers supplied with egcs-1.0.2,
so you should definitely consider upgrading.

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019