[6] include/ddk/winddk.h

"Filip Navara" <xnavara-VIXq6x/[email protected]> Fri, 12 Dec 2003 21:11:32 +0100
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <00dd01c3c0ec$fa988420$fc4cb13e@hornet>
patch6.log (application/octet-stream, 136 B)
2003-12-12  Filip Navara  <xnavara-VIXq6x/[email protected]>

	* include/ddk/winddk.h: Fixes for nameless structures and DBG macro.
patch6.diff (application/octet-stream, 2.1 KB)
--- include/ddk/winddk.h	Fri Sep 12 13:24:46 2003
+++ include/ddk/winddk.h	Fri Dec 12 15:59:11 2003
@@ -3161,7 +3161,7 @@
 
 typedef struct _IO_REMOVE_LOCK {
   IO_REMOVE_LOCK_COMMON_BLOCK  Common;
-#if DBG
+#ifdef DBG
   IO_REMOVE_LOCK_DBG_BLOCK  Dbg;
 #endif
 } IO_REMOVE_LOCK, *PIO_REMOVE_LOCK;
@@ -3938,7 +3938,7 @@
   IN ULONG  LineNumber,
   IN PCHAR  Message);
 
-#if DBG
+#ifdef DBG
 
 #define ASSERT(exp) \
   ((!(exp)) ? \
@@ -5048,7 +5048,11 @@
 	Lookaside->TotalAllocates++;
   Entry = InterlockedPopEntrySList(&Lookaside->ListHead);
 	if (Entry == NULL) {
+#ifdef NONAMELESSSTRUCT
+		Lookaside->u.AllocateMisses++;
+#else
 		Lookaside->AllocateMisses++;
+#endif
 		Entry = (Lookaside->Allocate)(Lookaside->Type, Lookaside->Size, Lookaside->Tag);
 	}
   return Entry;
@@ -5063,7 +5067,11 @@
   Lookaside->TotalAllocates++;
   Entry = InterlockedPopEntrySList(&Lookaside->ListHead);
   if (Entry == NULL) {
+#ifdef NONAMELESSSTRUCT
+    Lookaside->u.AllocateMisses++;
+#else
     Lookaside->AllocateMisses++;
+#endif
     Entry = (Lookaside->Allocate)(Lookaside->Type,
       Lookaside->Size, Lookaside->Tag);
   }
@@ -5179,7 +5187,11 @@
 {
   Lookaside->TotalFrees++;
 	if (ExQueryDepthSList(&Lookaside->ListHead) >= Lookaside->Depth) {
+#ifdef NONAMELESSSTRUCT
+		Lookaside->u2.FreeMisses++;
+#else
 		Lookaside->FreeMisses++;
+#endif
 		(Lookaside->Free)(Entry);
   } else {
 		InterlockedPushEntrySList(&Lookaside->ListHead,
@@ -5194,7 +5206,11 @@
 {
   Lookaside->TotalFrees++;
   if (ExQueryDepthSList(&Lookaside->ListHead) >= Lookaside->Depth) {
+#ifdef NONAMELESSSTRUCT
+    Lookaside->u2.FreeMisses++;
+#else
     Lookaside->FreeMisses++;
+#endif
     (Lookaside->Free)(Entry);
   } else {
     InterlockedPushEntrySList(&Lookaside->ListHead, (PSLIST_ENTRY)Entry);
@@ -5532,7 +5548,7 @@
 ExVerifySuite(
   IN SUITE_TYPE  SuiteType);
 
-#if DBG
+#ifdef DBG
 
 #define PAGED_CODE() { \
   if (KeGetCurrentIrql() > APC_LEVEL) { \
@@ -9059,7 +9075,7 @@
   IN ULONG  Level,
   IN BOOLEAN  State);
 
-#if DBG
+#ifdef DBG
 
 #define KdPrint(_x_) DbgPrint _x_
 #define KdPrintEx(_x_) DbgPrintEx _x_