This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Alignment of Variables


On 14 Apr 1998 Thomas.Irlet@x400.gr.admin.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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]