rpcrt4/tests: Fix compilation on systems that don't support nameless unions.

Francois Gouget fgouget at free.fr
Mon Aug 31 04:52:17 CDT 2009


Also omit the nameless union macros from the error messages for clarity.
---
 dlls/rpcrt4/tests/ndr_marshall.c |  126 +++++++++++++++++++-------------------
 1 files changed, 63 insertions(+), 63 deletions(-)

diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c
index 2aa8146..f4ef592 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -2063,21 +2063,21 @@ static void test_NdrGetUserMarshalInfo(void)
     ok( umi.InformationLevel == 1,
        "umi.InformationLevel was %u instead of 1\n",
         umi.InformationLevel);
-    ok( U(umi.Level1).Buffer == buffer + 15,
-       "U(umi.Level1).Buffer was %p instead of %p\n",
-        U(umi.Level1).Buffer, buffer);
-    ok( U(umi.Level1).BufferSize == 1,
-       "U(umi.Level1).BufferSize was %u instead of 1\n",
-        U(umi.Level1).BufferSize);
-    ok( U(umi.Level1).pfnAllocate == my_alloc,
-       "U(umi.Level1).pfnAllocate was %p instead of %p\n",
-        U(umi.Level1).pfnAllocate, my_alloc);
-    ok( U(umi.Level1).pfnFree == my_free,
-       "U(umi.Level1).pfnFree was %p instead of %p\n",
-        U(umi.Level1).pfnFree, my_free);
-    ok( U(umi.Level1).pRpcChannelBuffer == rpc_channel_buffer,
-       "U(umi.Level1).pRpcChannelBuffer was %p instead of %p\n",
-        U(umi.Level1).pRpcChannelBuffer, rpc_channel_buffer);
+    ok( U1(umi).Level1.Buffer == buffer + 15,
+       "umi.Level1.Buffer was %p instead of %p\n",
+        U1(umi).Level1.Buffer, buffer);
+    ok( U1(umi).Level1.BufferSize == 1,
+       "umi.Level1.BufferSize was %u instead of 1\n",
+        U1(umi).Level1.BufferSize);
+    ok( U1(umi).Level1.pfnAllocate == my_alloc,
+       "umi.Level1.pfnAllocate was %p instead of %p\n",
+        U1(umi).Level1.pfnAllocate, my_alloc);
+    ok( U1(umi).Level1.pfnFree == my_free,
+       "umi.Level1.pfnFree was %p instead of %p\n",
+        U1(umi).Level1.pfnFree, my_free);
+    ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer,
+       "umi.Level1.pRpcChannelBuffer was %p instead of %p\n",
+        U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer);
 
     /* buffer size */
 
@@ -2097,21 +2097,21 @@ static void test_NdrGetUserMarshalInfo(void)
     ok( umi.InformationLevel == 1,
        "umi.InformationLevel was %u instead of 1\n",
         umi.InformationLevel);
-    ok( U(umi.Level1).Buffer == NULL,
-       "U(umi.Level1).Buffer was %p instead of NULL\n",
-        U(umi.Level1).Buffer);
-    ok( U(umi.Level1).BufferSize == 0,
-       "U(umi.Level1).BufferSize was %u instead of 0\n",
-        U(umi.Level1).BufferSize);
-    ok( U(umi.Level1).pfnAllocate == my_alloc,
-       "U(umi.Level1).pfnAllocate was %p instead of %p\n",
-        U(umi.Level1).pfnAllocate, my_alloc);
-    ok( U(umi.Level1).pfnFree == my_free,
-       "U(umi.Level1).pfnFree was %p instead of %p\n",
-        U(umi.Level1).pfnFree, my_free);
-    ok( U(umi.Level1).pRpcChannelBuffer == rpc_channel_buffer,
-       "U(umi.Level1).pRpcChannelBuffer was %p instead of %p\n",
-        U(umi.Level1).pRpcChannelBuffer, rpc_channel_buffer);
+    ok( U1(umi).Level1.Buffer == NULL,
+       "umi.Level1.Buffer was %p instead of NULL\n",
+        U1(umi).Level1.Buffer);
+    ok( U1(umi).Level1.BufferSize == 0,
+       "umi.Level1.BufferSize was %u instead of 0\n",
+        U1(umi).Level1.BufferSize);
+    ok( U1(umi).Level1.pfnAllocate == my_alloc,
+       "umi.Level1.pfnAllocate was %p instead of %p\n",
+        U1(umi).Level1.pfnAllocate, my_alloc);
+    ok( U1(umi).Level1.pfnFree == my_free,
+       "umi.Level1.pfnFree was %p instead of %p\n",
+        U1(umi).Level1.pfnFree, my_free);
+    ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer,
+       "umi.Level1.pRpcChannelBuffer was %p instead of %p\n",
+        U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer);
 
     /* marshall */
 
@@ -2131,21 +2131,21 @@ static void test_NdrGetUserMarshalInfo(void)
     ok( umi.InformationLevel == 1,
        "umi.InformationLevel was %u instead of 1\n",
         umi.InformationLevel);
-    ok( U(umi.Level1).Buffer == buffer + 15,
-       "U(umi.Level1).Buffer was %p instead of %p\n",
-        U(umi.Level1).Buffer, buffer);
-    ok( U(umi.Level1).BufferSize == 1,
-       "U(umi.Level1).BufferSize was %u instead of 1\n",
-        U(umi.Level1).BufferSize);
-    ok( U(umi.Level1).pfnAllocate == my_alloc,
-       "U(umi.Level1).pfnAllocate was %p instead of %p\n",
-        U(umi.Level1).pfnAllocate, my_alloc);
-    ok( U(umi.Level1).pfnFree == my_free,
-       "U(umi.Level1).pfnFree was %p instead of %p\n",
-        U(umi.Level1).pfnFree, my_free);
-    ok( U(umi.Level1).pRpcChannelBuffer == rpc_channel_buffer,
-       "U(umi.Level1).pRpcChannelBuffer was %p instead of %p\n",
-        U(umi.Level1).pRpcChannelBuffer, rpc_channel_buffer);
+    ok( U1(umi).Level1.Buffer == buffer + 15,
+       "umi.Level1.Buffer was %p instead of %p\n",
+        U1(umi).Level1.Buffer, buffer);
+    ok( U1(umi).Level1.BufferSize == 1,
+       "umi.Level1.BufferSize was %u instead of 1\n",
+        U1(umi).Level1.BufferSize);
+    ok( U1(umi).Level1.pfnAllocate == my_alloc,
+       "umi.Level1.pfnAllocate was %p instead of %p\n",
+        U1(umi).Level1.pfnAllocate, my_alloc);
+    ok( U1(umi).Level1.pfnFree == my_free,
+       "umi.Level1.pfnFree was %p instead of %p\n",
+        U1(umi).Level1.pfnFree, my_free);
+    ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer,
+       "umi.Level1.pRpcChannelBuffer was %p instead of %p\n",
+        U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer);
 
     /* free */
 
@@ -2165,21 +2165,21 @@ static void test_NdrGetUserMarshalInfo(void)
     ok( umi.InformationLevel == 1,
        "umi.InformationLevel was %u instead of 1\n",
         umi.InformationLevel);
-    ok( U(umi.Level1).Buffer == NULL,
-       "U(umi.Level1).Buffer was %p instead of NULL\n",
-        U(umi.Level1).Buffer);
-    ok( U(umi.Level1).BufferSize == 0,
-       "U(umi.Level1).BufferSize was %u instead of 0\n",
-        U(umi.Level1).BufferSize);
-    ok( U(umi.Level1).pfnAllocate == my_alloc,
-       "U(umi.Level1).pfnAllocate was %p instead of %p\n",
-        U(umi.Level1).pfnAllocate, my_alloc);
-    ok( U(umi.Level1).pfnFree == my_free,
-       "U(umi.Level1).pfnFree was %p instead of %p\n",
-        U(umi.Level1).pfnFree, my_free);
-    ok( U(umi.Level1).pRpcChannelBuffer == rpc_channel_buffer,
-       "U(umi.Level1).pRpcChannelBuffer was %p instead of %p\n",
-        U(umi.Level1).pRpcChannelBuffer, rpc_channel_buffer);
+    ok( U1(umi).Level1.Buffer == NULL,
+       "umi.Level1.Buffer was %p instead of NULL\n",
+        U1(umi).Level1.Buffer);
+    ok( U1(umi).Level1.BufferSize == 0,
+       "umi.Level1.BufferSize was %u instead of 0\n",
+        U1(umi).Level1.BufferSize);
+    ok( U1(umi).Level1.pfnAllocate == my_alloc,
+       "umi.Level1.pfnAllocate was %p instead of %p\n",
+        U1(umi).Level1.pfnAllocate, my_alloc);
+    ok( U1(umi).Level1.pfnFree == my_free,
+       "umi.Level1.pfnFree was %p instead of %p\n",
+        U1(umi).Level1.pfnFree, my_free);
+    ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer,
+       "umi.Level1.pRpcChannelBuffer was %p instead of %p\n",
+        U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer);
 
     /* boundary test */
 
@@ -2194,9 +2194,9 @@ static void test_NdrGetUserMarshalInfo(void)
 
     status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi);
     ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status);
-    ok( U(umi.Level1).BufferSize == 0,
-       "U(umi.Level1).BufferSize was %u instead of 0\n",
-        U(umi.Level1).BufferSize);
+    ok( U1(umi).Level1.BufferSize == 0,
+       "umi.Level1.BufferSize was %u instead of 0\n",
+        U1(umi).Level1.BufferSize);
 
     /* error conditions */
 
-- 
1.6.3.3




More information about the wine-patches mailing list