Fix some rebase failures

This commit is contained in:
Zebediah Figura 2018-02-27 00:02:49 -06:00
parent de0ef226da
commit 6a0ff5b96e
7 changed files with 143 additions and 586 deletions

View File

@ -1,7 +1,7 @@
From 90856468376648dbf9788d8184c71dd0fb0c8940 Mon Sep 17 00:00:00 2001
From 7bf5a7068cff54c7edad3ef4ac66fa9fa07151cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 4 Feb 2017 16:20:37 +0100
Subject: kernel32: Implement some processor group functions.
Subject: [PATCH] kernel32: Implement some processor group functions.
---
.../api-ms-win-core-kernel32-legacy-l1-1-0.spec | 2 +-
@ -12,7 +12,7 @@ Subject: kernel32: Implement some processor group functions.
5 files changed, 66 insertions(+), 10 deletions(-)
diff --git a/dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec b/dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec
index 7c196c932fd..4aa415bbf62 100644
index 7c196c9..4aa415b 100644
--- a/dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec
+++ b/dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec
@@ -21,7 +21,7 @@
@ -25,7 +25,7 @@ index 7c196c932fd..4aa415bbf62 100644
@ stub GetNamedPipeServerProcessId
@ stdcall GetShortPathNameA(str ptr long) kernel32.GetShortPathNameA
diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c
index 2e0e79f8e8d..5bba2ed26c3 100644
index ec1fd0f..e6e1aa3 100644
--- a/dlls/kernel32/cpu.c
+++ b/dlls/kernel32/cpu.c
@@ -309,7 +309,9 @@ SIZE_T WINAPI GetLargePageMinimum(void)
@ -39,7 +39,7 @@ index 2e0e79f8e8d..5bba2ed26c3 100644
return 1;
}
@@ -318,12 +320,41 @@ WORD WINAPI GetActiveProcessorGroupCount(void)
@@ -318,14 +320,43 @@ WORD WINAPI GetActiveProcessorGroupCount(void)
*/
DWORD WINAPI GetActiveProcessorCount(WORD group)
{
@ -87,8 +87,10 @@ index 2e0e79f8e8d..5bba2ed26c3 100644
+ /* Wine only counts active processors so far */
+ return system_info.NumberOfProcessors;
}
/***********************************************************************
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index cf27aea766e..63acc6877df 100644
index 60809f4..6fb9856 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -716,8 +716,8 @@
@ -103,7 +105,7 @@ index cf27aea766e..63acc6877df 100644
@ stdcall GetModuleFileNameW(long ptr long)
@ stdcall GetModuleHandleA(str)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index ca51a417b7c..2d9ac110247 100644
index cbca00e..b6516e5 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -91,6 +91,7 @@ static SIZE_T (WINAPI *pGetLargePageMinimum)(void);
@ -122,7 +124,7 @@ index ca51a417b7c..2d9ac110247 100644
return TRUE;
}
@@ -3593,6 +3595,26 @@ static void test_ProcThreadAttributeList(void)
@@ -3773,6 +3775,26 @@ static void test_ProcThreadAttributeList(void)
pDeleteProcThreadAttributeList(&list);
}
@ -149,7 +151,7 @@ index ca51a417b7c..2d9ac110247 100644
START_TEST(process)
{
HANDLE job;
@@ -3667,6 +3689,7 @@ START_TEST(process)
@@ -3847,6 +3869,7 @@ START_TEST(process)
test_GetNumaProcessorNode();
test_session_info();
test_GetLogicalProcessorInformationEx();
@ -158,10 +160,10 @@ index ca51a417b7c..2d9ac110247 100644
test_ProcThreadAttributeList();
test_SuspendProcessState();
diff --git a/include/winnt.h b/include/winnt.h
index 25fdab4942d..63216b9ddad 100644
index 6b598f3..624bda5 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -5895,6 +5895,8 @@ typedef struct _GROUP_AFFINITY
@@ -5959,6 +5959,8 @@ typedef struct _GROUP_AFFINITY
WORD Reserved[3];
} GROUP_AFFINITY, *PGROUP_AFFINITY;
@ -171,5 +173,5 @@ index 25fdab4942d..63216b9ddad 100644
{
WORD Group;
--
2.14.1
2.7.4

View File

@ -1,481 +0,0 @@
From be07aec481bc78b79e1ab0f31385312cda34b4d8 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 1 Dec 2014 11:28:26 +0100
Subject: [PATCH] kernel32/tests: Add additional tests for condition mask of
VerifyVersionInfoA.
---
dlls/kernel32/tests/version.c | 450 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 450 insertions(+)
diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c
index 49a9357..1a6a0d4 100644
--- a/dlls/kernel32/tests/version.c
+++ b/dlls/kernel32/tests/version.c
@@ -596,6 +596,7 @@ static void test_VerifyVersionInfo(void)
DWORD servicepack;
unsigned int i;
BOOL ret;
+ DWORD error;
/* Before we start doing some tests we should check what the version of
* the ServicePack is. Tests on a box with no ServicePack will fail otherwise.
@@ -702,6 +703,455 @@ static void test_VerifyVersionInfo(void)
VER_MAJORVERSION, VER_GREATER_EQUAL));
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMinor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some wink2 */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ if (servicepack == 0)
+ {
+ skip("There is no ServicePack on this system\n");
+ }
+ else
+ {
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor--;
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER));
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor--;
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+ }
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_LESS));
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_LESS_EQUAL));
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor--;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ /* test the failure hierarchy for the four version fields */
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwMinorVersion++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwMajorVersion++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwBuildNumber++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ /* systematically test behaviour of condition mask (tests sorted by condition mask value) */
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwMinorVersion++;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_MINORVERSION, VER_LESS));
+ todo_wine
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwMinorVersion++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_LESS));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_AND));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwMinorVersion++;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_LESS_EQUAL), VER_MINORVERSION, VER_LESS));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwMinorVersion++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_AND), VER_MINORVERSION, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwMinorVersion++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_OR), VER_MINORVERSION, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMinor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMinor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ if (servicepack)
+ {
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwMajorVersion++;
+ info.wServicePackMajor--;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_LESS), VER_SERVICEPACKMAJOR, VER_EQUAL));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+ }
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMinor++;
+ ret = VerifyVersionInfoA(&info, VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
+ todo_wine
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMinor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMinor++;
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL),
+ VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
+ todo_wine
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMinor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL),
+ VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMinor++;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
+ VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
+ todo_wine
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMinor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
+ VER_MINORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ if (servicepack)
+ {
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor--;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor--;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
+ VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor--;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
+ VER_MINORVERSION, VER_LESS_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor--;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
+ VER_MINORVERSION, VER_AND), VER_SERVICEPACKMAJOR, VER_GREATER));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+ }
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_LESS_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ if (servicepack)
+ {
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor--;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_GREATER), VER_SERVICEPACKMINOR, VER_EQUAL));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+ }
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ todo_wine
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ todo_wine
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
+ VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ todo_wine
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.dwMajorVersion--;
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
+ VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ info.wServicePackMajor++;
+ SetLastError(0xdeadbeef);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
+ VER_MINORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS_EQUAL));
+ error = GetLastError();
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
+
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
+ GetVersionExA((OSVERSIONINFOA *)&info);
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_AND));
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
+
/* test bad dwOSVersionInfoSize */
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
GetVersionExA((OSVERSIONINFOA *)&info);
--
1.9.1

View File

@ -1,41 +1,88 @@
From ac09483f10409c0f5de9bee8f160c8be45ee351f Mon Sep 17 00:00:00 2001
From 682d55277eef7f522088a6dbb9a675af9f3bfadd Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 1 Dec 2014 11:30:58 +0100
Subject: [PATCH] ntdll: Fix condition mask handling in RtlVerifyVersionInfo.
---
dlls/kernel32/tests/version.c | 3 ---
dlls/kernel32/tests/version.c | 11 ----------
dlls/ntdll/version.c | 50 ++++++++++++++++++++++++++++++++-----------
2 files changed, 37 insertions(+), 16 deletions(-)
2 files changed, 37 insertions(+), 24 deletions(-)
diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c
index 1a6a0d4..db182a3 100644
index 49a9357..20fe25d 100644
--- a/dlls/kernel32/tests/version.c
+++ b/dlls/kernel32/tests/version.c
@@ -945,7 +945,6 @@ static void test_VerifyVersionInfo(void)
ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL),
VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
- todo_wine
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
@@ -184,8 +184,6 @@ static void test_VerifyVersionInfo(void)
DWORD condition3;
DWORD typemask4;
DWORD condition4;
-
- BOOL todo;
} verify_version_tests[] =
{
{
@@ -197,7 +195,6 @@ static void test_VerifyVersionInfo(void)
VER_MINORVERSION, VER_LESS,
0, 0,
0, 0,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -280,7 +277,6 @@ static void test_VerifyVersionInfo(void)
VER_SERVICEPACKMINOR, VER_LESS,
0, 0,
0, 0,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -299,7 +295,6 @@ static void test_VerifyVersionInfo(void)
VER_SERVICEPACKMAJOR, VER_EQUAL,
VER_SERVICEPACKMINOR, VER_LESS,
0, 0,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -319,7 +314,6 @@ static void test_VerifyVersionInfo(void)
VER_MINORVERSION, VER_EQUAL,
VER_SERVICEPACKMAJOR, VER_EQUAL,
VER_SERVICEPACKMINOR, VER_LESS,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -364,7 +358,6 @@ static void test_VerifyVersionInfo(void)
VER_SERVICEPACKMAJOR, VER_LESS,
0, 0,
0, 0,
- TRUE,
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -383,7 +376,6 @@ static void test_VerifyVersionInfo(void)
VER_MINORVERSION, VER_EQUAL,
VER_SERVICEPACKMAJOR, VER_LESS,
0, 0,
- TRUE
},
{
VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
@@ -670,13 +662,10 @@ static void test_VerifyVersionInfo(void)
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
@@ -966,7 +965,6 @@ static void test_VerifyVersionInfo(void)
ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
- todo_wine
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = VerifyVersionInfoA(&info, test->verifymask, mask);
- todo_wine_if(test->todo)
- {
ok(test->err ? !ret : ret, "%u: unexpected return value %d.\n", i, ret);
if (!ret)
ok(GetLastError() == test->err, "%u: unexpected error code %d, expected %d.\n", i, GetLastError(), test->err);
}
- }
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
@@ -1084,7 +1082,6 @@ static void test_VerifyVersionInfo(void)
ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
- todo_wine
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
/* test handling of version numbers */
/* v3.10 is always less than v4.x even
diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c
index 58ccb95..8beef6d 100644
--- a/dlls/ntdll/version.c
@ -124,5 +171,5 @@ index 58ccb95..8beef6d 100644
}
--
1.9.1
2.7.4

View File

@ -58,7 +58,7 @@ upstream_commit()
# Show version information
version()
{
echo "Wine Staging 3.2 (Unreleased)"
echo "Wine Staging 3.3 (Unreleased)"
echo "Copyright (C) 2014-2018 the Wine Staging project authors."
echo "Copyright (C) 2018 Alistair Leslie-Hughes"
echo ""
@ -2989,10 +2989,7 @@ fi
# | * [#43351] Add semi-stub implementation for CreateRemoteThreadEx
# |
# | Modified files:
# | * dlls/api-ms-win-core-processthreads-l1-1-0/api-ms-win-core-processthreads-l1-1-0.spec, dlls/api-ms-win-core-
# | processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec, dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-
# | core-processthreads-l1-1-2.spec, dlls/kernel32/kernel32.spec, dlls/kernel32/sync.c, dlls/kernel32/thread.c,
# | dlls/kernelbase/kernelbase.spec, include/winbase.h, include/winnt.h
# | * dlls/kernel32/kernel32.spec, dlls/kernel32/sync.c, include/winbase.h, include/winnt.h
# |
if test "$enable_kernel32_UmsStubs" -eq 1; then
patch_apply kernel32-UmsStubs/0001-kernel32-Add-a-bunch-of-kernel32-stubs.patch
@ -5114,10 +5111,8 @@ fi
# | * dlls/kernel32/tests/version.c, dlls/ntdll/version.c
# |
if test "$enable_kernel32_VerifyVersionInfo" -eq 1; then
patch_apply kernel32-VerifyVersionInfo/0001-kernel32-tests-Add-additional-tests-for-condition-ma.patch
patch_apply kernel32-VerifyVersionInfo/0002-ntdll-Fix-condition-mask-handling-in-RtlVerifyVersio.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "kernel32/tests: Add additional tests for condition mask of VerifyVersionInfoA.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Fix condition mask handling in RtlVerifyVersionInfo.", 1 },';
) >> "$patchlist"
fi
@ -9081,9 +9076,9 @@ fi
# | * d3d11-Depth_Bias
# |
# | Modified files:
# | * dlls/d3d11/device.c, dlls/d3d11/state.c, dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/drawprim.c,
# | dlls/wined3d/state.c, dlls/wined3d/stateblock.c, dlls/wined3d/surface.c, dlls/wined3d/utils.c,
# | dlls/wined3d/wined3d_private.h, include/wine/wined3d.h
# | * dlls/d3d11/device.c, dlls/d3d11/state.c, dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/state.c,
# | dlls/wined3d/stateblock.c, dlls/wined3d/surface.c, dlls/wined3d/utils.c, dlls/wined3d/wined3d_private.h,
# | include/wine/wined3d.h
# |
if test "$enable_wined3d_WINED3D_RS_COLORWRITEENABLE" -eq 1; then
patch_apply wined3d-WINED3D_RS_COLORWRITEENABLE/0001-wined3d-Implement-all-8-d3d11-color-write-masks.patch
@ -9101,7 +9096,7 @@ fi
# | * [#39057] Support for indexed vertex blending
# |
# | Modified files:
# | * dlls/d3d9/tests/visual.c, dlls/wined3d/device.c, dlls/wined3d/directx.c, dlls/wined3d/drawprim.c,
# | * dlls/d3d9/tests/visual.c, dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/directx.c,
# | dlls/wined3d/glsl_shader.c, dlls/wined3d/utils.c, dlls/wined3d/vertexdeclaration.c, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then

View File

@ -1,4 +1,4 @@
From 8a2c1ff72e3802e8e67e21ccb915de17a3c155da Mon Sep 17 00:00:00 2001
From 54d8fb202add2fa8dc95fbdee431994886a84b90 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 18 Nov 2016 22:31:29 +0800
Subject: [PATCH] uxtheme: Protect CloseThemeData() from invalid input.
@ -8,13 +8,13 @@ Content-Transfer-Encoding: 8bit
Testcase by Michael Müller <michael@fds-team.de>.
---
dlls/uxtheme/msstyles.c | 21 +++++++++++++++++++++
dlls/uxtheme/msstyles.c | 22 ++++++++++++++++++++++
dlls/uxtheme/msstyles.h | 3 ++-
dlls/uxtheme/tests/system.c | 4 ++++
3 files changed, 27 insertions(+), 1 deletion(-)
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c
index fe91494..3a25f6d 100644
index fe91494..7cd2145 100644
--- a/dlls/uxtheme/msstyles.c
+++ b/dlls/uxtheme/msstyles.c
@@ -35,6 +35,7 @@
@ -34,7 +34,15 @@ index fe91494..3a25f6d 100644
static PTHEME_FILE tfActiveTheme;
/***********************************************************************/
@@ -452,6 +455,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
@@ -221,6 +224,7 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
pcls->partstate = ps->next;
heap_free(ps);
}
+ pcls->signature = 0;
heap_free(pcls);
}
}
@@ -452,6 +456,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
if(cur) return cur;
cur = heap_alloc(sizeof(*cur));
@ -42,7 +50,7 @@ index fe91494..3a25f6d 100644
cur->hTheme = tf->hTheme;
lstrcpyW(cur->szAppName, pszAppName);
lstrcpyW(cur->szClassName, pszClassName);
@@ -1045,6 +1049,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
@@ -1045,6 +1050,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
*/
HRESULT MSSTYLES_CloseThemeClass(PTHEME_CLASS tc)
{
@ -103,5 +111,5 @@ index 6989f44..d529279 100644
{
SetLastError(0xdeadbeef);
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 8f283b558ea348bd21cee56beb8219758d55a379 Mon Sep 17 00:00:00 2001
From ba82f3225b3d2491f702d7f82a2f22fd50425198 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 20 Sep 2014 02:48:07 +0200
Subject: [PATCH] wined3d: Add support for DXTn software decoding through
@ -13,16 +13,16 @@ Changes in rev 3:
* Do not require txc_dxtn at compile time by trying some fallback paths.
---
configure.ac | 3 +
dlls/wined3d/Makefile.in | 2 +
dlls/wined3d/Makefile.in | 1 +
dlls/wined3d/dxtn.c | 299 +++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/surface.c | 80 +++++++++++
dlls/wined3d/wined3d_main.c | 5 +
dlls/wined3d/wined3d_private.h | 13 ++
6 files changed, 402 insertions(+)
6 files changed, 401 insertions(+)
create mode 100644 dlls/wined3d/dxtn.c
diff --git a/configure.ac b/configure.ac
index 643c713..a867d25 100644
index 7b796ef..7b26e45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1737,6 +1737,9 @@ fi
@ -36,14 +36,13 @@ index 643c713..a867d25 100644
if test "x$with_mpg123" != "xno"
then
diff --git a/dlls/wined3d/Makefile.in b/dlls/wined3d/Makefile.in
index 58fc2d5..70f47c6 100644
index 58fc2d5..b850ba6 100644
--- a/dlls/wined3d/Makefile.in
+++ b/dlls/wined3d/Makefile.in
@@ -10,6 +10,8 @@ C_SRCS = \
@@ -10,6 +10,7 @@ C_SRCS = \
cs.c \
device.c \
directx.c \
+ drawprim.c \
+ dxtn.c \
gl_compat.c \
glsl_shader.c \
@ -459,7 +458,7 @@ index 9ef917f..7201a7c 100644
}
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 6cd6f18..28e6fe6 100644
index b57bcdc..1de0e56 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -326,6 +326,8 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
@ -482,10 +481,10 @@ index 6cd6f18..28e6fe6 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 816eebb..3f6500d 100644
index 7813df5..45fe82a 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -4451,6 +4451,19 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
@@ -4447,6 +4447,19 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
assert(cs->thread_id != GetCurrentThreadId());
}
@ -506,5 +505,5 @@ index 816eebb..3f6500d 100644
#define WINED3D_OPENGL_WINDOW_CLASS_NAME "WineD3D_OpenGL"
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 268acba8eb58661b41f1732b0fb2b084ac5d792c Mon Sep 17 00:00:00 2001
From 01399c30cb51b3790c8864d2ebd3f03950345ff1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 20 Jul 2017 13:50:07 +0200
Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
@ -6,7 +6,6 @@ Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
---
dlls/d3d11/device.c | 29 ++++++++++-----------
dlls/d3d11/state.c | 4 ---
dlls/wined3d/Makefile.in | 1 -
dlls/wined3d/context.c | 8 +++---
dlls/wined3d/device.c | 6 ++---
dlls/wined3d/state.c | 57 +++++++++++++++++++-----------------------
@ -15,13 +14,13 @@ Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
dlls/wined3d/utils.c | 6 ++++-
dlls/wined3d/wined3d_private.h | 1 +
include/wine/wined3d.h | 14 ++++++++++-
11 files changed, 72 insertions(+), 71 deletions(-)
10 files changed, 72 insertions(+), 70 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 9c9b730..bfcd139 100644
index 835ea8b..2ef9b46 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -2067,6 +2067,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@@ -688,6 +688,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
static const float default_blend_factor[] = {1.0f, 1.0f, 1.0f, 1.0f};
struct d3d_blend_state *blend_state_impl;
const D3D11_BLEND_DESC *desc;
@ -29,7 +28,7 @@ index 9c9b730..bfcd139 100644
TRACE("iface %p, blend_state %p, blend_factor %s, sample_mask 0x%08x.\n",
iface, blend_state, debug_float4(blend_factor), sample_mask);
@@ -2081,14 +2082,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@@ -702,14 +703,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
{
wined3d_device_set_blend_state(device->wined3d_device, NULL);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ALPHABLENDENABLE, FALSE);
@ -49,7 +48,7 @@ index 9c9b730..bfcd139 100644
wined3d_mutex_unlock();
return;
}
@@ -2116,14 +2114,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@@ -737,14 +735,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
|| d->DestBlendAlpha == D3D11_BLEND_BLEND_FACTOR || d->DestBlendAlpha == D3D11_BLEND_INV_BLEND_FACTOR))
FIXME("Ignoring blend factor %s.\n", debug_float4(blend_factor));
}
@ -86,23 +85,11 @@ index a14c9d3..2bec92e 100644
}
/* glEnableIndexedEXT(GL_BLEND, ...) */
diff --git a/dlls/wined3d/Makefile.in b/dlls/wined3d/Makefile.in
index 70f47c6..b850ba6 100644
--- a/dlls/wined3d/Makefile.in
+++ b/dlls/wined3d/Makefile.in
@@ -10,7 +10,6 @@ C_SRCS = \
cs.c \
device.c \
directx.c \
- drawprim.c \
dxtn.c \
gl_compat.c \
glsl_shader.c \
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index e5dd5bb..67a49db 100644
index 04853c9..140fc83 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2613,10 +2613,8 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
@@ -2603,10 +2603,8 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
}
gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE,GL_TRUE,GL_TRUE);
checkGLcall("glColorMask");
@ -115,7 +102,7 @@ index e5dd5bb..67a49db 100644
if (gl_info->supported[EXT_SECONDARY_COLOR])
{
gl_info->gl_ops.gl.p_glDisable(GL_COLOR_SUM_EXT);
@@ -4849,7 +4847,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
@@ -4823,7 +4821,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
if (!(rtv = fb->render_targets[i]) || rtv->format->id == WINED3DFMT_NULL)
continue;
@ -125,7 +112,7 @@ index e5dd5bb..67a49db 100644
wined3d_rendertarget_view_load_location(rtv, context, rtv->resource->draw_binding);
wined3d_rendertarget_view_invalidate_location(rtv, ~rtv->resource->draw_binding);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ee42002..dfd0047 100644
index 5ec0705..4269b20 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -383,10 +383,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -142,10 +129,10 @@ index ee42002..dfd0047 100644
checkGLcall("glClearColor");
clear_mask = clear_mask | GL_COLOR_BUFFER_BIT;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 2ce8c6f..7b93582 100644
index 3460d69..26c5815 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1566,9 +1566,6 @@ static void state_debug_monitor(struct wined3d_context *context, const struct wi
@@ -1556,9 +1556,6 @@ static void state_debug_monitor(struct wined3d_context *context, const struct wi
static void state_colorwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
DWORD mask0 = state->render_states[WINED3D_RS_COLORWRITEENABLE];
@ -155,7 +142,7 @@ index 2ce8c6f..7b93582 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
TRACE("Color mask: r(%d) g(%d) b(%d) a(%d)\n",
@@ -1582,13 +1579,7 @@ static void state_colorwrite(struct wined3d_context *context, const struct wined
@@ -1572,13 +1569,7 @@ static void state_colorwrite(struct wined3d_context *context, const struct wined
mask0 & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE);
checkGLcall("glColorMask(...)");
@ -170,7 +157,7 @@ index 2ce8c6f..7b93582 100644
}
static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DWORD mask)
@@ -1601,24 +1592,20 @@ static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DW
@@ -1591,24 +1582,20 @@ static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DW
checkGLcall("glColorMaski");
}
@ -205,7 +192,7 @@ index 2ce8c6f..7b93582 100644
}
static void state_localviewer(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
@@ -5296,18 +5283,26 @@ const struct StateEntryTemplate misc_state_template[] =
@@ -5281,18 +5268,26 @@ const struct StateEntryTemplate misc_state_template[] =
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), { STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), state_msaa_w }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), { STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), state_multisampmask }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), { STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), state_debug_monitor }, WINED3D_GL_EXT_NONE },
@ -282,7 +269,7 @@ index b9efcec..c9b3527 100644
/* Texture Stage States - Put directly into state block, we will call function below */
for (i = 0; i < MAX_TEXTURES; ++i)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 5ce06bb..5bd7d50 100644
index 9ef917f..ff7646f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -383,6 +383,7 @@ static void surface_blt_fbo(const struct wined3d_device *device,
@ -307,10 +294,10 @@ index 5ce06bb..5bd7d50 100644
gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST);
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 9adf2da..5bf6889 100644
index 0171897..8c40fc8 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4443,7 +4443,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4442,7 +4442,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
D3DSTATE_TO_STR(WINED3D_RS_DEBUGMONITORTOKEN);
D3DSTATE_TO_STR(WINED3D_RS_POINTSIZE_MAX);
D3DSTATE_TO_STR(WINED3D_RS_INDEXEDVERTEXBLENDENABLE);
@ -318,7 +305,7 @@ index 9adf2da..5bf6889 100644
D3DSTATE_TO_STR(WINED3D_RS_TWEENFACTOR);
D3DSTATE_TO_STR(WINED3D_RS_BLENDOP);
D3DSTATE_TO_STR(WINED3D_RS_POSITIONDEGREE);
@@ -4463,9 +4462,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4462,9 +4461,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILZFAIL);
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILPASS);
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILFUNC);
@ -334,10 +321,10 @@ index 9adf2da..5bf6889 100644
D3DSTATE_TO_STR(WINED3D_RS_SRGBWRITEENABLE);
D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIAS);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 176faea..09e227c 100644
index 7813df5..8a17aea 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -277,6 +277,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
@@ -276,6 +276,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
#define MAX_TGSM_REGISTERS 8192
#define MAX_VERTEX_BLENDS 4
#define MAX_MULTISAMPLE_TYPES 8
@ -346,10 +333,10 @@ index 176faea..09e227c 100644
struct min_lookup
{
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index bd4969a..ac39a50 100644
index 8864965..58da08c 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -390,8 +390,20 @@ enum wined3d_render_state
@@ -388,8 +388,20 @@ enum wined3d_render_state
WINED3D_RS_BLENDOPALPHA = 209,
WINED3D_RS_DEPTHCLIP = 210,
WINED3D_RS_DEPTHBIASCLAMP = 211,
@ -372,5 +359,5 @@ index bd4969a..ac39a50 100644
enum wined3d_blend
{
--
1.9.1
2.7.4