Mail Archives: cygwin-developers/1999/09/20/00:50:36
Hello,
According to MS winnt.h several structures declared in there should be
aligned to 2 bytes.
Patch follows.
Vadim.
--- include/winnt.h.orig Mon Sep 20 08:14:19 1999
+++ include/winnt.h Mon Sep 20 08:39:33 1999
@@ -1563,4 +1563,5 @@ typedef struct _IMAGE_ROM_OPTIONAL_HEADE
DWORD GpValue;
} IMAGE_ROM_OPTIONAL_HEADER,*PIMAGE_ROM_OPTIONAL_HEADER;
+#pragma pack(push,2)
typedef struct _IMAGE_DOS_HEADER {
WORD e_magic;
@@ -1616,4 +1617,5 @@ typedef struct _IMAGE_OS2_HEADER {
WORD ne_expver;
} IMAGE_OS2_HEADER,*PIMAGE_OS2_HEADER;
+#pragma pack(pop)
typedef struct _IMAGE_NT_HEADERS {
DWORD Signature;
@@ -1640,4 +1642,5 @@ typedef struct _IMAGE_SECTION_HEADER {
DWORD Characteristics;
} IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER;
+#pragma pack(push,2)
typedef struct _IMAGE_SYMBOL {
union {
@@ -1688,4 +1691,5 @@ typedef union _IMAGE_AUX_SYMBOL {
} Section;
} IMAGE_AUX_SYMBOL,*PIMAGE_AUX_SYMBOL;
+#pragma pack(pop)
typedef struct _IMAGE_COFF_SYMBOLS_HEADER {
DWORD NumberOfSymbols;
@@ -1698,4 +1702,5 @@ typedef struct _IMAGE_COFF_SYMBOLS_HEADE
DWORD RvaToLastByteOfData;
} IMAGE_COFF_SYMBOLS_HEADER,*PIMAGE_COFF_SYMBOLS_HEADER;
+#pragma pack(push,2)
typedef struct _IMAGE_RELOCATION {
union {
@@ -1706,8 +1711,10 @@ typedef struct _IMAGE_RELOCATION {
WORD Type;
} IMAGE_RELOCATION,*PIMAGE_RELOCATION;
+#pragma pack(pop)
typedef struct _IMAGE_BASE_RELOCATION {
DWORD VirtualAddress;
DWORD SizeOfBlock;
} IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION;
+#pragma pack(push,2)
typedef struct _IMAGE_LINENUMBER {
union {
@@ -1717,4 +1724,5 @@ typedef struct _IMAGE_LINENUMBER {
WORD Linenumber;
} IMAGE_LINENUMBER,*PIMAGE_LINENUMBER;
+#pragma pack(pop)
typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER {
BYTE Name[16];
--
*********************************************
Vadim Egorov, 1C * ÷ÁÄÉÍ åÇÏÒÏ×,1C
egorovv AT 1c DOT ru * egorovv AT 1c DOT ru
*********************************************
- Raw text -