Author: tkreuzer
Date: Mon May 31 04:23:30 2010
New Revision: 47481

URL: http://svn.reactos.org/svn/reactos?rev=47481&view=rev
Log:
Fix build (don't redefine structures)

Modified:
    trunk/reactos/include/ddk/wdm.h
    trunk/reactos/include/xdk/iotypes.h

Modified: trunk/reactos/include/ddk/wdm.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=47481&r1=47480&r2=47481&view=diff
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Mon May 31 04:23:30 2010
@@ -6594,6 +6594,65 @@
 /* While MS WDK uses inheritance in C++, we cannot do this with gcc, as
    inheritance, even from a struct renders the type non-POD. So we use
    this hack */
+
+    struct _PCI_HEADER_TYPE_0 {
+      ULONG BaseAddresses[PCI_TYPE0_ADDRESSES];
+      ULONG CIS;
+      USHORT SubVendorID;
+      USHORT SubSystemID;
+      ULONG ROMBaseAddress;
+      UCHAR CapabilitiesPtr;
+      UCHAR Reserved1[3];
+      ULONG Reserved2;
+      UCHAR InterruptLine;
+      UCHAR InterruptPin;
+      UCHAR MinimumGrant;
+      UCHAR MaximumLatency;
+    };
+
+    struct _PCI_HEADER_TYPE_1 {
+      ULONG BaseAddresses[PCI_TYPE1_ADDRESSES];
+      UCHAR PrimaryBus;
+      UCHAR SecondaryBus;
+      UCHAR SubordinateBus;
+      UCHAR SecondaryLatency;
+      UCHAR IOBase;
+      UCHAR IOLimit;
+      USHORT SecondaryStatus;
+      USHORT MemoryBase;
+      USHORT MemoryLimit;
+      USHORT PrefetchBase;
+      USHORT PrefetchLimit;
+      ULONG PrefetchBaseUpper32;
+      ULONG PrefetchLimitUpper32;
+      USHORT IOBaseUpper16;
+      USHORT IOLimitUpper16;
+      UCHAR CapabilitiesPtr;
+      UCHAR Reserved1[3];
+      ULONG ROMBaseAddress;
+      UCHAR InterruptLine;
+      UCHAR InterruptPin;
+      USHORT BridgeControl;
+    };
+
+    struct _PCI_HEADER_TYPE_2 {
+      ULONG SocketRegistersBaseAddress;
+      UCHAR CapabilitiesPtr;
+      UCHAR Reserved;
+      USHORT SecondaryStatus;
+      UCHAR PrimaryBus;
+      UCHAR SecondaryBus;
+      UCHAR SubordinateBus;
+      UCHAR SecondaryLatency;
+      struct {
+        ULONG Base;
+        ULONG Limit;
+      } Range[PCI_TYPE2_ADDRESSES-1];
+      UCHAR InterruptLine;
+      UCHAR InterruptPin;
+      USHORT BridgeControl;
+    };
+
 #define PCI_COMMON_HEADER_LAYOUT \
   USHORT VendorID; \
   USHORT DeviceID; \
@@ -6608,61 +6667,9 @@
   UCHAR HeaderType; \
   UCHAR BIST; \
   union { \
-    struct _PCI_HEADER_TYPE_0 { \
-      ULONG BaseAddresses[PCI_TYPE0_ADDRESSES]; \
-      ULONG CIS; \
-      USHORT SubVendorID; \
-      USHORT SubSystemID; \
-      ULONG ROMBaseAddress; \
-      UCHAR CapabilitiesPtr; \
-      UCHAR Reserved1[3]; \
-      ULONG Reserved2; \
-      UCHAR InterruptLine; \
-      UCHAR InterruptPin; \
-      UCHAR MinimumGrant; \
-      UCHAR MaximumLatency; \
-    } type0; \
-    struct _PCI_HEADER_TYPE_1 { \
-      ULONG BaseAddresses[PCI_TYPE1_ADDRESSES]; \
-      UCHAR PrimaryBus; \
-      UCHAR SecondaryBus; \
-      UCHAR SubordinateBus; \
-      UCHAR SecondaryLatency; \
-      UCHAR IOBase; \
-      UCHAR IOLimit; \
-      USHORT SecondaryStatus; \
-      USHORT MemoryBase; \
-      USHORT MemoryLimit; \
-      USHORT PrefetchBase; \
-      USHORT PrefetchLimit; \
-      ULONG PrefetchBaseUpper32; \
-      ULONG PrefetchLimitUpper32; \
-      USHORT IOBaseUpper16; \
-      USHORT IOLimitUpper16; \
-      UCHAR CapabilitiesPtr; \
-      UCHAR Reserved1[3]; \
-      ULONG ROMBaseAddress; \
-      UCHAR InterruptLine; \
-      UCHAR InterruptPin; \
-      USHORT BridgeControl; \
-    } type1; \
-    struct _PCI_HEADER_TYPE_2 { \
-      ULONG SocketRegistersBaseAddress; \
-      UCHAR CapabilitiesPtr; \
-      UCHAR Reserved; \
-      USHORT SecondaryStatus; \
-      UCHAR PrimaryBus; \
-      UCHAR SecondaryBus; \
-      UCHAR SubordinateBus; \
-      UCHAR SecondaryLatency; \
-      struct { \
-        ULONG Base; \
-        ULONG Limit; \
-      } Range[PCI_TYPE2_ADDRESSES-1]; \
-      UCHAR InterruptLine; \
-      UCHAR InterruptPin; \
-      USHORT BridgeControl; \
-    } type2; \
+    struct _PCI_HEADER_TYPE_0 type0; \
+    struct _PCI_HEADER_TYPE_1 type1; \
+    struct _PCI_HEADER_TYPE_2 type2; \
   } u;
 
 typedef struct _PCI_COMMON_HEADER {

Modified: trunk/reactos/include/xdk/iotypes.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/iotypes.h?rev=47481&r1=47480&r2=47481&view=diff
==============================================================================
--- trunk/reactos/include/xdk/iotypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/iotypes.h [iso-8859-1] Mon May 31 04:23:30 2010
@@ -2917,6 +2917,65 @@
 /* While MS WDK uses inheritance in C++, we cannot do this with gcc, as
    inheritance, even from a struct renders the type non-POD. So we use
    this hack */
+
+    struct _PCI_HEADER_TYPE_0 {
+      ULONG BaseAddresses[PCI_TYPE0_ADDRESSES];
+      ULONG CIS;
+      USHORT SubVendorID;
+      USHORT SubSystemID;
+      ULONG ROMBaseAddress;
+      UCHAR CapabilitiesPtr;
+      UCHAR Reserved1[3];
+      ULONG Reserved2;
+      UCHAR InterruptLine;
+      UCHAR InterruptPin;
+      UCHAR MinimumGrant;
+      UCHAR MaximumLatency;
+    };
+
+    struct _PCI_HEADER_TYPE_1 {
+      ULONG BaseAddresses[PCI_TYPE1_ADDRESSES];
+      UCHAR PrimaryBus;
+      UCHAR SecondaryBus;
+      UCHAR SubordinateBus;
+      UCHAR SecondaryLatency;
+      UCHAR IOBase;
+      UCHAR IOLimit;
+      USHORT SecondaryStatus;
+      USHORT MemoryBase;
+      USHORT MemoryLimit;
+      USHORT PrefetchBase;
+      USHORT PrefetchLimit;
+      ULONG PrefetchBaseUpper32;
+      ULONG PrefetchLimitUpper32;
+      USHORT IOBaseUpper16;
+      USHORT IOLimitUpper16;
+      UCHAR CapabilitiesPtr;
+      UCHAR Reserved1[3];
+      ULONG ROMBaseAddress;
+      UCHAR InterruptLine;
+      UCHAR InterruptPin;
+      USHORT BridgeControl;
+    };
+
+    struct _PCI_HEADER_TYPE_2 {
+      ULONG SocketRegistersBaseAddress;
+      UCHAR CapabilitiesPtr;
+      UCHAR Reserved;
+      USHORT SecondaryStatus;
+      UCHAR PrimaryBus;
+      UCHAR SecondaryBus;
+      UCHAR SubordinateBus;
+      UCHAR SecondaryLatency;
+      struct {
+        ULONG Base;
+        ULONG Limit;
+      } Range[PCI_TYPE2_ADDRESSES-1];
+      UCHAR InterruptLine;
+      UCHAR InterruptPin;
+      USHORT BridgeControl;
+    };
+
 #define PCI_COMMON_HEADER_LAYOUT \
   USHORT VendorID; \
   USHORT DeviceID; \
@@ -2931,61 +2990,9 @@
   UCHAR HeaderType; \
   UCHAR BIST; \
   union { \
-    struct _PCI_HEADER_TYPE_0 { \
-      ULONG BaseAddresses[PCI_TYPE0_ADDRESSES]; \
-      ULONG CIS; \
-      USHORT SubVendorID; \
-      USHORT SubSystemID; \
-      ULONG ROMBaseAddress; \
-      UCHAR CapabilitiesPtr; \
-      UCHAR Reserved1[3]; \
-      ULONG Reserved2; \
-      UCHAR InterruptLine; \
-      UCHAR InterruptPin; \
-      UCHAR MinimumGrant; \
-      UCHAR MaximumLatency; \
-    } type0; \
-    struct _PCI_HEADER_TYPE_1 { \
-      ULONG BaseAddresses[PCI_TYPE1_ADDRESSES]; \
-      UCHAR PrimaryBus; \
-      UCHAR SecondaryBus; \
-      UCHAR SubordinateBus; \
-      UCHAR SecondaryLatency; \
-      UCHAR IOBase; \
-      UCHAR IOLimit; \
-      USHORT SecondaryStatus; \
-      USHORT MemoryBase; \
-      USHORT MemoryLimit; \
-      USHORT PrefetchBase; \
-      USHORT PrefetchLimit; \
-      ULONG PrefetchBaseUpper32; \
-      ULONG PrefetchLimitUpper32; \
-      USHORT IOBaseUpper16; \
-      USHORT IOLimitUpper16; \
-      UCHAR CapabilitiesPtr; \
-      UCHAR Reserved1[3]; \
-      ULONG ROMBaseAddress; \
-      UCHAR InterruptLine; \
-      UCHAR InterruptPin; \
-      USHORT BridgeControl; \
-    } type1; \
-    struct _PCI_HEADER_TYPE_2 { \
-      ULONG SocketRegistersBaseAddress; \
-      UCHAR CapabilitiesPtr; \
-      UCHAR Reserved; \
-      USHORT SecondaryStatus; \
-      UCHAR PrimaryBus; \
-      UCHAR SecondaryBus; \
-      UCHAR SubordinateBus; \
-      UCHAR SecondaryLatency; \
-      struct { \
-        ULONG Base; \
-        ULONG Limit; \
-      } Range[PCI_TYPE2_ADDRESSES-1]; \
-      UCHAR InterruptLine; \
-      UCHAR InterruptPin; \
-      USHORT BridgeControl; \
-    } type2; \
+    struct _PCI_HEADER_TYPE_0 type0; \
+    struct _PCI_HEADER_TYPE_1 type1; \
+    struct _PCI_HEADER_TYPE_2 type2; \
   } u;
 
 typedef struct _PCI_COMMON_HEADER {


Reply via email to