Fix compilation with gcc 2.95.

Francois Gouget fgouget at free.fr
Sun Oct 15 10:07:13 CDT 2006


---
 dlls/crypt32/cert.c              |   10 ++++++----
 dlls/d3d9/tests/stateblock.c     |    9 +++++----
 dlls/ole32/tests/hglobalstream.c |    8 ++++----
 dlls/shell32/recyclebin.c        |   11 ++++++-----
 4 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index c1a638a..fd39ef3 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -19,6 +19,8 @@
 
 #include <assert.h>
 #include <stdarg.h>
+
+#define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
 #include "wincrypt.h"
@@ -1241,7 +1243,7 @@ BOOL WINAPI CryptSignCertificate(HCRYPTP
     {
         if (!hCryptProv)
             hCryptProv = CRYPT_GetDefaultProvider();
-        ret = CryptCreateHash(hCryptProv, info->Algid, 0, 0, &hHash);
+        ret = CryptCreateHash(hCryptProv, info->u.Algid, 0, 0, &hHash);
         if (ret)
         {
             ret = CryptHashData(hHash, pbEncodedToBeSigned,
@@ -1261,7 +1263,7 @@ BOOL WINAPI CryptSignCertificate(HCRYPTP
         }
         else
         {
-            ret = CryptCreateHash(hCryptProv, info->Algid, 0, 0, &hHash);
+            ret = CryptCreateHash(hCryptProv, info->u.Algid, 0, 0, &hHash);
             if (ret)
             {
                 ret = CryptHashData(hHash, pbEncodedToBeSigned,
@@ -1365,7 +1367,7 @@ static BOOL CRYPT_VerifyCertSignatureFro
     }
     if (info->dwGroupId == CRYPT_PUBKEY_ALG_OID_GROUP_ID)
     {
-        switch (info->Algid)
+        switch (info->u.Algid)
         {
             case CALG_RSA_KEYX:
                 pubKeyID = CALG_RSA_SIGN;
@@ -1382,7 +1384,7 @@ static BOOL CRYPT_VerifyCertSignatureFro
     }
     else
     {
-        hashID = info->Algid;
+        hashID = info->u.Algid;
         if (info->ExtraInfo.cbData >= sizeof(ALG_ID))
             pubKeyID = *(ALG_ID *)info->ExtraInfo.pbData;
         else
diff --git a/dlls/d3d9/tests/stateblock.c b/dlls/d3d9/tests/stateblock.c
index 983a852..a18ae13 100644
--- a/dlls/d3d9/tests/stateblock.c
+++ b/dlls/d3d9/tests/stateblock.c
@@ -18,6 +18,7 @@
  */
 
 #define COBJMACROS
+#define NONAMELESSUNION
 #include <d3d9.h>
 #include "wine/test.h"
 
@@ -786,10 +787,10 @@ static inline void print_matrix(
     const char* name, const D3DMATRIX* matrix) {
 
     trace("%s Matrix = {\n", name);
-    trace("    %f %f %f %f\n", matrix->m[0][0], matrix->m[1][0], matrix->m[2][0], matrix->m[3][0]);
-    trace("    %f %f %f %f\n", matrix->m[0][1], matrix->m[1][1], matrix->m[2][1], matrix->m[3][1]);
-    trace("    %f %f %f %f\n", matrix->m[0][2], matrix->m[1][2], matrix->m[2][2], matrix->m[3][2]);
-    trace("    %f %f %f %f\n", matrix->m[0][3], matrix->m[1][3], matrix->m[2][3], matrix->m[3][3]);
+    trace("    %f %f %f %f\n", matrix->u.m[0][0], matrix->u.m[1][0], matrix->u.m[2][0], matrix->u.m[3][0]);
+    trace("    %f %f %f %f\n", matrix->u.m[0][1], matrix->u.m[1][1], matrix->u.m[2][1], matrix->u.m[3][1]);
+    trace("    %f %f %f %f\n", matrix->u.m[0][2], matrix->u.m[1][2], matrix->u.m[2][2], matrix->u.m[3][2]);
+    trace("    %f %f %f %f\n", matrix->u.m[0][3], matrix->u.m[1][3], matrix->u.m[2][3], matrix->u.m[3][3]);
     trace("}\n");
 }
 
diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c
index 482ef1b..29c11ea 100644
--- a/dlls/ole32/tests/hglobalstream.c
+++ b/dlls/ole32/tests/hglobalstream.c
@@ -57,8 +57,8 @@ static void test_streamonhglobal(IStream
     ok(read == sizeof(data), "IStream_Read returned read %ld\n", read);
 
     /* ignores HighPart */
-    ull.HighPart = -1;
-    ull.LowPart = 0;
+    ull.u.HighPart = -1;
+    ull.u.LowPart = 0;
     hr = IStream_SetSize(pStream, ull);
     ok_ole_success(hr, "IStream_SetSize");
 
@@ -76,8 +76,8 @@ static void test_streamonhglobal(IStream
     ok(statstg.type == STGTY_STREAM, "statstg.type should have been STGTY_STREAM instead of %ld\n", statstg.type);
 
     /* test OOM condition */
-    ull.HighPart = -1;
-    ull.LowPart = -1;
+    ull.u.HighPart = -1;
+    ull.u.LowPart = -1;
     hr = IStream_SetSize(pStream, ull);
     todo_wine {
     ok(hr == E_OUTOFMEMORY, "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08lx\n", hr);
diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c
index 1582dee..440ed70 100644
--- a/dlls/shell32/recyclebin.c
+++ b/dlls/shell32/recyclebin.c
@@ -21,6 +21,7 @@
 #include "config.h"
 
 #define COBJMACROS
+#define NONAMELESSUNION
 
 #include <stdarg.h>
 
@@ -312,8 +313,8 @@ static HRESULT WINAPI RecycleBin_GetDisp
     TRACE("(%p, %p, %x, %p)\n", This, pidl, (unsigned int)uFlags, pName);
     TRASH_UnpackItemID(&pidl->mkid, NULL, &data);
     pName->uType = STRRET_WSTR;
-    pName->pOleStr = StrDupW(PathFindFileNameW(data.cFileName));
-    if (pName->pOleStr == NULL)
+    pName->u.pOleStr = StrDupW(PathFindFileNameW(data.cFileName));
+    if (pName->u.pOleStr == NULL)
         return E_OUTOFMEMORY;
 
     return S_OK;
@@ -407,7 +408,7 @@ static HRESULT WINAPI RecycleBin_GetDeta
     {
         pDetails->str.uType = STRRET_WSTR;
         LoadStringW(shell32_hInstance, RecycleBinColumns[iColumn].column_name_id, buffer, MAX_PATH);
-        return SHStrDupW(buffer, &pDetails->str.pOleStr);
+        return SHStrDupW(buffer, &pDetails->str.u.pOleStr);
     }
 
     if (iColumn == COLUMN_NAME)
@@ -438,8 +439,8 @@ static HRESULT WINAPI RecycleBin_GetDeta
     }
     
     pDetails->str.uType = STRRET_WSTR;
-    pDetails->str.pOleStr = StrDupW(buffer);
-    return (pDetails->str.pOleStr != NULL ? S_OK : E_OUTOFMEMORY);
+    pDetails->str.u.pOleStr = StrDupW(buffer);
+    return (pDetails->str.u.pOleStr != NULL ? S_OK : E_OUTOFMEMORY);
 }
 
 static HRESULT WINAPI RecycleBin_MapColumnToSCID(IShellFolder2 *iface, UINT iColumn, SHCOLUMNID *pscid)
-- 
1.4.1.1




More information about the wine-patches mailing list