[KERNEL32_WINETEST] Add a PCH.
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 18 Dec 2017 12:28:00 +0000 (13:28 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 18 Dec 2017 12:28:00 +0000 (13:28 +0100)
35 files changed:
modules/rostests/winetests/kernel32/CMakeLists.txt
modules/rostests/winetests/kernel32/actctx.c
modules/rostests/winetests/kernel32/atom.c
modules/rostests/winetests/kernel32/change.c
modules/rostests/winetests/kernel32/codepage.c
modules/rostests/winetests/kernel32/comm.c
modules/rostests/winetests/kernel32/console.c
modules/rostests/winetests/kernel32/cpu.c
modules/rostests/winetests/kernel32/debugger.c
modules/rostests/winetests/kernel32/directory.c
modules/rostests/winetests/kernel32/drive.c
modules/rostests/winetests/kernel32/environ.c
modules/rostests/winetests/kernel32/fiber.c
modules/rostests/winetests/kernel32/file.c
modules/rostests/winetests/kernel32/format_msg.c
modules/rostests/winetests/kernel32/heap.c
modules/rostests/winetests/kernel32/loader.c
modules/rostests/winetests/kernel32/locale.c
modules/rostests/winetests/kernel32/mailslot.c
modules/rostests/winetests/kernel32/module.c
modules/rostests/winetests/kernel32/path.c
modules/rostests/winetests/kernel32/pipe.c
modules/rostests/winetests/kernel32/precomp.h [new file with mode: 0644]
modules/rostests/winetests/kernel32/process.c
modules/rostests/winetests/kernel32/profile.c
modules/rostests/winetests/kernel32/resource.c
modules/rostests/winetests/kernel32/sync.c
modules/rostests/winetests/kernel32/testlist.c
modules/rostests/winetests/kernel32/thread.c
modules/rostests/winetests/kernel32/time.c
modules/rostests/winetests/kernel32/timer.c
modules/rostests/winetests/kernel32/toolhelp.c
modules/rostests/winetests/kernel32/version.c
modules/rostests/winetests/kernel32/virtual.c
modules/rostests/winetests/kernel32/volume.c

index af63b39..063ff85 100644 (file)
@@ -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)
index e8a2cdf..5a41c40 100644 (file)
  * 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>
 
index 0c17408..a276e96 100755 (executable)
  * 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))
 
index 3779e69..997b025 100755 (executable)
  *         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)
 {
index ac8b902..4acc0cb 100755 (executable)
  * 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};
index 9230850..cb76482 100755 (executable)
  * 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
index a14bc45..51f2162 100755 (executable)
@@ -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);
index 405d990..ff5a6c1 100644 (file)
@@ -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);
 
index 58f1f3c..2236046 100644 (file)
  * 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)
index f57618e..233fba7 100755 (executable)
  * 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);
 
index 98dc454..e787276 100755 (executable)
  * 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);
 
index f8452be..50d3315 100755 (executable)
  * 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) \
index 7501165..0e0051b 100644 (file)
@@ -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);
index 940e2fc..ee91e62 100755 (executable)
  *
  */
 
-/* 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 */
index 1f88e24..3966b2a 100755 (executable)
  * 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))
 
index 7c1c89d..0c82d7b 100755 (executable)
  * 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
 
index 90e790f..73ca013 100644 (file)
  * 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" );
index 5f0a836..5b68563 100755 (executable)
  *  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};
index da595e9..0e6c5b1 100755 (executable)
  * 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";
 
index 108d0cb..829a658 100755 (executable)
@@ -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);
index c9afb1b..526c872 100755 (executable)
  * 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]=='\\')
 
index 49c0643..3e4cf97 100755 (executable)
  * 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 (file)
index 0000000..958ccf5
--- /dev/null
@@ -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_ */
index 6353646..1c710a8 100755 (executable)
  * 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)
index 990aa14..277d018 100755 (executable)
  * 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"
index 74066cf..b0014a3 100644 (file)
  * 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;
index dfb462c..6cbff90 100755 (executable)
  * 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)
index 05f63de..8e47dcc 100755 (executable)
@@ -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);
index 28e35d4..9e9e968 100755 (executable)
  * 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)
index bc505e9..e37434f 100755 (executable)
  * 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);
index bcc800c..b8d0892 100755 (executable)
  * 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)
 {
index c40dbc4..b90c3ca 100644 (file)
  * 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];
 
index 6e3c751..8891c9d 100644 (file)
  * 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);
index 018b7e9..f2c504e 100755 (executable)
  * 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
index 1915836..f0a0d3b 100644 (file)
  * 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