delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/04/09/05:16:28

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=S0ewfJWKCw0ocYZ4JNsGG/LtXX9U+NMRhyJMn4owYWwYQmWCLcGXB
1u1qVKg7OkdvCm7yjO064MpTBGHC8aAcNETqFJwV7Aeo4duKj0LJeLrt44Qj3z9f
+2nxiFUThnEgCEbUJr3v2PE2K2YrkwI8R5cuwC2Pl59Es428RnoNPo=
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=88EOf0gU549L/kJ0psFOR/yERqE=; b=XFxSc0FcN7S/tITPK57iSi3EfQaT
tVIuSCdMWTOkFV78eajQ7qTC4S7D6PZi06KsI9B01vUYU9GZit9AyG+BRAsBm3zA
c/VFgnA9p5aePUGfnpZsbivhWpCF6unTqc7JnXABescCzwV5rq1lKViUgIr2ro3F
j30W6j/tCXuNHTc=
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
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1
Date: Tue, 9 Apr 2013 11:16:09 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Bug in ddk headers when used from cygwin
Message-ID: <20130409091609.GI10126@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> <20130408074801 DOT GA10199 AT calimero DOT vinschen DOT de> <51630442 DOT 4080805 AT cwilson DOT fastmail DOT fm>
MIME-Version: 1.0
In-Reply-To: <51630442.4080805@cwilson.fastmail.fm>
User-Agent: Mutt/1.5.21 (2010-09-15)

On Apr  8 13:54, Charles Wilson wrote:
> On 4/8/2013 3:48 AM, Corinna Vinschen wrote:
> >On Apr  8 01:59, Charles Wilson wrote:
> >>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, <ddk/ntstatus.h> from mingw32 became just
> ><ntstatus.h> in mingw-w64.
> 
> OK, I'll try to figure out what getVolInfo was using from ddk, and
> see if I can replicate the functionality with pure w32api non-ddk
> stuff. I'll also have to ask the original developer what she was
> thinking, relying on ddk internals... :-)

You can still use the same functions.  Just the header files to include
have changed.  That's what winternl.h aand ntdef.h are for, basically,
with ntdef.h going the way of deprecation at one point.

> But doesn't this mean that the cygwin's w32api package should
> exclude all of the ddk headers; it's not simply a case that you
> "shouldn't" use ddk/*.h, but that you actually cannot, because
> compilation will fail.

The absence of intrin.h was a bug, but otherwise you could still use
the ddk headers for what they are supposed to be:  Writing device
drives and other kernel stuff.  The difference is just that the ddk
headers from mingw-w64 cannot be used together with the user space
headers like windows.h, but that's not different from "upstream".


Corinna

-- 
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

- Raw text -


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