X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=txFur5MRFKLNDlt/Ef0+EN354rU/IyVCX/QzG7ZhUljOGSgD6doQm XFHChRtoFLIr7R2FzezIWaaK4ogbPtYG6OD0JFiALGN7+Xguoq5bFsC9rlIC818z hJbOVYA9r/G8FZEp2QkX/aR9jBWy3S81zEbrFMeZ+0Tjov1sugi66A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=k/j9wv4PrgQsCpnMTJcP+kskyTI=; b=m1wpbCrDKKmtnT8TnKpSk5HfM7mQ RNyMVosRAdiKubJGofelLh4ejTKCQ1+bcpHpgTRPiMEJdtHJ4ieiWk8rijNMF/0f 0g/z5JoXb1lcgvl/vvgWvhjuePavW4FPWcOWorkMTxtYYaq0c7WRoieMn9oH0Lui daJJeQgZgQCluwg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,TW_WH autolearn=ham version=3.3.1 Date: Mon, 8 Apr 2013 09:48:01 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Bug in ddk headers when used from cygwin Message-ID: <20130408074801.GA10199@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <51625CAE DOT 2030703 AT cwilson DOT fastmail DOT fm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <51625CAE.2030703@cwilson.fastmail.fm> User-Agent: Mutt/1.5.21 (2010-09-15) On Apr 8 01:59, Charles Wilson wrote: > Recompiling getVolInfo (part of the csih package) with latest cygwin > (32bit) toolchain: > > gcc -ggdb -O2 -pipe -fdebug-prefix-map=/usr/src/packages/csih/csih-0.9.6-2/build=/usr/src/debug/csih-0.9.6-2 -fdebug-prefix-map=/usr/src/packages/csih/csih-0.9.6-2/src/csih-0.9.6=/usr/src/debug/csih-0.9.6-2 > -I/usr/include/w32api -I/usr/include/w32api/ddk -c -o getVolInfo.o > getVolInfo.c > In file included from /usr/include/w32api/ddk/ntddk.h:38:0, > from /usr/include/w32api/ddk/ntifs.h:34, > from getVolInfo.c:30: > /usr/include/w32api/ddk/wdm.h:68:20: fatal error: intrin.h: No such > file or directory > compilation terminated. > > > > getVolInfo is a cygwin program that uses some w32api stuff under the > hood. It includes ntifs.h, which include ntddk.h, whch in turn > include wdm.h, which (tries to) include intrin.h. > > But intrin.h is only shipped in the mingw(64) compiler toolchains. > So this looks like a bug: if the w32api header files for cygwin > refer to a separate header file that is not included as part of that > toolchain's installation footprint... > > Any suggestions for a fix? Yes. Do not use the ddk headers with Cygwin. Not only that intrin.h is really missing(*), the ddk headers in mingw-w64 are not fit for usage in user space code. For that reason the latest Cygwin code does not use these headers either. There are two user space headers exposing ntdll stuff, winternl.h and ntdef.h. They partially contradict each other so they can't be used in parallel. Usage of winternl.h is preferred. Wintern.h isn't exactly set in stone upstream, so additions and fixes are welcome. And, as a side note, from mingw32 became just in mingw-w64. Corinna (*) The next Cygwin w32api headers will come with an internl.h, due to an important upstream fix in terms of adding the VC++ intrinsic functions, but that still doesn't mean you should use the ddk headers. -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat -- 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