Francois Gouget : wininet/tests: Fix compilation on systems that don' t support nameless unions.
Alexandre Julliard
julliard at winehq.org
Fri Mar 18 11:30:17 CDT 2011
Module: wine
Branch: master
Commit: 4abe4cf1b1c6c619804ea6f7e3c78715820efe32
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4abe4cf1b1c6c619804ea6f7e3c78715820efe32
Author: Francois Gouget <fgouget at free.fr>
Date: Thu Mar 17 18:06:03 2011 +0100
wininet/tests: Fix compilation on systems that don't support nameless unions.
---
dlls/wininet/tests/urlcache.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/wininet/tests/urlcache.c b/dlls/wininet/tests/urlcache.c
index e003293..5c12a81 100644
--- a/dlls/wininet/tests/urlcache.c
+++ b/dlls/wininet/tests/urlcache.c
@@ -235,11 +235,11 @@ static void test_IsUrlCacheEntryExpiredA(void)
info = HeapAlloc(GetProcessHeap(), 0, size);
ret = GetUrlCacheEntryInfo(TEST_URL, info, &size);
GetSystemTimeAsFileTime(&info->ExpireTime);
- exp_time.LowPart = info->ExpireTime.dwLowDateTime;
- exp_time.HighPart = info->ExpireTime.dwHighDateTime;
+ exp_time.u.LowPart = info->ExpireTime.dwLowDateTime;
+ exp_time.u.HighPart = info->ExpireTime.dwHighDateTime;
exp_time.QuadPart -= 10 * 60 * (ULONGLONG)10000000;
- info->ExpireTime.dwLowDateTime = exp_time.LowPart;
- info->ExpireTime.dwHighDateTime = exp_time.HighPart;
+ info->ExpireTime.dwLowDateTime = exp_time.u.LowPart;
+ info->ExpireTime.dwHighDateTime = exp_time.u.HighPart;
ret = SetUrlCacheEntryInfo(TEST_URL, info, CACHE_ENTRY_EXPTIME_FC);
ok(ret, "SetUrlCacheEntryInfo failed: %d\n", GetLastError());
ft.dwLowDateTime = 0xdeadbeef;
@@ -253,8 +253,8 @@ static void test_IsUrlCacheEntryExpiredA(void)
ft.dwLowDateTime, ft.dwHighDateTime);
/* Set the expire time to a point in the future.. */
exp_time.QuadPart += 20 * 60 * (ULONGLONG)10000000;
- info->ExpireTime.dwLowDateTime = exp_time.LowPart;
- info->ExpireTime.dwHighDateTime = exp_time.HighPart;
+ info->ExpireTime.dwLowDateTime = exp_time.u.LowPart;
+ info->ExpireTime.dwHighDateTime = exp_time.u.HighPart;
ret = SetUrlCacheEntryInfo(TEST_URL, info, CACHE_ENTRY_EXPTIME_FC);
ok(ret, "SetUrlCacheEntryInfo failed: %d\n", GetLastError());
ft.dwLowDateTime = 0xdeadbeef;
@@ -376,8 +376,8 @@ static void test_urlcacheA(void)
broken(lpCacheEntryInfo->CacheEntryType == NORMAL_CACHE_ENTRY /* NT4/W2k */),
"expected type NORMAL_CACHE_ENTRY|URLHISTORY_CACHE_ENTRY, got %08x\n",
lpCacheEntryInfo->CacheEntryType);
- ok(!lpCacheEntryInfo->dwExemptDelta, "expected dwExemptDelta 0, got %d\n",
- lpCacheEntryInfo->dwExemptDelta);
+ ok(!U(*lpCacheEntryInfo).dwExemptDelta, "expected dwExemptDelta 0, got %d\n",
+ U(*lpCacheEntryInfo).dwExemptDelta);
HeapFree(GetProcessHeap(), 0, lpCacheEntryInfo);
/* A subsequent commit with a different time/type doesn't change the type */
@@ -653,9 +653,9 @@ static void test_urlcacheA(void)
ok(lpCacheEntryInfo->CacheEntryType & (NORMAL_CACHE_ENTRY|STICKY_CACHE_ENTRY),
"expected cache entry type NORMAL_CACHE_ENTRY | STICKY_CACHE_ENTRY, got %d (0x%08x)\n",
lpCacheEntryInfo->CacheEntryType, lpCacheEntryInfo->CacheEntryType);
- ok(lpCacheEntryInfo->dwExemptDelta == 86400,
+ ok(U(*lpCacheEntryInfo).dwExemptDelta == 86400,
"expected dwExemptDelta 864000, got %d\n",
- lpCacheEntryInfo->dwExemptDelta);
+ U(*lpCacheEntryInfo).dwExemptDelta);
HeapFree(GetProcessHeap(), 0, lpCacheEntryInfo);
if (pDeleteUrlCacheEntryA)
{
@@ -685,17 +685,17 @@ static void test_urlcacheA(void)
ok(lpCacheEntryInfo->CacheEntryType & (NORMAL_CACHE_ENTRY|STICKY_CACHE_ENTRY),
"expected cache entry type NORMAL_CACHE_ENTRY | STICKY_CACHE_ENTRY, got %d (0x%08x)\n",
lpCacheEntryInfo->CacheEntryType, lpCacheEntryInfo->CacheEntryType);
- ok(lpCacheEntryInfo->dwExemptDelta == 86400,
+ ok(U(*lpCacheEntryInfo).dwExemptDelta == 86400,
"expected dwExemptDelta 864000, got %d\n",
- lpCacheEntryInfo->dwExemptDelta);
- lpCacheEntryInfo->dwExemptDelta = 0;
+ U(*lpCacheEntryInfo).dwExemptDelta);
+ U(*lpCacheEntryInfo).dwExemptDelta = 0;
ret = SetUrlCacheEntryInfoA(TEST_URL, lpCacheEntryInfo,
CACHE_ENTRY_EXEMPT_DELTA_FC);
ok(ret, "SetUrlCacheEntryInfo failed: %d\n", GetLastError());
ret = GetUrlCacheEntryInfo(TEST_URL, lpCacheEntryInfo, &cbCacheEntryInfo);
ok(ret, "GetUrlCacheEntryInfo failed with error %d\n", GetLastError());
- ok(!lpCacheEntryInfo->dwExemptDelta, "expected dwExemptDelta 0, got %d\n",
- lpCacheEntryInfo->dwExemptDelta);
+ ok(!U(*lpCacheEntryInfo).dwExemptDelta, "expected dwExemptDelta 0, got %d\n",
+ U(*lpCacheEntryInfo).dwExemptDelta);
/* See whether a sticky cache entry has the flag cleared once the exempt
* delta is meaningless.
*/
More information about the wine-cvs
mailing list