[1/2] wdm.h: define IoGetCurrentIrpStackLocation based on NONAMELESSUNION and NONAMELESSSTRUCT (try 3)

Damjan Jovanovic damjan.jov at gmail.com
Thu Mar 25 09:24:09 CDT 2010


Changelog:
* wdm.h: define IoGetCurrentIrpStackLocation based on NONAMELESSUNION
and NONAMELESSSTRUCT

Damjan Jovanovic
-------------- next part --------------
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index 95a27a8..102dda8 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1021,7 +1021,19 @@ typedef enum _MM_SYSTEM_SIZE
 
 NTSTATUS WINAPI ObCloseHandle(IN HANDLE handle);
 
-#define IoGetCurrentIrpStackLocation(_Irp) ((_Irp)->Tail.Overlay.CurrentStackLocation)
+#ifdef NONAMELESSUNION
+# ifdef NONAMELESSSTRUCT
+#  define IoGetCurrentIrpStackLocation(_Irp) ((_Irp)->Tail.Overlay.s.u2.CurrentStackLocation)
+# else
+#  define IoGetCurrentIrpStackLocation(_Irp) ((_Irp)->Tail.Overlay.u2.CurrentStackLocation)
+# endif
+#else
+# ifdef NONAMELESSSTRUCT
+#  define IoGetCurrentIrpStackLocation(_Irp) ((_Irp)->Tail.Overlay.s.CurrentStackLocation)
+# else
+#  define IoGetCurrentIrpStackLocation(_Irp) ((_Irp)->Tail.Overlay.CurrentStackLocation)
+# endif
+#endif
 
 #define KernelMode 0
 #define UserMode   1


More information about the wine-patches mailing list