Corrected oleauto.h treating named/nameless definitions.
git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@42 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/ChangeLog b/mingw-w64-headers/include/ChangeLog
index 2815405..3d2e355 100755
--- a/mingw-w64-headers/include/ChangeLog
+++ b/mingw-w64-headers/include/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-22 Professor Brian Ripley <ripley@stats.ox.ac.uk>
+
+ * oleauto.h: Corrected use of NONAMELESSUNION and
+ _FORCENAMELESSUNION.
+
2007-08-21 Kai Tietz <kai.tietz@onevision.com>
* ctype.h: wchar.h: Add isblank () and iswblank ().
diff --git a/mingw-w64-headers/include/oleauto.h b/mingw-w64-headers/include/oleauto.h
index 39785e8..1811255 100755
--- a/mingw-w64-headers/include/oleauto.h
+++ b/mingw-w64-headers/include/oleauto.h
@@ -650,10 +650,17 @@
WINOLEAUTAPI_(ULONG) OaBuildVersion(void);
WINOLEAUTAPI_(void) ClearCustData(LPCUSTDATA pCustData);
+#if !defined(_FORCENAMELESSUNION) || defined(NONAMELESSUNION)
#define V_UNION(X,Y) ((X)->n1.n2.n3.Y)
#define V_VT(X) ((X)->n1.n2.vt)
#define V_RECORDINFO(X) ((X)->n1.n2.n3.brecVal.pRecInfo)
#define V_RECORD(X) ((X)->n1.n2.n3.brecVal.pvRecord)
+#else
+#define V_UNION(X,Y) ((X)->Y)
+#define V_VT(X) ((X)->vt)
+#define V_RECORDINFO(X) ((X)->pRecInfo)
+#define V_RECORD(X) ((X)->pvRecord)
+#endif
#define V_ISBYREF(X) (V_VT(X)&VT_BYREF)
#define V_ISARRAY(X) (V_VT(X)&VT_ARRAY)