delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/09/20/00:50:36

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
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 <egorovv AT 1c DOT ru>
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"
<cygwin-developers AT sourceware DOT cygnus DOT com>
Subject: Several #pragma pack missing from winnt.h
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
*********************************************

- Raw text -


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