Mail Archives: cygwin/1998/04/15/07:14:57.1
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;
My problem was now, that the compiler aligns all variables to their na
tural boundaries, that is WORD to wordbouderies, DWORD to longbounderi
es. To achieve this, a dummy WORD is inserted after bfType. To read in
a BMP-file, this scrambles the whole header.
What can I do to prevent the compiler to "optimize" this structures. A
re there any "PRAGMA"'s, that could be used. A compilerswitch is not s
o preferable, because in this case, very structure stays unoptimized.
Thanks for any tip
Thomas Irlet
-
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 -