public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* i686-w64-mingw32-gcc & ntifs.h
@ 2011-08-18 15:44 Sam Steingold
  2011-08-18 22:39 ` JonY
  0 siblings, 1 reply; 15+ messages in thread
From: Sam Steingold @ 2011-08-18 15:44 UTC (permalink / raw)
  To: cygwin

Hi,
I cannot
#include <ddk/ntifs.h>
because /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h contains
#include <ntddk.h>
and <ntddk.h> actually lives in ddk, i.e., it should be
#include <ddk/ntddk.h>
after I aplly these two patches:
--- c:/gnu/cygwin/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h.old	2011-08-10 09:06:18.001000000 -0400
+++ c:/gnu/cygwin/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h	2011-08-18 11:42:13.272375000 -0400
@@ -35,11 +35,11 @@
 #define NT_INCLUDED
 #define _CTYPE_DISABLE_MACROS
 
-#include <wdm.h>
+#include <ddk/wdm.h>
 #include <excpt.h>
 #include <ntdef.h>
 #include <ntstatus.h>
-#include <mce.h>
+#include <ddk/mce.h>
 #include <bugcodes.h>
 #include <ntiologc.h>
 

Diff finished.  Thu Aug 18 11:42:16 2011
--- c:/gnu/cygwin/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h.old	2011-08-10 09:06:19.001000000 -0400
+++ c:/gnu/cygwin/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h	2011-08-18 11:33:42.429125000 -0400
@@ -31,7 +31,7 @@ extern "C" {
 #endif
 
 /* Dependencies */
-#include <ntddk.h>
+#include <ddk/ntddk.h>
 #include <excpt.h>
 #include <ntdef.h>
 #include <ntnls.h>

Diff finished.  Thu Aug 18 11:36:04 2011

I get these errors:

In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:38:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:215:1: error: conflicting types for `_interlockedbittestandset'
/usr/i686-w64-mingw32/sys-root/mingw/include/intrin.h:968:5: note: previous declaration of `_interlockedbittestandset' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:234:1: error: conflicting types for `_interlockedbittestandreset'
/usr/i686-w64-mingw32/sys-root/mingw/include/intrin.h:969:5: note: previous declaration of `_interlockedbittestandreset' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:597:14: error: nested redefinition of `enum _LOGICAL_PROCESSOR_RELATIONSHIP'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:597:14: error: redeclaration of `enum _LOGICAL_PROCESSOR_RELATIONSHIP'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3584:18: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:598:3: error: redeclaration of enumerator `RelationProcessorCore'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3585:7: note: previous definition of `RelationProcessorCore' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:599:3: error: redeclaration of enumerator `RelationNumaNode'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3585:29: note: previous definition of `RelationNumaNode' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:600:3: error: redeclaration of enumerator `RelationCache'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3585:46: note: previous definition of `RelationCache' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:601:3: error: redeclaration of enumerator `RelationProcessorPackage'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3586:7: note: previous definition of `RelationProcessorPackage' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:602:3: error: redeclaration of enumerator `RelationGroup'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3586:32: note: previous definition of `RelationGroup' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:603:17: error: redeclaration of enumerator `RelationAll'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3586:58: note: previous definition of `RelationAll' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:606:14: error: nested redefinition of `enum _PROCESSOR_CACHE_TYPE'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:606:14: error: redeclaration of `enum _PROCESSOR_CACHE_TYPE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3591:18: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:607:3: error: redeclaration of enumerator `CacheUnified'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3592:7: note: previous definition of `CacheUnified' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:608:3: error: redeclaration of enumerator `CacheInstruction'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3592:20: note: previous definition of `CacheInstruction' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:609:3: error: redeclaration of enumerator `CacheData'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3592:37: note: previous definition of `CacheData' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:610:3: error: redeclaration of enumerator `CacheTrace'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3592:47: note: previous definition of `CacheTrace' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:613:16: error: redefinition of `struct _CACHE_DESCRIPTOR'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3597:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:619:3: error: conflicting types for `CACHE_DESCRIPTOR'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3603:7: note: previous declaration of `CACHE_DESCRIPTOR' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:619:22: error: conflicting types for `PCACHE_DESCRIPTOR'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3603:25: note: previous declaration of `PCACHE_DESCRIPTOR' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:621:16: error: redefinition of `struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3605:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:634:3: error: conflicting types for `SYSTEM_LOGICAL_PROCESSOR_INFORMATION'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3618:7: note: previous declaration of `SYSTEM_LOGICAL_PROCESSOR_INFORMATION' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:634:42: error: conflicting types for `PSYSTEM_LOGICAL_PROCESSOR_INFORMATION'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3618:45: note: previous declaration of `PSYSTEM_LOGICAL_PROCESSOR_INFORMATION' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:788:16: error: redefinition of `struct _EXCEPTION_RECORD'
/usr/i686-w64-mingw32/sys-root/mingw/include/excpt.h:29:10: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:795:3: error: conflicting types for `EXCEPTION_RECORD'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2363:7: note: previous declaration of `EXCEPTION_RECORD' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:795:22: error: conflicting types for `PEXCEPTION_RECORD'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2365:31: note: previous declaration of `PEXCEPTION_RECORD' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:797:16: error: redefinition of `struct _EXCEPTION_RECORD32'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2367:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:804:3: error: conflicting types for `EXCEPTION_RECORD32'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2374:7: note: previous declaration of `EXCEPTION_RECORD32' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:804:24: error: conflicting types for `PEXCEPTION_RECORD32'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2374:27: note: previous declaration of `PEXCEPTION_RECORD32' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:806:16: error: redefinition of `struct _EXCEPTION_RECORD64'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2376:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:814:3: error: conflicting types for `EXCEPTION_RECORD64'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2384:7: note: previous declaration of `EXCEPTION_RECORD64' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:814:24: error: conflicting types for `PEXCEPTION_RECORD64'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2384:27: note: previous declaration of `PEXCEPTION_RECORD64' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:816:16: error: redefinition of `struct _EXCEPTION_POINTERS'
/usr/i686-w64-mingw32/sys-root/mingw/include/excpt.h:17:10: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:819:3: error: conflicting types for `EXCEPTION_POINTERS'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2389:7: note: previous declaration of `EXCEPTION_POINTERS' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:819:24: error: conflicting types for `PEXCEPTION_POINTERS'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2389:27: note: previous declaration of `PEXCEPTION_POINTERS' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:1790:8: error: expected identifier or `(' before numeric constant
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:1794:9: error: expected identifier or `(' before numeric constant
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2005:16: error: redefinition of `struct _GENERIC_MAPPING'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2488:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2010:3: error: conflicting types for `GENERIC_MAPPING'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2493:7: note: previous declaration of `GENERIC_MAPPING' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2010:21: error: conflicting types for `PGENERIC_MAPPING'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2494:30: note: previous declaration of `PGENERIC_MAPPING' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2022:16: error: redefinition of `struct _ACL'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2710:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2028:3: error: conflicting types for `ACL'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2716:7: note: previous declaration of `ACL' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2028:9: error: conflicting types for `PACL'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2717:18: note: previous declaration of `PACL' was here
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:38:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2046:16: error: redefinition of `struct _LUID_AND_ATTRIBUTES'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2498:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2049:3: error: conflicting types for `LUID_AND_ATTRIBUTES'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2501:7: note: previous declaration of `LUID_AND_ATTRIBUTES' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2049:25: error: conflicting types for `PLUID_AND_ATTRIBUTES'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2501:28: note: previous declaration of `PLUID_AND_ATTRIBUTES' was here
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:38:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2052:29: error: conflicting types for `LUID_AND_ATTRIBUTES_ARRAY'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2502:33: note: previous declaration of `LUID_AND_ATTRIBUTES_ARRAY' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2053:36: error: conflicting types for `PLUID_AND_ATTRIBUTES_ARRAY'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:2503:40: note: previous declaration of `PLUID_AND_ATTRIBUTES_ARRAY' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2058:16: error: redefinition of `struct _PRIVILEGE_SET'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3007:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2062:3: error: conflicting types for `PRIVILEGE_SET'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3011:7: note: previous declaration of `PRIVILEGE_SET' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2062:18: error: conflicting types for `PPRIVILEGE_SET'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3011:22: note: previous declaration of `PPRIVILEGE_SET' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2064:14: error: nested redefinition of `enum _SECURITY_IMPERSONATION_LEVEL'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2064:14: error: redeclaration of `enum _SECURITY_IMPERSONATION_LEVEL'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3049:18: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2065:3: error: redeclaration of enumerator `SecurityAnonymous'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3050:7: note: previous definition of `SecurityAnonymous' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2066:3: error: redeclaration of enumerator `SecurityIdentification'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3050:25: note: previous definition of `SecurityIdentification' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2067:3: error: redeclaration of enumerator `SecurityImpersonation'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3050:48: note: previous definition of `SecurityImpersonation' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2068:3: error: redeclaration of enumerator `SecurityDelegation'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3050:70: note: previous definition of `SecurityDelegation' was here
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:38:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2081:16: error: redefinition of `struct _SECURITY_QUALITY_OF_SERVICE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3234:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2086:3: error: conflicting types for `SECURITY_QUALITY_OF_SERVICE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3239:7: note: previous declaration of `SECURITY_QUALITY_OF_SERVICE' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2086:33: error: conflicting types for `PSECURITY_QUALITY_OF_SERVICE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3239:36: note: previous declaration of `PSECURITY_QUALITY_OF_SERVICE' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2088:16: error: redefinition of `struct _SE_IMPERSONATION_STATE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3241:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2093:3: error: conflicting types for `SE_IMPERSONATION_STATE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3246:7: note: previous declaration of `SE_IMPERSONATION_STATE' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2093:28: error: conflicting types for `PSE_IMPERSONATION_STATE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3246:31: note: previous declaration of `PSE_IMPERSONATION_STATE' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2295:14: error: nested redefinition of `enum _SYSTEM_POWER_STATE'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2295:14: error: redeclaration of `enum _SYSTEM_POWER_STATE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3891:16: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2296:28: error: redeclaration of enumerator `PowerSystemUnspecified'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3892:30: note: previous definition of `PowerSystemUnspecified' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2297:3: error: redeclaration of enumerator `PowerSystemWorking'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3892:53: note: previous definition of `PowerSystemWorking' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2298:3: error: redeclaration of enumerator `PowerSystemSleeping1'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3892:78: note: previous definition of `PowerSystemSleeping1' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2299:3: error: redeclaration of enumerator `PowerSystemSleeping2'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3892:103: note: previous definition of `PowerSystemSleeping2' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2300:3: error: redeclaration of enumerator `PowerSystemSleeping3'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3892:128: note: previous definition of `PowerSystemSleeping3' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2301:3: error: redeclaration of enumerator `PowerSystemHibernate'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3892:153: note: previous definition of `PowerSystemHibernate' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2302:3: error: redeclaration of enumerator `PowerSystemShutdown'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3892:177: note: previous definition of `PowerSystemShutdown' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2303:3: error: redeclaration of enumerator `PowerSystemMaximum'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3892:200: note: previous definition of `PowerSystemMaximum' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2309:3: error: redeclaration of enumerator `SystemPowerPolicyAc'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:7: note: previous definition of `SystemPowerPolicyAc' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2310:3: error: redeclaration of enumerator `SystemPowerPolicyDc'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:27: note: previous definition of `SystemPowerPolicyDc' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2311:3: error: redeclaration of enumerator `VerifySystemPolicyAc'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:47: note: previous definition of `VerifySystemPolicyAc' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2312:3: error: redeclaration of enumerator `VerifySystemPolicyDc'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:68: note: previous definition of `VerifySystemPolicyDc' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2313:3: error: redeclaration of enumerator `SystemPowerCapabilities'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:89: note: previous definition of `SystemPowerCapabilities' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2314:3: error: redeclaration of enumerator `SystemBatteryState'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:113: note: previous definition of `SystemBatteryState' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2315:3: error: redeclaration of enumerator `SystemPowerStateHandler'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:132: note: previous definition of `SystemPowerStateHandler' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2316:3: error: redeclaration of enumerator `ProcessorStateHandler'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:156: note: previous definition of `ProcessorStateHandler' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2317:3: error: redeclaration of enumerator `SystemPowerPolicyCurrent'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:178: note: previous definition of `SystemPowerPolicyCurrent' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2318:3: error: redeclaration of enumerator `AdministratorPowerPolicy'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:203: note: previous definition of `AdministratorPowerPolicy' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2319:3: error: redeclaration of enumerator `SystemReserveHiberFile'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:228: note: previous definition of `SystemReserveHiberFile' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2320:3: error: redeclaration of enumerator `ProcessorInformation'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:251: note: previous definition of `ProcessorInformation' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2321:3: error: redeclaration of enumerator `SystemPowerInformation'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:272: note: previous definition of `SystemPowerInformation' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2322:3: error: redeclaration of enumerator `ProcessorStateHandler2'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:295: note: previous definition of `ProcessorStateHandler2' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2323:3: error: redeclaration of enumerator `LastWakeTime'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:318: note: previous definition of `LastWakeTime' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2324:3: error: redeclaration of enumerator `LastSleepTime'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:331: note: previous definition of `LastSleepTime' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2325:3: error: redeclaration of enumerator `SystemExecutionState'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:345: note: previous definition of `SystemExecutionState' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2326:3: error: redeclaration of enumerator `SystemPowerStateNotifyHandler'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:366: note: previous definition of `SystemPowerStateNotifyHandler' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2327:3: error: redeclaration of enumerator `ProcessorPowerPolicyAc'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:396: note: previous definition of `ProcessorPowerPolicyAc' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2328:3: error: redeclaration of enumerator `ProcessorPowerPolicyDc'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:419: note: previous definition of `ProcessorPowerPolicyDc' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2329:3: error: redeclaration of enumerator `VerifyProcessorPowerPolicyAc'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:442: note: previous definition of `VerifyProcessorPowerPolicyAc' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2330:3: error: redeclaration of enumerator `VerifyProcessorPowerPolicyDc'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:471: note: previous definition of `VerifyProcessorPowerPolicyDc' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2331:3: error: redeclaration of enumerator `ProcessorPowerPolicyCurrent'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:500: note: previous definition of `ProcessorPowerPolicyCurrent' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2332:3: error: redeclaration of enumerator `SystemPowerStateLogging'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:528: note: previous definition of `SystemPowerStateLogging' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2333:3: error: redeclaration of enumerator `SystemPowerLoggingEntry'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3967:552: note: previous definition of `SystemPowerLoggingEntry' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2362:3: error: conflicting types for `POWER_INFORMATION_LEVEL'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3968:7: note: previous declaration of `POWER_INFORMATION_LEVEL' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2365:21: error: redeclaration of enumerator `PowerActionNone'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3898:23: note: previous definition of `PowerActionNone' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2366:3: error: redeclaration of enumerator `PowerActionReserved'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3898:26: note: previous definition of `PowerActionReserved' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2367:3: error: redeclaration of enumerator `PowerActionSleep'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3898:47: note: previous definition of `PowerActionSleep' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2368:3: error: redeclaration of enumerator `PowerActionHibernate'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3898:65: note: previous definition of `PowerActionHibernate' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2369:3: error: redeclaration of enumerator `PowerActionShutdown'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3899:5: note: previous definition of `PowerActionShutdown' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2370:3: error: redeclaration of enumerator `PowerActionShutdownReset'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3899:26: note: previous definition of `PowerActionShutdownReset' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2371:3: error: redeclaration of enumerator `PowerActionShutdownOff'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3899:52: note: previous definition of `PowerActionShutdownOff' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2372:3: error: redeclaration of enumerator `PowerActionWarmEject'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3900:5: note: previous definition of `PowerActionWarmEject' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2373:3: error: conflicting types for `POWER_ACTION'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3901:5: note: previous declaration of `POWER_ACTION' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2373:18: error: conflicting types for `PPOWER_ACTION'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3901:19: note: previous declaration of `PPOWER_ACTION' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2375:14: error: nested redefinition of `enum _DEVICE_POWER_STATE'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2375:14: error: redeclaration of `enum _DEVICE_POWER_STATE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3924:16: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2376:28: error: redeclaration of enumerator `PowerDeviceUnspecified'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3925:30: note: previous definition of `PowerDeviceUnspecified' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2377:3: error: redeclaration of enumerator `PowerDeviceD0'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3925:33: note: previous definition of `PowerDeviceD0' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2378:3: error: redeclaration of enumerator `PowerDeviceD1'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3925:48: note: previous definition of `PowerDeviceD1' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2379:3: error: redeclaration of enumerator `PowerDeviceD2'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3925:63: note: previous definition of `PowerDeviceD2' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2380:3: error: redeclaration of enumerator `PowerDeviceD3'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3925:78: note: previous definition of `PowerDeviceD3' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2381:3: error: redeclaration of enumerator `PowerDeviceMaximum'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3926:5: note: previous definition of `PowerDeviceMaximum' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2384:14: error: nested redefinition of `enum _MONITOR_DISPLAY_STATE'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2384:14: error: redeclaration of `enum _MONITOR_DISPLAY_STATE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3929:16: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2385:21: error: redeclaration of enumerator `PowerMonitorOff'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3930:23: note: previous definition of `PowerMonitorOff' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2386:3: error: redeclaration of enumerator `PowerMonitorOn'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3930:26: note: previous definition of `PowerMonitorOn' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2387:3: error: redeclaration of enumerator `PowerMonitorDim'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3930:42: note: previous definition of `PowerMonitorDim' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2450:3: error: redeclaration of enumerator `LT_DONT_CARE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3942:5: note: previous definition of `LT_DONT_CARE' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2451:3: error: redeclaration of enumerator `LT_LOWEST_LATENCY'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3942:18: note: previous definition of `LT_LOWEST_LATENCY' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2452:3: error: conflicting types for `LATENCY_TIME'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3943:5: note: previous declaration of `LATENCY_TIME' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2486:16: error: redefinition of `struct CM_Power_Data_s'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3955:20: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2495:3: error: conflicting types for `CM_POWER_DATA'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3964:7: note: previous declaration of `CM_POWER_DATA' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2495:19: error: conflicting types for `PCM_POWER_DATA'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3964:22: note: previous declaration of `PCM_POWER_DATA' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2542:3: error: conflicting types for `BATTERY_REPORTING_SCALE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3973:7: note: previous declaration of `BATTERY_REPORTING_SCALE' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2542:29: error: conflicting types for `PBATTERY_REPORTING_SCALE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:3973:32: note: previous declaration of `PBATTERY_REPORTING_SCALE' was here
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:38:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2829:7: error: expected specifier-qualifier-list before `PHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2833:7: error: expected specifier-qualifier-list before `PHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:2873:7: error: expected specifier-qualifier-list before `PHYSICAL_ADDRESS'
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:38:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3665:14: error: nested redefinition of `enum _CM_SERVICE_NODE_TYPE'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3665:14: error: redeclaration of `enum _CM_SERVICE_NODE_TYPE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6210:18: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3666:16: error: redeclaration of enumerator `DriverType'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6211:20: note: previous definition of `DriverType' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3667:20: error: redeclaration of enumerator `FileSystemType'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6211:59: note: previous definition of `FileSystemType' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3668:28: error: redeclaration of enumerator `Win32ServiceOwnProcess'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6211:111: note: previous definition of `Win32ServiceOwnProcess' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3669:30: error: redeclaration of enumerator `Win32ServiceShareProcess'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6212:34: note: previous definition of `Win32ServiceShareProcess' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3670:17: error: redeclaration of enumerator `AdapterType'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6212:76: note: previous definition of `AdapterType' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3671:20: error: redeclaration of enumerator `RecognizerType'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6212:109: note: previous definition of `RecognizerType' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3674:14: error: nested redefinition of `enum _CM_SERVICE_LOAD_TYPE'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3674:14: error: redeclaration of `enum _CM_SERVICE_LOAD_TYPE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6215:18: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3675:14: error: redeclaration of enumerator `BootLoad'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6216:18: note: previous definition of `BootLoad' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3676:16: error: redeclaration of enumerator `SystemLoad'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6216:50: note: previous definition of `SystemLoad' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3677:14: error: redeclaration of enumerator `AutoLoad'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6216:82: note: previous definition of `AutoLoad' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3678:16: error: redeclaration of enumerator `DemandLoad'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6216:114: note: previous definition of `DemandLoad' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3679:17: error: redeclaration of enumerator `DisableLoad'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6217:21: note: previous definition of `DisableLoad' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3682:14: error: nested redefinition of `enum _CM_ERROR_CONTROL_TYPE'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3682:14: error: redeclaration of `enum _CM_ERROR_CONTROL_TYPE'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6220:18: note: originally defined here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3683:17: error: redeclaration of enumerator `IgnoreError'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6221:21: note: previous definition of `IgnoreError' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3684:17: error: redeclaration of enumerator `NormalError'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6221:56: note: previous definition of `NormalError' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3685:17: error: redeclaration of enumerator `SevereError'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6221:91: note: previous definition of `SevereError' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3686:19: error: redeclaration of enumerator `CriticalError'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:6221:128: note: previous definition of `CriticalError' was here
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:3981:3: error: expected specifier-qualifier-list before `PHYSICAL_ADDRESS'
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:38:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:4502:6: error: expected declaration specifiers or `...' before `PHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:4505:7: error: expected declaration specifiers or `...' before `PPHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:4721:23: error: expected`)' before `TargetPhysicalAddress'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:4732:5: error: expected specifier-qualifier-list before `PHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:4763:3: error: expected specifier-qualifier-list before `PREPLACE_MAP_MEMORY'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:4782:6: error: expected declaration specifiers or `...' before `PHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:4806:6: error: expected declaration specifiers or `...' before `PHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:4807:7: error: expected declaration specifiers or `...' before `PPHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5693:3: error: expected specifier-qualifier-list before `PHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5800:7: error: expected declaration specifiers or `...' before `PPHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5807:6: error: expected declaration specifiers or `...' before `PHYSICAL_ADDRESS'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5839:8: error: expected declaration specifiers or `...' before `*' token
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5838:9: error: `PHYSICAL_ADDRESS' declared as function returning a function
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5918:3: error: expected specifier-qualifier-list before `PMAP_TRANSFER'
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5939:24: error: field `MinimumAddress' declared as a function
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5940:24: error: field `MaximumAddress' declared as a function
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5945:24: error: field `MinimumAddress' declared as a function
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5946:24: error: field `MaximumAddress' declared as a function
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5959:24: error: field `MinimumAddress' declared as a function
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:5960:24: error: field `MaximumAddress' declared as a function
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:38:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:9380:1: error: conflicting types for `RtlSecureZeroMemory'
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:5665:18: note: previous declaration of `RtlSecureZeroMemory' was here
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:38:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/wdm.h:13764:6: error: expected declaration specifiers or `...' before `PCALLBACK_FUNCTION'
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h:34:0,
/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h:42:17: fatal error: mce.h: No such file or directory
compilation terminated.


so, what is the right way to get the declaration of
NtQueryInformationFile?
I also have it in <winternl.h> but that is not officially sanctioned by
<http://msdn.microsoft.com/en-us/library/ff567052.aspx>.
Advice?


-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031
http://iris.org.il http://www.memritv.org http://camera.org http://dhimmi.com
http://truepeace.org http://ffii.org http://openvotingconsortium.org
An elephant is a mouse with an operating system.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-18 15:44 i686-w64-mingw32-gcc & ntifs.h Sam Steingold
@ 2011-08-18 22:39 ` JonY
  2011-08-18 23:37   ` Sam Steingold
  0 siblings, 1 reply; 15+ messages in thread
From: JonY @ 2011-08-18 22:39 UTC (permalink / raw)
  To: cygwin, mingw-w64-public

[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]

On 8/18/2011 23:44, Sam Steingold wrote:
> Hi,
> I cannot
> #include <ddk/ntifs.h>
> because /usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h contains
> #include <ntddk.h>
> and <ntddk.h> actually lives in ddk, i.e., it should be
> #include <ddk/ntddk.h>
> after I aplly these two patches:
> --- c:/gnu/cygwin/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h.old	2011-08-10 09:06:18.001000000 -0400
> +++ c:/gnu/cygwin/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntddk.h	2011-08-18 11:42:13.272375000 -0400
> @@ -35,11 +35,11 @@
>  #define NT_INCLUDED
>  #define _CTYPE_DISABLE_MACROS
>  
> -#include <wdm.h>
> +#include <ddk/wdm.h>
>  #include <excpt.h>
>  #include <ntdef.h>
>  #include <ntstatus.h>
> -#include <mce.h>
> +#include <ddk/mce.h>
>  #include <bugcodes.h>
>  #include <ntiologc.h>
>  
> 
> Diff finished.  Thu Aug 18 11:42:16 2011
> --- c:/gnu/cygwin/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h.old	2011-08-10 09:06:19.001000000 -0400
> +++ c:/gnu/cygwin/usr/i686-w64-mingw32/sys-root/mingw/include/ddk/ntifs.h	2011-08-18 11:33:42.429125000 -0400
> @@ -31,7 +31,7 @@ extern "C" {
>  #endif
>  
>  /* Dependencies */
> -#include <ntddk.h>
> +#include <ddk/ntddk.h>
>  #include <excpt.h>
>  #include <ntdef.h>
>  #include <ntnls.h>
> 
> Diff finished.  Thu Aug 18 11:36:04 2011

Adding to mingw-w64-public list.

You are supposed to use -I to add the ddk path to gcc.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 196 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-18 22:39 ` JonY
@ 2011-08-18 23:37   ` Sam Steingold
  2011-08-19 10:20     ` JonY
  0 siblings, 1 reply; 15+ messages in thread
From: Sam Steingold @ 2011-08-18 23:37 UTC (permalink / raw)
  To: cygwin, JonY; +Cc: mingw-w64-public

> * JonY <wba_l@hfref.fbheprsbetr.arg> [2011-08-19 06:39:03 +0800]:
>
> You are supposed to use -I to add the ddk path to gcc.

how?
I mean, -Iddk does not work because I do not have ddk directory in my
build directory.
how do I ask i686-w64-mingw32-gcc to print
/usr/i686-w64-mingw32/sys-root/mingw/include/ ??
thanks!
-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031
http://dhimmi.com http://palestinefacts.org http://mideasttruth.com
http://thereligionofpeace.com http://www.PetitionOnline.com/tap12009/
Bug free software merely has random features.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-18 23:37   ` Sam Steingold
@ 2011-08-19 10:20     ` JonY
  2011-08-19 12:01       ` Corinna Vinschen
  0 siblings, 1 reply; 15+ messages in thread
From: JonY @ 2011-08-19 10:20 UTC (permalink / raw)
  To: cygwin, mingw-w64-public

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

On 8/19/2011 07:37, Sam Steingold wrote:
>> * JonY <wba_l@hfref.fbheprsbetr.arg> [2011-08-19 06:39:03 +0800]:
>>
>> You are supposed to use -I to add the ddk path to gcc.
> 
> how?
> I mean, -Iddk does not work because I do not have ddk directory in my
> build directory.
> how do I ask i686-w64-mingw32-gcc to print
> /usr/i686-w64-mingw32/sys-root/mingw/include/ ??
> thanks!

Try i686-w64-mingw32-gcc -print-sysroot and append /mingw/include/ddk.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 196 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-19 10:20     ` JonY
@ 2011-08-19 12:01       ` Corinna Vinschen
  2011-08-19 14:03         ` JonY
  2011-08-19 18:39         ` Sam Steingold
  0 siblings, 2 replies; 15+ messages in thread
From: Corinna Vinschen @ 2011-08-19 12:01 UTC (permalink / raw)
  To: cygwin

On Aug 19 18:19, JonY wrote:
> On 8/19/2011 07:37, Sam Steingold wrote:
> >> * JonY <wba_l@hfref.fbheprsbetr.arg> [2011-08-19 06:39:03 +0800]:
> >>
> >> You are supposed to use -I to add the ddk path to gcc.
> > 
> > how?
> > I mean, -Iddk does not work because I do not have ddk directory in my
> > build directory.
> > how do I ask i686-w64-mingw32-gcc to print
> > /usr/i686-w64-mingw32/sys-root/mingw/include/ ??
> > thanks!
> 
> Try i686-w64-mingw32-gcc -print-sysroot and append /mingw/include/ddk.

Or just use -I=/mingw/include/ddk

However, IMHO it's still a bug in the headers.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-19 12:01       ` Corinna Vinschen
@ 2011-08-19 14:03         ` JonY
  2011-08-19 18:39         ` Sam Steingold
  1 sibling, 0 replies; 15+ messages in thread
From: JonY @ 2011-08-19 14:03 UTC (permalink / raw)
  To: cygwin, mingw-w64-public

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

On 8/19/2011 20:00, Corinna Vinschen wrote:
> On Aug 19 18:19, JonY wrote:
>> On 8/19/2011 07:37, Sam Steingold wrote:
>>>> * JonY <wba_l@hfref.fbheprsbetr.arg> [2011-08-19 06:39:03 +0800]:
>>>>
>>>> You are supposed to use -I to add the ddk path to gcc.
>>>
>>> how?
>>> I mean, -Iddk does not work because I do not have ddk directory in my
>>> build directory.
>>> how do I ask i686-w64-mingw32-gcc to print
>>> /usr/i686-w64-mingw32/sys-root/mingw/include/ ??
>>> thanks!
>>
>> Try i686-w64-mingw32-gcc -print-sysroot and append /mingw/include/ddk.
> 
> Or just use -I=/mingw/include/ddk
> 
> However, IMHO it's still a bug in the headers.
> 
> 
> Corinna
> 

No, this really is intended behavior following MSVC and PSDK releases,
you need to add -I to the path of the ddk headers.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 196 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-19 12:01       ` Corinna Vinschen
  2011-08-19 14:03         ` JonY
@ 2011-08-19 18:39         ` Sam Steingold
  2011-08-20  1:08           ` JonY
  1 sibling, 1 reply; 15+ messages in thread
From: Sam Steingold @ 2011-08-19 18:39 UTC (permalink / raw)
  To: cygwin

> * Corinna Vinschen <pbevaan-pltjva@pltjva.pbz> [2011-08-19 14:00:44 +0200]:
>
> On Aug 19 18:19, JonY wrote:
>> On 8/19/2011 07:37, Sam Steingold wrote:
>> >> * JonY <wba_l@hfref.fbheprsbetr.arg> [2011-08-19 06:39:03 +0800]:
>> >>
>> >> You are supposed to use -I to add the ddk path to gcc.
>> > 
>> > how?
>> > I mean, -Iddk does not work because I do not have ddk directory in my
>> > build directory.
>> > how do I ask i686-w64-mingw32-gcc to print
>> > /usr/i686-w64-mingw32/sys-root/mingw/include/ ??
>> > thanks!
>> 
>> Try i686-w64-mingw32-gcc -print-sysroot and append /mingw/include/ddk.
>
> Or just use -I=/mingw/include/ddk

cool trick, thanks.
now I am still getting those zillions of errors like

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

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031
http://openvotingconsortium.org http://thereligionofpeace.com
http://pmw.org.il http://palestinefacts.org http://memri.org http://dhimmi.com
Heck is a place for people who don't believe in gosh.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-19 18:39         ` Sam Steingold
@ 2011-08-20  1:08           ` JonY
  2011-08-20  7:32             ` [Mingw-w64-public] " Kai Tietz
  0 siblings, 1 reply; 15+ messages in thread
From: JonY @ 2011-08-20  1:08 UTC (permalink / raw)
  To: cygwin, mingw-w64-public

[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]

On 8/20/2011 02:39, Sam Steingold wrote:
>> * Corinna Vinschen <pbevaan-pltjva@pltjva.pbz> [2011-08-19 14:00:44 +0200]:
>>
>> On Aug 19 18:19, JonY wrote:
>>> On 8/19/2011 07:37, Sam Steingold wrote:
>>>>> * JonY <wba_l@hfref.fbheprsbetr.arg> [2011-08-19 06:39:03 +0800]:
>>>>>
>>>>> You are supposed to use -I to add the ddk path to gcc.
>>>>
>>>> how?
>>>> I mean, -Iddk does not work because I do not have ddk directory in my
>>>> build directory.
>>>> how do I ask i686-w64-mingw32-gcc to print
>>>> /usr/i686-w64-mingw32/sys-root/mingw/include/ ??
>>>> thanks!
>>>
>>> Try i686-w64-mingw32-gcc -print-sysroot and append /mingw/include/ddk.
>>
>> Or just use -I=/mingw/include/ddk
> 
> cool trick, thanks.
> now I am still getting those zillions of errors like
> 
> /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?
> 

hi,

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.

Kai, what do you think?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 196 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Mingw-w64-public] i686-w64-mingw32-gcc & ntifs.h
  2011-08-20  1:08           ` JonY
@ 2011-08-20  7:32             ` Kai Tietz
  2011-08-22  1:26               ` Sam Steingold
  0 siblings, 1 reply; 15+ messages in thread
From: Kai Tietz @ 2011-08-20  7:32 UTC (permalink / raw)
  To: mingw-w64-public; +Cc: cygwin

2011/8/20 JonY <jon_y@users.sourceforge.net>:
> On 8/20/2011 02:39, Sam Steingold wrote:
>>> * Corinna Vinschen <pbevaan-pltjva@pltjva.pbz> [2011-08-19 14:00:44 +0200]:
>>>
>>> On Aug 19 18:19, JonY wrote:
>>>> On 8/19/2011 07:37, Sam Steingold wrote:
>>>>>> * JonY <wba_l@hfref.fbheprsbetr.arg> [2011-08-19 06:39:03 +0800]:
>>>>>>
>>>>>> You are supposed to use -I to add the ddk path to gcc.
>>>>>
>>>>> how?
>>>>> I mean, -Iddk does not work because I do not have ddk directory in my
>>>>> build directory.
>>>>> how do I ask i686-w64-mingw32-gcc to print
>>>>> /usr/i686-w64-mingw32/sys-root/mingw/include/ ??
>>>>> thanks!
>>>>
>>>> Try i686-w64-mingw32-gcc -print-sysroot and append /mingw/include/ddk.
>>>
>>> Or just use -I=/mingw/include/ddk
>>
>> cool trick, thanks.
>> now I am still getting those zillions of errors like
>>
>> /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?
>>
>
> hi,
>
> 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.
>
> Kai, what do you think?

Yes,

winnt.h is platform header part.  For DDK you should use AFAIR ntdef.h
and/or wdm.h instead.

Regards,
Kai

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-20  7:32             ` [Mingw-w64-public] " Kai Tietz
@ 2011-08-22  1:26               ` Sam Steingold
  2011-08-22 10:06                 ` JonY
  0 siblings, 1 reply; 15+ messages in thread
From: Sam Steingold @ 2011-08-22  1:26 UTC (permalink / raw)
  To: cygwin, mingw-w64-public-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> * Kai Tietz <xgvrgm70-tZ/Lr1R23zjA+OdD9eORHt@choyvp.tznar.bet> [2011-08-20 09:31:47 +0200]:
> 2011/8/20 JonY <jon_y-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.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.

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.


-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.04 (natty) X 11.0.11001000
http://openvotingconsortium.org http://pmw.org.il http://memri.org
http://palestinefacts.org http://honestreporting.com http://truepeace.org
You cannot fire me. Slaves are not fired. Slaves are sold.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-22  1:26               ` Sam Steingold
@ 2011-08-22 10:06                 ` JonY
  2011-08-22 21:13                   ` Sam Steingold
  0 siblings, 1 reply; 15+ messages in thread
From: JonY @ 2011-08-22 10:06 UTC (permalink / raw)
  To: cygwin, mingw-w64-public

[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

On 8/22/2011 09:26, Sam Steingold wrote:
>> * Kai Tietz <xgvrgm70-tZ/Lr1R23zjA+OdD9eORHt@choyvp.tznar.bet> [2011-08-20 09:31:47 +0200]:
>> 2011/8/20 JonY <jon_y-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.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.
> 
> 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.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 196 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-22 10:06                 ` JonY
@ 2011-08-22 21:13                   ` Sam Steingold
  2011-08-22 22:19                     ` Charles Wilson
  0 siblings, 1 reply; 15+ messages in thread
From: Sam Steingold @ 2011-08-22 21:13 UTC (permalink / raw)
  To: cygwin, JonY

> * JonY <wba_l@hfref.fbheprsbetr.arg> [2011-08-22 18:05:33 +0800]:
>
> On 8/22/2011 09:26, Sam Steingold wrote:
>>> * Kai Tietz <xgvrgm70-tZ/Lr1R23zjA+OdD9eORHt@choyvp.tznar.bet> [2011-08-20 09:31:47 +0200]:
>>> 2011/8/20 JonY <jon_y-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-22 21:13                   ` Sam Steingold
@ 2011-08-22 22:19                     ` Charles Wilson
  2011-08-22 23:09                       ` JonY
  2011-08-23 14:24                       ` Sam Steingold
  0 siblings, 2 replies; 15+ messages in thread
From: Charles Wilson @ 2011-08-22 22:19 UTC (permalink / raw)
  To: cygwin

On 8/22/2011 5:13 PM, Sam Steingold wrote:
> PS. Why are cygwin/mingw and msys/mingw so different?

They are not different. In fact, 'cygwin/mingw.org' and 'msys/mingw.org'
are identical (except for the emulation environment under which they
run: msys vs. cygwin).

You're confused by the existence of the separate "mingw64" project.

There are three different "flavors" of mingw-ish compilers:
  1. mingw.org (32bit only)

  2. mingw64.sf.net
     a) 32bit
     b) 64bit

Cygwin provides cross-compiler toolchains for each of these three "flavors":

1)  i686-pc-mingw32-gcc
2a) i686-w64-mingw32-gcc
2b) x86_64-w64-mingw32-gcc

The mingw.org compilers, cygwin's mingw.org-target cross compiler, (and
cygwin's own native compilers) all use the "mingwrt" MinGW runtime
library (linkage to the MS C runtime librar[ies] and headers, plus
special additions like libmingwex, etc *), and the "w32api"
headers/import libs for access to the Windows facilities (windows.h,
libwinspool.a, etc **).

* Think "<stdio.h>", "<conio.h>", "<strings.h>" and msvcrt.dll
** Think "<windows.h>", "<ddk/ntapi.h>", libkernel.a...

The mingw64.sf.net compilers and cygwin's mingw.sf.net-target cross
compilers use an independently developed implementation of both a
"mingw" runtime and Win32 API headers/import libs.  However, mingw64
makes no distinction between stuff that is strictly Win32 API-related
(like windows.h or libwinspool.a), and stuff that is mingw-compiler
related (like libmingwex.a).  Instead, they distinguish between
"headers" and "libs".  So, they have "mingw-w64-crt" (the libs), and
"mingw-w64-headers".

> which is "correct"? which is "better"?

Depends on what you want to do.  The "gcc" is mostly the same; both
flavors are derived from the same upstream source.  The difference is
mainly:

1) Exception handling
  a) mingw.org uses "dwarf2 exception handling". MUCH faster (**wrt
exceptions**), but not compatible with certain kinds of windows programming.

  b) mingw64.sf.net uses "sjlj exception handling".  This is slower, but
always works.  They use it because of the compatibility issue above, but
also because sjlj just plain can't work in 64bit mode.  Since they want
both their 32bit and 64bit compilers to use the same flavor, they're
stuck with sjlj.  They are working on a SEH-based implementation for
gcc; once that is complete, I expect that both mingw.org and
mingw64.sf.net will probably switch to using SEH.

2) The runtime libs and w32api used. Explained above. mingw64's
implementation is more complete -- but that's a relative term. You can
do quite a bit with mingw.org's version...like, the entire cygwin
distribution...

3) bitdepth.  Should be obvious, but: mingw.org is 32bit only.
mingw64.sf.net supports both 32bit and 64bit (but usually with separate
toolchains; multilib is supported, but not encouraged).

> will they ever converge?

The mingw-ish bits (scattered between mingw-w64-headers and
mingw-w64-crt) could be shared between the two projects.  It would just
take a bit of work to tease them out, given that the file structure and
build machinery of the two projects are so different.

OTOH, the w32api stuff would require just as much work (per file, and
there are a LOT more w32api files than mingwrt ones), but there's also a
bit of a spat concerning licensing, provenance tracking, and the like.
Both sides think they are right, and the other side is taking foolish
risks or being needlessly paranoid.  Search the projects' mailing list
archives and discuss the issues there, NOT here. We don't want to
(re)start that old flame war on the cygwin lists.

So...while there have been small movements toward a rapprochement, odds
are pretty low.



BTW, there is yet another flavor of mingw-ish compiler, produced by a
fourth party: the "TDM" compilers.  It's a repackaging of the mingw.org
and mingw64.sf.net compilers, with local customizations. It comes in
three editions:
  mingw.org-based, dwarf2 (like mingw.org official, but patched)
  mingw.org-based, sjlj
  mingw64.sf.net          (like mingw.sf.net official, but patched)
Confused, yet?  http://tdm-gcc.tdragon.net/start


--
Chuck

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-22 22:19                     ` Charles Wilson
@ 2011-08-22 23:09                       ` JonY
  2011-08-23 14:24                       ` Sam Steingold
  1 sibling, 0 replies; 15+ messages in thread
From: JonY @ 2011-08-22 23:09 UTC (permalink / raw)
  To: cygwin, mingw-w64-public

[-- Attachment #1: Type: text/plain, Size: 3980 bytes --]

On 8/23/2011 06:18, Charles Wilson wrote:
> On 8/22/2011 5:13 PM, Sam Steingold wrote:
>> PS. Why are cygwin/mingw and msys/mingw so different?
> 
> They are not different. In fact, 'cygwin/mingw.org' and 'msys/mingw.org'
> are identical (except for the emulation environment under which they
> run: msys vs. cygwin).
> 
> You're confused by the existence of the separate "mingw64" project.
> 
> There are three different "flavors" of mingw-ish compilers:
>   1. mingw.org (32bit only)
> 
>   2. mingw64.sf.net
>      a) 32bit
>      b) 64bit
> 
> Cygwin provides cross-compiler toolchains for each of these three "flavors":
> 
> 1)  i686-pc-mingw32-gcc
> 2a) i686-w64-mingw32-gcc
> 2b) x86_64-w64-mingw32-gcc
> 
> The mingw.org compilers, cygwin's mingw.org-target cross compiler, (and
> cygwin's own native compilers) all use the "mingwrt" MinGW runtime
> library (linkage to the MS C runtime librar[ies] and headers, plus
> special additions like libmingwex, etc *), and the "w32api"
> headers/import libs for access to the Windows facilities (windows.h,
> libwinspool.a, etc **).
> 
> * Think "<stdio.h>", "<conio.h>", "<strings.h>" and msvcrt.dll
> ** Think "<windows.h>", "<ddk/ntapi.h>", libkernel.a...
> 
> The mingw64.sf.net compilers and cygwin's mingw.sf.net-target cross
> compilers use an independently developed implementation of both a
> "mingw" runtime and Win32 API headers/import libs.  However, mingw64
> makes no distinction between stuff that is strictly Win32 API-related
> (like windows.h or libwinspool.a), and stuff that is mingw-compiler
> related (like libmingwex.a).  Instead, they distinguish between
> "headers" and "libs".  So, they have "mingw-w64-crt" (the libs), and
> "mingw-w64-headers".
> 

The difference also make it hard to build Cygwin off of mingw-w64
headers/crt, since the Cygnus tree has always been using the mingw.org
flavor.

>> which is "correct"? which is "better"?
> 
> Depends on what you want to do.  The "gcc" is mostly the same; both
> flavors are derived from the same upstream source.  The difference is
> mainly:
> 
> 1) Exception handling
>   a) mingw.org uses "dwarf2 exception handling". MUCH faster (**wrt
> exceptions**), but not compatible with certain kinds of windows programming.
> 
>   b) mingw64.sf.net uses "sjlj exception handling".  This is slower, but
> always works.  They use it because of the compatibility issue above, but
> also because sjlj just plain can't work in 64bit mode.  Since they want
> both their 32bit and 64bit compilers to use the same flavor, they're
> stuck with sjlj.  They are working on a SEH-based implementation for
> gcc; once that is complete, I expect that both mingw.org and
> mingw64.sf.net will probably switch to using SEH.
> 

You mean dw2 not working on win64, but yes, there is some SEH support
for win64 already, but not much yet for win32 afaik.

> 2) The runtime libs and w32api used. Explained above. mingw64's
> implementation is more complete -- but that's a relative term. You can
> do quite a bit with mingw.org's version...like, the entire cygwin
> distribution...
> 

mingw-w64 mainly serves XP and later, so if you want to support earlier
versions of Windows, you'll need to try your luck, or just use mingw.org.

mingw-w64 also imports works from ReactOS and Wine, while this leads to
a more complete API set, it is also hard to argue that its completely
public domain like mingw.org, so there is that licensing preference for
the user.

> 3) bitdepth.  Should be obvious, but: mingw.org is 32bit only.
> mingw64.sf.net supports both 32bit and 64bit (but usually with separate
> toolchains; multilib is supported, but not encouraged).
> 

The multilib gcc builds require some manual dexterity to get it right
without messing up target support libs install, since all DLLs want to
go into bindir regardless of bitness, I'm not sure if they fixed this in
gcc trunk.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 196 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: i686-w64-mingw32-gcc & ntifs.h
  2011-08-22 22:19                     ` Charles Wilson
  2011-08-22 23:09                       ` JonY
@ 2011-08-23 14:24                       ` Sam Steingold
  1 sibling, 0 replies; 15+ messages in thread
From: Sam Steingold @ 2011-08-23 14:24 UTC (permalink / raw)
  To: cygwin, Charles Wilson

> * Charles Wilson <pltjva@pjvyfba.snfgznvy.sz> [2011-08-22 18:18:45 -0400]:
>
> On 8/22/2011 5:13 PM, Sam Steingold wrote:
>> PS. Why are cygwin/mingw and msys/mingw so different?
>
> They are not different. In fact, 'cygwin/mingw.org' and 'msys/mingw.org'
> are identical (except for the emulation environment under which they
> run: msys vs. cygwin).
>
> You're confused by the existence of the separate "mingw64" project.
>
> There are three different "flavors" of mingw-ish compilers:
>   1. mingw.org (32bit only)
>
>   2. mingw64.sf.net
>      a) 32bit
>      b) 64bit
>
> Cygwin provides cross-compiler toolchains for each of these three "flavors":
>
> 1)  i686-pc-mingw32-gcc
> 2a) i686-w64-mingw32-gcc
> 2b) x86_64-w64-mingw32-gcc

OK, thanks. The bottom line is that I should stick with
i686-pc-mingw32-gcc and forget the others even exist. Cool.

Now,

$ egrep -r '#define *STATUS_SUCCESS' /usr/*-mingw32/sys-root/mingw/include/
/usr/i686-pc-mingw32/sys-root/mingw/include/ddk/ntstatus.h:#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
/usr/i686-pc-mingw32/sys-root/mingw/include/ntdef.h:#define STATUS_SUCCESS ((NTSTATUS)0)
/usr/i686-pc-mingw32/sys-root/mingw/include/subauth.h:#define STATUS_SUCCESS 0
/usr/i686-w64-mingw32/sys-root/mingw/include/ntstatus.h:#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
/usr/i686-w64-mingw32/sys-root/mingw/include/subauth.h:#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
/usr/x86_64-w64-mingw32/sys-root/mingw/include/ntstatus.h:#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
/usr/x86_64-w64-mingw32/sys-root/mingw/include/subauth.h:#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)

Which one should I include for STATUS_SUCCESS: ddk/ntstatus or ntdef?
(I am using i686-pc-mingw32-gcc now exclusively).

Note that both w64 versions have ntstatus.h in the right place (defined
as the place where visual studio places it).
Is this a known bug in mingw?
Will it be fixed?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031
http://openvotingconsortium.org http://jihadwatch.org http://palestinefacts.org
http://www.memritv.org http://mideasttruth.com http://ffii.org
Lottery is a tax on statistics ignorants.  MS is a tax on computer-idiots.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-08-23 14:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-18 15:44 i686-w64-mingw32-gcc & ntifs.h Sam Steingold
2011-08-18 22:39 ` JonY
2011-08-18 23:37   ` Sam Steingold
2011-08-19 10:20     ` JonY
2011-08-19 12:01       ` Corinna Vinschen
2011-08-19 14:03         ` JonY
2011-08-19 18:39         ` Sam Steingold
2011-08-20  1:08           ` JonY
2011-08-20  7:32             ` [Mingw-w64-public] " Kai Tietz
2011-08-22  1:26               ` Sam Steingold
2011-08-22 10:06                 ` JonY
2011-08-22 21:13                   ` Sam Steingold
2011-08-22 22:19                     ` Charles Wilson
2011-08-22 23:09                       ` JonY
2011-08-23 14:24                       ` Sam Steingold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).