Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com Message-ID: <37E5BCB2.76D69916@1c.ru> Date: Mon, 20 Sep 1999 08:48:50 +0400 From: Vadim Egorov X-Mailer: Mozilla 4.61 [en] (WinNT; I) X-Accept-Language: ru,en MIME-Version: 1.0 To: "cygwin-developers AT sourceware DOT cygnus DOT com" Subject: Several #pragma pack missing from winnt.h Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-MDaemon-Deliver-To: cygwin-developers AT sourceware DOT cygnus DOT com X-Return-Path: EgorovV AT 1c DOT ru 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 *********************************************