https://git.reactos.org/?p=reactos.git;a=commitdiff;h=98ca8ad114d3aa5f5b10e…
commit 98ca8ad114d3aa5f5b10e5686c6f0712c532092f
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Mon Dec 18 13:28:00 2017 +0100
[KERNEL32_WINETEST] Add a PCH.
---
modules/rostests/winetests/kernel32/CMakeLists.txt | 9 +++++++--
modules/rostests/winetests/kernel32/actctx.c | 11 ++---------
modules/rostests/winetests/kernel32/atom.c | 9 +--------
modules/rostests/winetests/kernel32/change.c | 10 +---------
modules/rostests/winetests/kernel32/codepage.c | 9 +--------
modules/rostests/winetests/kernel32/comm.c | 9 +--------
modules/rostests/winetests/kernel32/console.c | 4 +---
modules/rostests/winetests/kernel32/cpu.c | 4 +---
modules/rostests/winetests/kernel32/debugger.c | 8 +-------
modules/rostests/winetests/kernel32/directory.c | 8 +-------
modules/rostests/winetests/kernel32/drive.c | 7 +------
modules/rostests/winetests/kernel32/environ.c | 8 +-------
modules/rostests/winetests/kernel32/fiber.c | 2 +-
modules/rostests/winetests/kernel32/file.c | 15 +--------------
modules/rostests/winetests/kernel32/format_msg.c | 7 +------
modules/rostests/winetests/kernel32/heap.c | 10 +---------
modules/rostests/winetests/kernel32/loader.c | 18 ++++--------------
modules/rostests/winetests/kernel32/locale.c | 14 +-------------
modules/rostests/winetests/kernel32/mailslot.c | 9 +--------
modules/rostests/winetests/kernel32/module.c | 5 ++---
modules/rostests/winetests/kernel32/path.c | 10 +---------
modules/rostests/winetests/kernel32/pipe.c | 11 +----------
modules/rostests/winetests/kernel32/precomp.h | 22 ++++++++++++++++++++++
modules/rostests/winetests/kernel32/process.c | 17 +----------------
modules/rostests/winetests/kernel32/profile.c | 8 +-------
modules/rostests/winetests/kernel32/resource.c | 5 +----
modules/rostests/winetests/kernel32/sync.c | 10 +---------
modules/rostests/winetests/kernel32/testlist.c | 5 +----
modules/rostests/winetests/kernel32/thread.c | 20 +-------------------
modules/rostests/winetests/kernel32/time.c | 5 +----
modules/rostests/winetests/kernel32/timer.c | 6 +-----
modules/rostests/winetests/kernel32/toolhelp.c | 10 +---------
modules/rostests/winetests/kernel32/version.c | 7 +------
modules/rostests/winetests/kernel32/virtual.c | 16 +++-------------
modules/rostests/winetests/kernel32/volume.c | 8 +++-----
35 files changed, 71 insertions(+), 265 deletions(-)
diff --git a/modules/rostests/winetests/kernel32/CMakeLists.txt
b/modules/rostests/winetests/kernel32/CMakeLists.txt
index af63b39d94..063ff85193 100644
--- a/modules/rostests/winetests/kernel32/CMakeLists.txt
+++ b/modules/rostests/winetests/kernel32/CMakeLists.txt
@@ -1,6 +1,7 @@
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502)
+add_definitions(-DWINVER=0x600 -D_WIN32_WINNT=0x601)
list(APPEND SOURCE
actctx.c
@@ -36,9 +37,12 @@ list(APPEND SOURCE
version.c
virtual.c
volume.c
- testlist.c)
+ precomp.h)
-add_executable(kernel32_winetest ${SOURCE} resource.rc)
+add_executable(kernel32_winetest
+ ${SOURCE}
+ testlist.c
+ resource.rc)
if(USE_CLANG_CL OR (NOT MSVC))
add_target_compile_flags(kernel32_winetest "-Wno-format")
@@ -46,4 +50,5 @@ endif()
set_module_type(kernel32_winetest win32cui)
add_importlibs(kernel32_winetest user32 advapi32 msvcrt kernel32 ntdll)
+add_pch(kernel32_winetest precomp.h SOURCE)
add_rostests_file(TARGET kernel32_winetest)
diff --git a/modules/rostests/winetests/kernel32/actctx.c
b/modules/rostests/winetests/kernel32/actctx.c
index e8a2cdfdc0..5a41c40218 100644
--- a/modules/rostests/winetests/kernel32/actctx.c
+++ b/modules/rostests/winetests/kernel32/actctx.c
@@ -16,16 +16,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <ntstatus.h>
-#define WIN32_NO_STATUS
-#include <wine/test.h>
-#include <winbase.h>
-#include <windef.h>
-#include <winnt.h>
-#include <wine/winternl.h>
-#include <winnls.h>
-#include <stdio.h>
+#include "precomp.h"
+#include <objbase.h>
#include <oaidl.h>
#include <initguid.h>
diff --git a/modules/rostests/winetests/kernel32/atom.c
b/modules/rostests/winetests/kernel32/atom.c
index 0c1740869a..a276e966dd 100755
--- a/modules/rostests/winetests/kernel32/atom.c
+++ b/modules/rostests/winetests/kernel32/atom.c
@@ -18,14 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "winuser.h"
+#include "precomp.h"
#define DOUBLE(x) (WCHAR)((x<<8)|(x))
diff --git a/modules/rostests/winetests/kernel32/change.c
b/modules/rostests/winetests/kernel32/change.c
index 3779e69278..997b025461 100755
--- a/modules/rostests/winetests/kernel32/change.c
+++ b/modules/rostests/winetests/kernel32/change.c
@@ -26,15 +26,7 @@
* FILE_NOTIFY_CHANGE_CREATION
*/
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
-#include "wine/test.h"
-#include <windef.h>
-#include <winbase.h>
-#include <wine/winternl.h>
+#include "precomp.h"
static DWORD CALLBACK NotificationThread(LPVOID arg)
{
diff --git a/modules/rostests/winetests/kernel32/codepage.c
b/modules/rostests/winetests/kernel32/codepage.c
index ac8b90298b..4acc0cb510 100755
--- a/modules/rostests/winetests/kernel32/codepage.c
+++ b/modules/rostests/winetests/kernel32/codepage.c
@@ -19,14 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-#include <limits.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
+#include "precomp.h"
static const char foobarA[] = "foobar";
static const WCHAR foobarW[] =
{'f','o','o','b','a','r',0};
diff --git a/modules/rostests/winetests/kernel32/comm.c
b/modules/rostests/winetests/kernel32/comm.c
index 9230850d3c..cb7648205b 100755
--- a/modules/rostests/winetests/kernel32/comm.c
+++ b/modules/rostests/winetests/kernel32/comm.c
@@ -18,14 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
-#include "wine/test.h"
-#include "wine/winternl.h"
-#include "winbase.h"
-#include "winnls.h"
+#include "precomp.h"
#define TIMEOUT 1000 /* one second for Timeouts*/
#define SLOWBAUD 150
diff --git a/modules/rostests/winetests/kernel32/console.c
b/modules/rostests/winetests/kernel32/console.c
index a14bc45034..51f2162f35 100755
--- a/modules/rostests/winetests/kernel32/console.c
+++ b/modules/rostests/winetests/kernel32/console.c
@@ -19,9 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "wine/test.h"
-#include <windows.h>
-#include <stdio.h>
+#include "precomp.h"
static BOOL (WINAPI *pGetConsoleInputExeNameA)(DWORD, LPSTR);
static DWORD (WINAPI *pGetConsoleProcessList)(LPDWORD, DWORD);
diff --git a/modules/rostests/winetests/kernel32/cpu.c
b/modules/rostests/winetests/kernel32/cpu.c
index 405d990a06..ff5a6c1a64 100644
--- a/modules/rostests/winetests/kernel32/cpu.c
+++ b/modules/rostests/winetests/kernel32/cpu.c
@@ -18,9 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "wine/test.h"
-#include "winbase.h"
-#include "winnls.h"
+#include "precomp.h"
static BOOL (WINAPI *pGetNumaProcessorNode)(UCHAR, PUCHAR);
diff --git a/modules/rostests/winetests/kernel32/debugger.c
b/modules/rostests/winetests/kernel32/debugger.c
index 58f1f3c5db..2236046432 100644
--- a/modules/rostests/winetests/kernel32/debugger.c
+++ b/modules/rostests/winetests/kernel32/debugger.c
@@ -18,13 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-#include <assert.h>
-
-#include <windows.h>
-#include <wine/winternl.h>
-#include <winreg.h>
-#include "wine/test.h"
+#include "precomp.h"
#ifndef STATUS_DEBUGGER_INACTIVE
#define STATUS_DEBUGGER_INACTIVE ((NTSTATUS) 0xC0000354)
diff --git a/modules/rostests/winetests/kernel32/directory.c
b/modules/rostests/winetests/kernel32/directory.c
index f57618e32f..233fba7427 100755
--- a/modules/rostests/winetests/kernel32/directory.c
+++ b/modules/rostests/winetests/kernel32/directory.c
@@ -18,13 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "wine/winternl.h"
+#include "precomp.h"
static NTSTATUS (WINAPI
*pNtQueryObject)(HANDLE,OBJECT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
diff --git a/modules/rostests/winetests/kernel32/drive.c
b/modules/rostests/winetests/kernel32/drive.c
index 98dc454f34..e787276273 100755
--- a/modules/rostests/winetests/kernel32/drive.c
+++ b/modules/rostests/winetests/kernel32/drive.c
@@ -18,12 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
+#include "precomp.h"
static DWORD (WINAPI *pGetDiskFreeSpaceExA)(LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER,
PULARGE_INTEGER);
diff --git a/modules/rostests/winetests/kernel32/environ.c
b/modules/rostests/winetests/kernel32/environ.c
index f8452be2ee..50d331582e 100755
--- a/modules/rostests/winetests/kernel32/environ.c
+++ b/modules/rostests/winetests/kernel32/environ.c
@@ -18,13 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "winnls.h"
+#include "precomp.h"
static CHAR string[MAX_PATH];
#define ok_w(res, format, szString) \
diff --git a/modules/rostests/winetests/kernel32/fiber.c
b/modules/rostests/winetests/kernel32/fiber.c
index 7501165dc8..0e0051bf7d 100644
--- a/modules/rostests/winetests/kernel32/fiber.c
+++ b/modules/rostests/winetests/kernel32/fiber.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "wine/test.h"
+#include "precomp.h"
static LPVOID (WINAPI *pCreateFiber)(SIZE_T,LPFIBER_START_ROUTINE,LPVOID);
static LPVOID (WINAPI *pConvertThreadToFiber)(LPVOID);
diff --git a/modules/rostests/winetests/kernel32/file.c
b/modules/rostests/winetests/kernel32/file.c
index 940e2fc27b..ee91e62e41 100755
--- a/modules/rostests/winetests/kernel32/file.c
+++ b/modules/rostests/winetests/kernel32/file.c
@@ -20,22 +20,9 @@
*
*/
-/* ReplaceFile requires Windows 2000 or newer */
-#define _WIN32_WINNT 0x0601
+#include "precomp.h"
-#include <stdarg.h>
-#include <stdlib.h>
#include <time.h>
-#include <stdio.h>
-
-#include <ntstatus.h>
-#define WIN32_NO_STATUS
-#include <wine/test.h>
-#include <windef.h>
-#include <winbase.h>
-#include <winerror.h>
-#include <wine/winternl.h>
-#include <winnls.h>
#include <fileapi.h>
#undef DeleteFile /* needed for FILE_DISPOSITION_INFO */
diff --git a/modules/rostests/winetests/kernel32/format_msg.c
b/modules/rostests/winetests/kernel32/format_msg.c
index 1f88e2465b..3966b2aa6c 100755
--- a/modules/rostests/winetests/kernel32/format_msg.c
+++ b/modules/rostests/winetests/kernel32/format_msg.c
@@ -17,12 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
+#include "precomp.h"
#define ULL(a,b) (((ULONG64)(a) << 32) | (b))
diff --git a/modules/rostests/winetests/kernel32/heap.c
b/modules/rostests/winetests/kernel32/heap.c
index 7c1c89dd5a..0c82d7bac9 100755
--- a/modules/rostests/winetests/kernel32/heap.c
+++ b/modules/rostests/winetests/kernel32/heap.c
@@ -20,15 +20,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winreg.h"
-#include "wine/winternl.h"
-#include "wine/test.h"
+#include "precomp.h"
#define MAGIC_DEAD 0xdeadbeef
diff --git a/modules/rostests/winetests/kernel32/loader.c
b/modules/rostests/winetests/kernel32/loader.c
index 90e790f5c6..73ca0134b8 100644
--- a/modules/rostests/winetests/kernel32/loader.c
+++ b/modules/rostests/winetests/kernel32/loader.c
@@ -18,19 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define NONAMELESSUNION
-#include <stdarg.h>
-#include <stdio.h>
-#include <assert.h>
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
-#include "windef.h"
-#include "winbase.h"
-#include "wine/winternl.h"
-#include "winuser.h"
-#include "wine/test.h"
-#include "delayloadhandler.h"
+#include "precomp.h"
+
+#include <delayloadhandler.h>
/* PROCESS_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */
#define PROCESS_ALL_ACCESS_NT4 (PROCESS_ALL_ACCESS & ~0xf000)
@@ -1546,7 +1536,7 @@ static void test_import_resolution(void)
nt.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_TLS].VirtualAddress =
DATA_RVA(&data.tls);
memset( &data, 0, sizeof(data) );
- data.descr[0].u.OriginalFirstThunk = DATA_RVA( data.original_thunks );
+ data.descr[0].OriginalFirstThunk = DATA_RVA( data.original_thunks );
data.descr[0].FirstThunk = DATA_RVA( data.thunks );
data.descr[0].Name = DATA_RVA( data.module );
strcpy( data.module, "kernel32.dll" );
diff --git a/modules/rostests/winetests/kernel32/locale.c
b/modules/rostests/winetests/kernel32/locale.c
index 5f0a83666c..5b68563f71 100755
--- a/modules/rostests/winetests/kernel32/locale.c
+++ b/modules/rostests/winetests/kernel32/locale.c
@@ -25,19 +25,7 @@
* the control panel i8n page), we will still get the expected results.
*/
-#include <assert.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#undef WINVER
-#define WINVER 0x0600
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "winnls.h"
+#include "precomp.h"
static const WCHAR upper_case[] =
{'\t','J','U','S','T','!','
','A',',','
','T','E','S','T',';','
','S','T','R','I','N','G','
','1','/','*','+','-','.','\r','\n',0};
static const WCHAR lower_case[] =
{'\t','j','u','s','t','!','
','a',',','
','t','e','s','t',';','
','s','t','r','i','n','g','
','1','/','*','+','-','.','\r','\n',0};
diff --git a/modules/rostests/winetests/kernel32/mailslot.c
b/modules/rostests/winetests/kernel32/mailslot.c
index da595e9714..0e6c5b17fe 100755
--- a/modules/rostests/winetests/kernel32/mailslot.c
+++ b/modules/rostests/winetests/kernel32/mailslot.c
@@ -18,14 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <windef.h>
-#include <winbase.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static const char szmspath[] = "\\\\.\\mailslot\\wine_mailslot_test";
diff --git a/modules/rostests/winetests/kernel32/module.c
b/modules/rostests/winetests/kernel32/module.c
index 108d0cb999..829a6587dc 100755
--- a/modules/rostests/winetests/kernel32/module.c
+++ b/modules/rostests/winetests/kernel32/module.c
@@ -18,9 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "wine/test.h"
-#include <windows.h>
-#include <stdio.h>
+#include "precomp.h"
+
#include <psapi.h>
static DWORD (WINAPI *pGetDllDirectoryA)(DWORD,LPSTR);
diff --git a/modules/rostests/winetests/kernel32/path.c
b/modules/rostests/winetests/kernel32/path.c
index c9afb1bee5..526c872f7c 100755
--- a/modules/rostests/winetests/kernel32/path.c
+++ b/modules/rostests/winetests/kernel32/path.c
@@ -19,15 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-#include <assert.h>
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "winerror.h"
-#include "winnls.h"
+#include "precomp.h"
#define HAS_TRAIL_SLASH_A(string) (string[lstrlenA(string)-1]=='\\')
diff --git a/modules/rostests/winetests/kernel32/pipe.c
b/modules/rostests/winetests/kernel32/pipe.c
index 49c06436ef..3e4cf97ae6 100755
--- a/modules/rostests/winetests/kernel32/pipe.c
+++ b/modules/rostests/winetests/kernel32/pipe.c
@@ -18,16 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
-#include "windef.h"
-#include "winbase.h"
-#include "wine/winternl.h"
-#include "winioctl.h"
-#include "wine/test.h"
+#include "precomp.h"
#define PIPENAME "\\\\.\\PiPe\\tests_pipe.c"
#define PIPENAME_SPECIAL "\\\\.\\PiPe\\tests->pipe.c"
diff --git a/modules/rostests/winetests/kernel32/precomp.h
b/modules/rostests/winetests/kernel32/precomp.h
new file mode 100644
index 0000000000..958ccf5ae0
--- /dev/null
+++ b/modules/rostests/winetests/kernel32/precomp.h
@@ -0,0 +1,22 @@
+#ifndef _KERNEL32_WINETEST_PRECOMP_H_
+#define _KERNEL32_WINETEST_PRECOMP_H_
+
+#include <assert.h>
+#include <stdio.h>
+#include <ntstatus.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#define COBJMACROS
+
+#include <wine/test.h>
+#include <wine/winternl.h>
+#include <winuser.h>
+#include <winreg.h>
+#include <wincon.h>
+#include <winnls.h>
+#include <winioctl.h>
+#include <tlhelp32.h>
+
+#endif /* !_KERNEL32_WINETEST_PRECOMP_H_ */
diff --git a/modules/rostests/winetests/kernel32/process.c
b/modules/rostests/winetests/kernel32/process.c
index 63536465df..1c710a8470 100755
--- a/modules/rostests/winetests/kernel32/process.c
+++ b/modules/rostests/winetests/kernel32/process.c
@@ -20,22 +20,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "wincon.h"
-#include "winnls.h"
-#include "wine/winternl.h"
-#include "tlhelp32.h"
-
-#include "wine/test.h"
+#include "precomp.h"
/* PROCESS_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */
#define PROCESS_ALL_ACCESS_NT4 (PROCESS_ALL_ACCESS & ~0xf000)
diff --git a/modules/rostests/winetests/kernel32/profile.c
b/modules/rostests/winetests/kernel32/profile.c
index 990aa1441d..277d018579 100755
--- a/modules/rostests/winetests/kernel32/profile.c
+++ b/modules/rostests/winetests/kernel32/profile.c
@@ -18,13 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "windows.h"
+#include "precomp.h"
#define KEY "ProfileInt"
#define SECTION "Test"
diff --git a/modules/rostests/winetests/kernel32/resource.c
b/modules/rostests/winetests/kernel32/resource.c
index 74066cfba3..b0014a38af 100644
--- a/modules/rostests/winetests/kernel32/resource.c
+++ b/modules/rostests/winetests/kernel32/resource.c
@@ -18,10 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <windows.h>
-#include <stdio.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static const char filename[] = "test_.exe";
static DWORD GLE;
diff --git a/modules/rostests/winetests/kernel32/sync.c
b/modules/rostests/winetests/kernel32/sync.c
index dfb462cea0..6cbff90059 100755
--- a/modules/rostests/winetests/kernel32/sync.c
+++ b/modules/rostests/winetests/kernel32/sync.c
@@ -18,15 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#define _WIN32_WINNT 0x500
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <windef.h>
-#include <winbase.h>
-#include <wine/winternl.h>
-
-#include <wine/test.h>
+#include "precomp.h"
#define QueryDepthSList(x) RtlQueryDepthSList(x)
#define InterlockedPushEntrySList(x,y) RtlInterlockedPushEntrySList(x,y)
diff --git a/modules/rostests/winetests/kernel32/testlist.c
b/modules/rostests/winetests/kernel32/testlist.c
index 05f63de152..8e47dcc2bd 100755
--- a/modules/rostests/winetests/kernel32/testlist.c
+++ b/modules/rostests/winetests/kernel32/testlist.c
@@ -1,10 +1,7 @@
/* Automatically generated file; DO NOT EDIT!! */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
#define STANDALONE
-#include "wine/test.h"
+#include <wine/test.h>
extern void func_actctx(void);
extern void func_atom(void);
diff --git a/modules/rostests/winetests/kernel32/thread.c
b/modules/rostests/winetests/kernel32/thread.c
index 28e35d4d81..9e9e968c46 100755
--- a/modules/rostests/winetests/kernel32/thread.c
+++ b/modules/rostests/winetests/kernel32/thread.c
@@ -18,25 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-/* Define _WIN32_WINNT to get SetThreadIdealProcessor on Windows */
-#define _WIN32_WINNT 0x0600
-
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-/* the tests intentionally pass invalid pointers and need an exception handler */
-#define WINE_NO_INLINE_STRING
-
-#include <ntstatus.h>
-#define WIN32_NO_STATUS
-#include <windef.h>
-#include <winbase.h>
-#include <winnt.h>
-#include <winerror.h>
-#include <winnls.h>
-#include <wine/winternl.h>
-#include <wine/test.h>
+#include "precomp.h"
/* THREAD_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */
#define THREAD_ALL_ACCESS_NT4 (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3ff)
diff --git a/modules/rostests/winetests/kernel32/time.c
b/modules/rostests/winetests/kernel32/time.c
index bc505e99b3..e37434fc4c 100755
--- a/modules/rostests/winetests/kernel32/time.c
+++ b/modules/rostests/winetests/kernel32/time.c
@@ -19,10 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "wine/test.h"
-#include "winbase.h"
-#include "winnls.h"
-#include "wine/winternl.h"
+#include "precomp.h"
static BOOL (WINAPI *pTzSpecificLocalTimeToSystemTime)(LPTIME_ZONE_INFORMATION,
LPSYSTEMTIME, LPSYSTEMTIME);
static BOOL (WINAPI *pSystemTimeToTzSpecificLocalTime)(LPTIME_ZONE_INFORMATION,
LPSYSTEMTIME, LPSYSTEMTIME);
diff --git a/modules/rostests/winetests/kernel32/timer.c
b/modules/rostests/winetests/kernel32/timer.c
index bcc800c494..b8d0892ff8 100755
--- a/modules/rostests/winetests/kernel32/timer.c
+++ b/modules/rostests/winetests/kernel32/timer.c
@@ -18,11 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define _WIN32_WINNT 0x0501
-
-#include "wine/test.h"
-#include "winbase.h"
-
+#include "precomp.h"
static void test_timer(void)
{
diff --git a/modules/rostests/winetests/kernel32/toolhelp.c
b/modules/rostests/winetests/kernel32/toolhelp.c
index c40dbc4f8f..b90c3caa6b 100644
--- a/modules/rostests/winetests/kernel32/toolhelp.c
+++ b/modules/rostests/winetests/kernel32/toolhelp.c
@@ -18,15 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "tlhelp32.h"
-#include "wine/test.h"
-#include "winuser.h"
+#include "precomp.h"
static char selfname[MAX_PATH];
diff --git a/modules/rostests/winetests/kernel32/version.c
b/modules/rostests/winetests/kernel32/version.c
index 6e3c751516..8891c9d14b 100644
--- a/modules/rostests/winetests/kernel32/version.c
+++ b/modules/rostests/winetests/kernel32/version.c
@@ -18,12 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-/* Needed for PRODUCT_* defines and GetProductInfo() */
-#define _WIN32_WINNT 0x0600
-
-#include "wine/test.h"
-#include "winbase.h"
-#include "wine/winternl.h"
+#include "precomp.h"
static BOOL (WINAPI * pGetProductInfo)(DWORD, DWORD, DWORD, DWORD, DWORD *);
static BOOL (WINAPI * pVerifyVersionInfoA)(LPOSVERSIONINFOEXA, DWORD, DWORDLONG);
diff --git a/modules/rostests/winetests/kernel32/virtual.c
b/modules/rostests/winetests/kernel32/virtual.c
index 018b7e9ae0..f2c504eac9 100755
--- a/modules/rostests/winetests/kernel32/virtual.c
+++ b/modules/rostests/winetests/kernel32/virtual.c
@@ -18,19 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
-#include "windef.h"
-#include "winbase.h"
-#include "winnt.h"
-#include "wine/winternl.h"
-#include "winerror.h"
-#include "winuser.h"
-#include "wine/exception.h"
-#include "wine/test.h"
+#include "precomp.h"
+
+#include <wine/exception.h>
#define NUM_THREADS 4
#define MAPPING_SIZE 0x100000
diff --git a/modules/rostests/winetests/kernel32/volume.c
b/modules/rostests/winetests/kernel32/volume.c
index 1915836d16..f0a0d3be05 100644
--- a/modules/rostests/winetests/kernel32/volume.c
+++ b/modules/rostests/winetests/kernel32/volume.c
@@ -18,11 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "wine/test.h"
-#include "winbase.h"
-#include "winioctl.h"
-#include <stdio.h>
-#include "wine/ddk/ntddcdvd.h"
+#include "precomp.h"
+
+#include <wine/ddk/ntddcdvd.h>
#include <pshpack1.h>
struct COMPLETE_DVD_LAYER_DESCRIPTOR