delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/08/22/17:13:30

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_VR,TW_XG
X-Spam-Check-By: sourceware.org
From: Sam Steingold <sds AT gnu DOT org>
To: cygwin AT cygwin DOT com, JonY <jon_y AT users DOT sourceforge DOT net>
Subject: Re: i686-w64-mingw32-gcc & ntifs.h
In-Reply-To: <4E5229ED.9050805@users.sourceforge.net> (JonY's message of "Mon, 22 Aug 2011 18:05:33 +0800")
References: <svliuq67y2 DOT fsf AT smsv2-L DOT wtc DOT algo> <4E4D9487 DOT 4080103 AT users DOT sourceforge DOT net> <sv39gy47h5 DOT fsf AT smsv2-L DOT wtc DOT algo> <4E4E38B9 DOT 9010803 AT users DOT sourceforge DOT net> <20110819120044 DOT GA2506 AT calimero DOT vinschen DOT de> <svr54h2ql5 DOT fsf AT smsv2-L DOT wtc DOT algo> <4E4F08D3 DOT 3060007 AT users DOT sourceforge DOT net> <CAEwic4YRYiOPP+6AQH_UrnO0pTpc6xYTZrV4bC-esAACXxCOaQ AT mail DOT gmail DOT com> <87fwkunsna DOT fsf AT gnu DOT org> <4E5229ED DOT 9050805 AT users DOT sourceforge DOT net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
Mail-Copies-To: never
Reply-To: sds AT gnu DOT org
X-Disclaimer: You should not expect anyone to agree with me.
Mail-Followup-To: cygwin AT cygwin DOT com, JonY <jon_y AT users DOT sourceforge DOT net>
Date: Mon, 22 Aug 2011 17:13:03 -0400
Message-ID: <svfwktf8v4.fsf@smsv2-L.wtc.algo>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

> * JonY <wba_l AT hfref DOT fbheprsbetr DOT arg> [2011-08-22 18:05:33 +0800]:
>
> On 8/22/2011 09:26, Sam Steingold wrote:
>>> * Kai Tietz <xgvrgm70-tZ/Lr1R23zjA+OdD9eORHt AT choyvp DOT tznar DOT bet> [2011-08-20 09:31:47 +0200]:
>>> 2011/8/20 JonY <jon_y-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f AT public DOT gmane DOT org>:
>>>>> /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:2922:26:
>>>>> error: redeclaration of enumerator `WinRestrictedCodeSid'
>>>>> /usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2681:413: note:
>>>>> previous definition of `WinRestrictedCodeSid' was here
>>>>>
>>>>> what about those?
>>>>>
>>>>
>>>> afaik, you aren't supposed to use use winnt.h and ntddk code together,
>>>> but I'm not sure this is accidental, I'll try to the devs and see if
>>>> they have something.
>>>>
>>>
>>> winnt.h is platform header part.  For DDK you should use AFAIR ntdef.h
>>> and/or wdm.h instead.

so, which one - ntdef or wdm?
let me be clear - the only thing I need ddk for is NtQueryInformationFile.

>> somehow my users who use mingw with msys can include winnt.h and
>> ntddk/ntifs.h while I (who uses cygwin with i686-w64-mingw32-gcc)
>> cannot.
>
> This is one of the difference between mingw.org and mingw-w64, the
> latter follows MSVC more closely.
>
> The ddk headers themselves are mostly from ReactOS (which also follows
> MSVC closely), so its not easy to change its behavior to follow mingw.org.

Sorry, let me get it straight.
Are you saying that my problems are the "correct msvc behavior" and the
lack thereof in mingw/msys is an illegal leniency?
IOW, I should _NOT_ expect cygwin/mingw to ever do what I want (i.e.,
include both ntifs and winnt)?

On the other hand, there is this winternl.h file (on cygwin but not on
msys/mingw) which declares NtQueryInformationFile.
Maybe I should use use it on cygwin and ntifs on mingw/msys?

PS. Why are cygwin/mingw and msys/mingw so different?
which is "correct"? which is "better"?
will they ever converge?
thanks.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031
http://jihadwatch.org http://pmw.org.il http://palestinefacts.org
http://ffii.org http://mideasttruth.com http://iris.org.il
We are born naked, wet, and hungry.  Then things get worse.

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