delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/09/28/03:41:16

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=4.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4E82CF78.7090405@cs.vu.nl>
Date: Wed, 28 Sep 2011 09:40:40 +0200
From: Erik van der Kouwe <vdkouwe AT cs DOT vu DOT nl>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Inconsistency between winnt.h header in /usr/include/w32api and the one supplied with the Microsoft SDK
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dear all,

I found that the definition of the IMAGE_RUNTIME_FUNCTION_ENTRY 
structure differs between the winnt.h header supplied with Cygwin and 
the one supplied from the Microsoft SDK (v7.1).

Cygwin gives me this in /usr/include/w32api/winnt.h:



typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
	DWORD BeginAddress;
	DWORD EndAddress;
	PVOID ExceptionHandler;
	PVOID HandlerData;
	DWORD PrologEndAddress;
} IMAGE_RUNTIME_FUNCTION_ENTRY,*PIMAGE_RUNTIME_FUNCTION_ENTRY;



In "C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\WinNT.h", on 
the other hand, I find:



typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
     DWORD BeginAddress;
     DWORD EndAddress;
     DWORD UnwindInfoAddress;
} _IMAGE_RUNTIME_FUNCTION_ENTRY, *_PIMAGE_RUNTIME_FUNCTION_ENTRY;

...

typedef  _IMAGE_RUNTIME_FUNCTION_ENTRY  IMAGE_RUNTIME_FUNCTION_ENTRY;
typedef _PIMAGE_RUNTIME_FUNCTION_ENTRY PIMAGE_RUNTIME_FUNCTION_ENTRY;



Clearly, these definitions are incompatible. Binary dumping of the 
.pdata section of a PE image strongly suggests that the Windows SDK is 
correct on this one.

Any idea where Cygwin's version came from? Should it be corrected/could 
you correct it? And while it hasn't been corrected, is there some easy 
way to use the SDK's version of the headers or should I just copy the 
definition?

With kind regards,
Erik

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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