msvcrt/tests: Use the _winver etc. variables instead of the __p_ functions that don't exist on 64-bit.
This commit is contained in:
parent
8f334205f9
commit
1c66fab80a
|
@ -70,19 +70,19 @@ static void test_initterm(void)
|
||||||
static void test_initvar( HMODULE hmsvcrt )
|
static void test_initvar( HMODULE hmsvcrt )
|
||||||
{
|
{
|
||||||
OSVERSIONINFO osvi = { sizeof(OSVERSIONINFO) };
|
OSVERSIONINFO osvi = { sizeof(OSVERSIONINFO) };
|
||||||
int* (*pp_winver)() = (int*(*)())GetProcAddress(hmsvcrt, "__p__winver");
|
int *pp_winver = (int*)GetProcAddress(hmsvcrt, "_winver");
|
||||||
int* (*pp_winmajor)() = (int*(*)())GetProcAddress(hmsvcrt, "__p__winmajor");
|
int *pp_winmajor = (int*)GetProcAddress(hmsvcrt, "_winmajor");
|
||||||
int* (*pp_winminor)() = (int*(*)())GetProcAddress(hmsvcrt, "__p__winminor");
|
int *pp_winminor = (int*)GetProcAddress(hmsvcrt, "_winminor");
|
||||||
int* (*pp_osver)() = (int*(*)())GetProcAddress(hmsvcrt, "__p__osver");
|
int *pp_osver = (int*)GetProcAddress(hmsvcrt, "_osver");
|
||||||
unsigned int winver, winmajor, winminor, osver;
|
unsigned int winver, winmajor, winminor, osver;
|
||||||
|
|
||||||
if( !( pp_winmajor && pp_winminor && pp_winver)) {
|
if( !( pp_winmajor && pp_winminor && pp_winver)) {
|
||||||
win_skip("_winver variables are not available\n");
|
win_skip("_winver variables are not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
winver = *pp_winver();
|
winver = *pp_winver;
|
||||||
winminor = *pp_winminor();
|
winminor = *pp_winminor;
|
||||||
winmajor = *pp_winmajor();
|
winmajor = *pp_winmajor;
|
||||||
GetVersionEx( &osvi);
|
GetVersionEx( &osvi);
|
||||||
ok( winminor == osvi.dwMinorVersion, "Wrong value for _winminor %02x expected %02x\n",
|
ok( winminor == osvi.dwMinorVersion, "Wrong value for _winminor %02x expected %02x\n",
|
||||||
winminor, osvi.dwMinorVersion);
|
winminor, osvi.dwMinorVersion);
|
||||||
|
@ -95,7 +95,7 @@ static void test_initvar( HMODULE hmsvcrt )
|
||||||
win_skip("_osver variables are not available\n");
|
win_skip("_osver variables are not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
osver = *pp_osver();
|
osver = *pp_osver;
|
||||||
ok( osver == (osvi.dwBuildNumber & 0xffff) ||
|
ok( osver == (osvi.dwBuildNumber & 0xffff) ||
|
||||||
((osvi.dwBuildNumber >> 24) == osvi.dwMajorVersion &&
|
((osvi.dwBuildNumber >> 24) == osvi.dwMajorVersion &&
|
||||||
((osvi.dwBuildNumber >> 16) & 0xff) == osvi.dwMinorVersion), /* 95/98/ME */
|
((osvi.dwBuildNumber >> 16) & 0xff) == osvi.dwMinorVersion), /* 95/98/ME */
|
||||||
|
|
Loading…
Reference in New Issue