This is the mail archive of the
mailing list for the Cygwin project.
Re: Bug in ddk headers when used from cygwin
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 9 Apr 2013 11:16:09 +0200
- Subject: Re: Bug in ddk headers when used from cygwin
- 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>
- Reply-to: cygwin at cygwin dot com
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 Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple