https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e00cc9728c2b2206bf304…
commit e00cc9728c2b2206bf30498ac653392664d6924e
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Wed Dec 13 13:48:26 2017 +0100
[KERNEL32_APITEST] Add a PCH.
---
modules/rostests/apitests/kernel32/CMakeLists.txt | 7 ++++---
modules/rostests/apitests/kernel32/Console.c | 4 +---
modules/rostests/apitests/kernel32/CreateProcess.c | 5 ++---
modules/rostests/apitests/kernel32/DefaultActCtx.c | 9 +--------
modules/rostests/apitests/kernel32/DeviceIoControl.c | 5 ++---
modules/rostests/apitests/kernel32/FindActCtxSectionStringW.c | 8 +-------
modules/rostests/apitests/kernel32/FindFiles.c | 4 +---
modules/rostests/apitests/kernel32/GetComputerNameEx.c | 7 +------
modules/rostests/apitests/kernel32/GetCurrentDirectory.c | 6 +-----
modules/rostests/apitests/kernel32/GetDriveType.c | 3 +--
modules/rostests/apitests/kernel32/GetModuleFileName.c | 10 ++--------
modules/rostests/apitests/kernel32/GetVolumeInformation.c | 5 +----
modules/rostests/apitests/kernel32/IsDBCSLeadByteEx.c | 8 +-------
modules/rostests/apitests/kernel32/LoadLibraryExW.c | 8 +-------
modules/rostests/apitests/kernel32/Mailslot.c | 5 +----
modules/rostests/apitests/kernel32/MultiByteToWideChar.c | 4 +---
modules/rostests/apitests/kernel32/PrivMoveFileIdentityW.c | 4 +---
modules/rostests/apitests/kernel32/SetConsoleWindowInfo.c | 3 +--
modules/rostests/apitests/kernel32/SetCurrentDirectory.c | 6 +-----
.../rostests/apitests/kernel32/SetUnhandledExceptionFilter.c | 5 +----
modules/rostests/apitests/kernel32/TerminateProcess.c | 3 +--
modules/rostests/apitests/kernel32/TunnelCache.c | 6 +-----
modules/rostests/apitests/kernel32/WideCharToMultiByte.c | 4 +---
modules/rostests/apitests/kernel32/dosdev.c | 8 +-------
modules/rostests/apitests/kernel32/interlck.c | 7 +------
modules/rostests/apitests/kernel32/lstrcpynW.c | 5 +----
modules/rostests/apitests/kernel32/lstrlen.c | 5 +----
modules/rostests/apitests/kernel32/precomp.h | 11 +++++++++++
28 files changed, 44 insertions(+), 121 deletions(-)
diff --git a/modules/rostests/apitests/kernel32/CMakeLists.txt
b/modules/rostests/apitests/kernel32/CMakeLists.txt
index 86107d733d..06edd1b9c3 100644
--- a/modules/rostests/apitests/kernel32/CMakeLists.txt
+++ b/modules/rostests/apitests/kernel32/CMakeLists.txt
@@ -19,6 +19,7 @@ list(APPEND SOURCE
LoadLibraryExW.c
lstrcpynW.c
lstrlen.c
+ Mailslot.c
MultiByteToWideChar.c
PrivMoveFileIdentityW.c
SetConsoleWindowInfo.c
@@ -27,14 +28,14 @@ list(APPEND SOURCE
TerminateProcess.c
TunnelCache.c
WideCharToMultiByte.c
- testlist.c
- Mailslot.c)
+ precomp.h)
-add_executable(kernel32_apitest ${SOURCE})
+add_executable(kernel32_apitest ${SOURCE} testlist.c)
target_link_libraries(kernel32_apitest wine ${PSEH_LIB})
set_module_type(kernel32_apitest win32cui)
add_delay_importlibs(kernel32_apitest advapi32 shlwapi)
add_importlibs(kernel32_apitest msvcrt kernel32 ntdll)
+add_pch(kernel32_apitest precomp.h SOURCE)
add_rostests_file(TARGET kernel32_apitest)
list(APPEND MANIFEST_FILES
diff --git a/modules/rostests/apitests/kernel32/Console.c
b/modules/rostests/apitests/kernel32/Console.c
index 3263291086..21dfd4b9e7 100644
--- a/modules/rostests/apitests/kernel32/Console.c
+++ b/modules/rostests/apitests/kernel32/Console.c
@@ -5,9 +5,7 @@
* PROGRAMMERS: Katayama Hirofumi MZ
*/
-#include <apitest.h>
-#include <wincon.h>
-#include <winnls.h>
+#include "precomp.h"
#define okCURSOR(hCon, c) do { \
CONSOLE_SCREEN_BUFFER_INFO __sbi; \
diff --git a/modules/rostests/apitests/kernel32/CreateProcess.c
b/modules/rostests/apitests/kernel32/CreateProcess.c
index a9ef26fd7d..f1d17d854e 100644
--- a/modules/rostests/apitests/kernel32/CreateProcess.c
+++ b/modules/rostests/apitests/kernel32/CreateProcess.c
@@ -5,10 +5,9 @@
* PROGRAMMERS: Mark Jansen
*/
-#include <apitest.h>
-#include <ndk/rtltypes.h>
-#include <ndk/rtlfuncs.h>
+#include "precomp.h"
+#include <ndk/rtlfuncs.h>
START_TEST(CreateProcess)
{
diff --git a/modules/rostests/apitests/kernel32/DefaultActCtx.c
b/modules/rostests/apitests/kernel32/DefaultActCtx.c
index 579480459d..c5d7118e0f 100644
--- a/modules/rostests/apitests/kernel32/DefaultActCtx.c
+++ b/modules/rostests/apitests/kernel32/DefaultActCtx.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 "precomp.h"
START_TEST(DefaultActCtx)
{
diff --git a/modules/rostests/apitests/kernel32/DeviceIoControl.c
b/modules/rostests/apitests/kernel32/DeviceIoControl.c
index be3086edda..0a678997ea 100644
--- a/modules/rostests/apitests/kernel32/DeviceIoControl.c
+++ b/modules/rostests/apitests/kernel32/DeviceIoControl.c
@@ -5,10 +5,9 @@
* PROGRAMMER: Pierre Schweitzer <pierre(a)reactos.org>
*/
-#include <apitest.h>
-#include <strsafe.h>
+#include "precomp.h"
+
#include <winioctl.h>
-#include <mountmgr.h>
#include <mountdev.h>
WCHAR Letter;
diff --git a/modules/rostests/apitests/kernel32/FindActCtxSectionStringW.c
b/modules/rostests/apitests/kernel32/FindActCtxSectionStringW.c
index 7b2ba3ab67..de2a07545a 100644
--- a/modules/rostests/apitests/kernel32/FindActCtxSectionStringW.c
+++ b/modules/rostests/apitests/kernel32/FindActCtxSectionStringW.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 "winerror.h"
+#include "precomp.h"
#define STRSECTION_MAGIC 0x64487353 /* dHsS */
diff --git a/modules/rostests/apitests/kernel32/FindFiles.c
b/modules/rostests/apitests/kernel32/FindFiles.c
index 52a031aa64..d4a0c6d69d 100644
--- a/modules/rostests/apitests/kernel32/FindFiles.c
+++ b/modules/rostests/apitests/kernel32/FindFiles.c
@@ -5,9 +5,7 @@
* PROGRAMMER: Hermès BÉLUSCA - MAÏTO
*/
-#include <apitest.h>
-
-#include <windows.h>
+#include "precomp.h"
/*
* NOTE: This test supposes the following requirements:
diff --git a/modules/rostests/apitests/kernel32/GetComputerNameEx.c
b/modules/rostests/apitests/kernel32/GetComputerNameEx.c
index 1beb70ceec..3e93165821 100644
--- a/modules/rostests/apitests/kernel32/GetComputerNameEx.c
+++ b/modules/rostests/apitests/kernel32/GetComputerNameEx.c
@@ -5,12 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#include <stdio.h>
-#include <ndk/rtltypes.h>
-#include <winreg.h>
+#include "precomp.h"
static
VOID
diff --git a/modules/rostests/apitests/kernel32/GetCurrentDirectory.c
b/modules/rostests/apitests/kernel32/GetCurrentDirectory.c
index c8aafb784a..f3dcc2620f 100644
--- a/modules/rostests/apitests/kernel32/GetCurrentDirectory.c
+++ b/modules/rostests/apitests/kernel32/GetCurrentDirectory.c
@@ -5,11 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#include <stdio.h>
-#include <ndk/rtltypes.h>
+#include "precomp.h"
static
BOOLEAN
diff --git a/modules/rostests/apitests/kernel32/GetDriveType.c
b/modules/rostests/apitests/kernel32/GetDriveType.c
index 657cf79e16..b6db1d9296 100644
--- a/modules/rostests/apitests/kernel32/GetDriveType.c
+++ b/modules/rostests/apitests/kernel32/GetDriveType.c
@@ -1,5 +1,4 @@
-#include <apitest.h>
-#include <strsafe.h>
+#include "precomp.h"
#define IS_DRIVE_TYPE_VALID(type) ((type) != DRIVE_UNKNOWN && (type) !=
DRIVE_NO_ROOT_DIR)
diff --git a/modules/rostests/apitests/kernel32/GetModuleFileName.c
b/modules/rostests/apitests/kernel32/GetModuleFileName.c
index 43c5ec338e..ba1572c920 100644
--- a/modules/rostests/apitests/kernel32/GetModuleFileName.c
+++ b/modules/rostests/apitests/kernel32/GetModuleFileName.c
@@ -5,14 +5,8 @@
* PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#include <stdio.h>
-#include <winreg.h>
-#include <winnls.h>
+#include "precomp.h"
+
#include <shlwapi.h>
static
diff --git a/modules/rostests/apitests/kernel32/GetVolumeInformation.c
b/modules/rostests/apitests/kernel32/GetVolumeInformation.c
index 7d2cf8bf3f..5184f1c9c3 100644
--- a/modules/rostests/apitests/kernel32/GetVolumeInformation.c
+++ b/modules/rostests/apitests/kernel32/GetVolumeInformation.c
@@ -5,10 +5,7 @@
* PROGRAMMER: Pierre Schweitzer <pierre(a)reactos.org>
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#include <stdio.h>
+#include "precomp.h"
static VOID
TestGetVolumeInformationA(VOID)
diff --git a/modules/rostests/apitests/kernel32/IsDBCSLeadByteEx.c
b/modules/rostests/apitests/kernel32/IsDBCSLeadByteEx.c
index 77548e5011..f7fcfdba44 100644
--- a/modules/rostests/apitests/kernel32/IsDBCSLeadByteEx.c
+++ b/modules/rostests/apitests/kernel32/IsDBCSLeadByteEx.c
@@ -5,13 +5,7 @@
* PROGRAMMER: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#include <stdio.h>
-#include <winnls.h>
+#include "precomp.h"
#define MAX_RANGE 4
diff --git a/modules/rostests/apitests/kernel32/LoadLibraryExW.c
b/modules/rostests/apitests/kernel32/LoadLibraryExW.c
index 2e8d6a114f..7e32f18468 100644
--- a/modules/rostests/apitests/kernel32/LoadLibraryExW.c
+++ b/modules/rostests/apitests/kernel32/LoadLibraryExW.c
@@ -16,13 +16,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 "precomp.h"
HANDLE _CreateActCtxFromFile(LPCWSTR FileName, int line);
VOID _ActivateCtx(HANDLE h, ULONG_PTR *cookie, int line);
diff --git a/modules/rostests/apitests/kernel32/Mailslot.c
b/modules/rostests/apitests/kernel32/Mailslot.c
index 4cd701f2f9..d2cc5d1a7b 100644
--- a/modules/rostests/apitests/kernel32/Mailslot.c
+++ b/modules/rostests/apitests/kernel32/Mailslot.c
@@ -5,10 +5,7 @@
* PROGRAMMER: Nikita Pechenkin (n.pechenkin(a)mail.ru)
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#include <stdio.h>
+#include "precomp.h"
#define LMS TEXT("\\\\.\\mailslot\\rostest_slot")
#define MSG (0x50DA)
diff --git a/modules/rostests/apitests/kernel32/MultiByteToWideChar.c
b/modules/rostests/apitests/kernel32/MultiByteToWideChar.c
index 00242a6d11..120ce60f90 100644
--- a/modules/rostests/apitests/kernel32/MultiByteToWideChar.c
+++ b/modules/rostests/apitests/kernel32/MultiByteToWideChar.c
@@ -5,9 +5,7 @@
* PROGRAMMER: Mike "tamlin" Nordell
*/
-#include <apitest.h>
-
-#include <winnls.h>
+#include "precomp.h"
START_TEST(MultiByteToWideChar)
{
diff --git a/modules/rostests/apitests/kernel32/PrivMoveFileIdentityW.c
b/modules/rostests/apitests/kernel32/PrivMoveFileIdentityW.c
index 39fd0a1ef1..fcc557c496 100644
--- a/modules/rostests/apitests/kernel32/PrivMoveFileIdentityW.c
+++ b/modules/rostests/apitests/kernel32/PrivMoveFileIdentityW.c
@@ -5,11 +5,9 @@
* PROGRAMMER: Pierre Schweitzer <pierre(a)reactos.org>
*/
-#include <apitest.h>
+#include "precomp.h"
-#define WIN32_NO_STATUS
#include <ndk/iofuncs.h>
-#include <ndk/rtltypes.h>
static const WCHAR FileName[] = L"TestFile.xxx";
static const CHAR FileNameA[] = "TestFile.xxx";
diff --git a/modules/rostests/apitests/kernel32/SetConsoleWindowInfo.c
b/modules/rostests/apitests/kernel32/SetConsoleWindowInfo.c
index 763e99afd3..46db2fa592 100644
--- a/modules/rostests/apitests/kernel32/SetConsoleWindowInfo.c
+++ b/modules/rostests/apitests/kernel32/SetConsoleWindowInfo.c
@@ -5,8 +5,7 @@
* PROGRAMMER: Hermes Belusca-Maito
*/
-#include <apitest.h>
-#include <wincon.h>
+#include "precomp.h"
static VOID
ResizeTextConsole(
diff --git a/modules/rostests/apitests/kernel32/SetCurrentDirectory.c
b/modules/rostests/apitests/kernel32/SetCurrentDirectory.c
index c19b968afa..f6f862dab0 100644
--- a/modules/rostests/apitests/kernel32/SetCurrentDirectory.c
+++ b/modules/rostests/apitests/kernel32/SetCurrentDirectory.c
@@ -5,11 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#include <stdio.h>
-#include <ndk/rtltypes.h>
+#include "precomp.h"
static
VOID
diff --git a/modules/rostests/apitests/kernel32/SetUnhandledExceptionFilter.c
b/modules/rostests/apitests/kernel32/SetUnhandledExceptionFilter.c
index ddf6b3f509..fb7e9f7381 100644
--- a/modules/rostests/apitests/kernel32/SetUnhandledExceptionFilter.c
+++ b/modules/rostests/apitests/kernel32/SetUnhandledExceptionFilter.c
@@ -5,11 +5,8 @@
* PROGRAMMER: Mike "tamlin" Nordell
*/
-#include <apitest.h>
+#include "precomp.h"
-#define WIN32_NO_STATUS
-#include <stdio.h>
-#include <ndk/rtltypes.h>
#include <xmmintrin.h>
/*
diff --git a/modules/rostests/apitests/kernel32/TerminateProcess.c
b/modules/rostests/apitests/kernel32/TerminateProcess.c
index 1120bea773..cdcfc432b5 100644
--- a/modules/rostests/apitests/kernel32/TerminateProcess.c
+++ b/modules/rostests/apitests/kernel32/TerminateProcess.c
@@ -5,10 +5,9 @@
* PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
+#include "precomp.h"
#include <ndk/obfuncs.h>
-#include <strsafe.h>
static
HANDLE
diff --git a/modules/rostests/apitests/kernel32/TunnelCache.c
b/modules/rostests/apitests/kernel32/TunnelCache.c
index 74e2e5a2dc..23632a7157 100644
--- a/modules/rostests/apitests/kernel32/TunnelCache.c
+++ b/modules/rostests/apitests/kernel32/TunnelCache.c
@@ -5,11 +5,7 @@
* PROGRAMMER: Pierre Schweitzer <pierre.schweitzer(a)reactos.org>
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#include <stdio.h>
-#include <ndk/rtlfuncs.h>
+#include "precomp.h"
static
void
diff --git a/modules/rostests/apitests/kernel32/WideCharToMultiByte.c
b/modules/rostests/apitests/kernel32/WideCharToMultiByte.c
index 34881ce554..80b56a6a2e 100644
--- a/modules/rostests/apitests/kernel32/WideCharToMultiByte.c
+++ b/modules/rostests/apitests/kernel32/WideCharToMultiByte.c
@@ -5,9 +5,7 @@
* PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org>
*/
-#include <apitest.h>
-
-#include <winnls.h>
+#include "precomp.h"
#define ntv6(x) (LOBYTE(LOWORD(GetVersion())) >= 6 ? (x) : 0)
diff --git a/modules/rostests/apitests/kernel32/dosdev.c
b/modules/rostests/apitests/kernel32/dosdev.c
index ce393248be..36531c68e1 100644
--- a/modules/rostests/apitests/kernel32/dosdev.c
+++ b/modules/rostests/apitests/kernel32/dosdev.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 "winerror.h"
+#include "precomp.h"
#define SUBST_DRIVE_LETTER 'M'
#define SUBST_DRIVE "M:"
diff --git a/modules/rostests/apitests/kernel32/interlck.c
b/modules/rostests/apitests/kernel32/interlck.c
index e67fb5fc20..f205977f36 100644
--- a/modules/rostests/apitests/kernel32/interlck.c
+++ b/modules/rostests/apitests/kernel32/interlck.c
@@ -18,12 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <stdarg.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
+#include "precomp.h"
static void test_InterlockedCompareExchange(void)
{
diff --git a/modules/rostests/apitests/kernel32/lstrcpynW.c
b/modules/rostests/apitests/kernel32/lstrcpynW.c
index a6e953b570..6bc49c6320 100644
--- a/modules/rostests/apitests/kernel32/lstrcpynW.c
+++ b/modules/rostests/apitests/kernel32/lstrcpynW.c
@@ -4,10 +4,7 @@
* PURPOSE: Test for lstrcpynW
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#include <stdio.h>
+#include "precomp.h"
START_TEST(lstrcpynW)
{
diff --git a/modules/rostests/apitests/kernel32/lstrlen.c
b/modules/rostests/apitests/kernel32/lstrlen.c
index 69db9ae18e..45dbc582c8 100644
--- a/modules/rostests/apitests/kernel32/lstrlen.c
+++ b/modules/rostests/apitests/kernel32/lstrlen.c
@@ -5,10 +5,7 @@
* PROGRAMMER: Hermes Belusca-Maito
*/
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#include <stdio.h>
+#include "precomp.h"
LONG WINAPI VEHandler_1(PEXCEPTION_POINTERS ExceptionInfo)
{
diff --git a/modules/rostests/apitests/kernel32/precomp.h
b/modules/rostests/apitests/kernel32/precomp.h
new file mode 100644
index 0000000000..cbc24c78ae
--- /dev/null
+++ b/modules/rostests/apitests/kernel32/precomp.h
@@ -0,0 +1,11 @@
+#ifndef _KERNEL32_APITEST_PRECOMP_H_
+#define _KERNEL32_APITEST_PRECOMP_H_
+
+#include <apitest.h>
+#include <wincon.h>
+#include <winnls.h>
+#include <winreg.h>
+#include <strsafe.h>
+#include <ndk/umtypes.h>
+
+#endif /* _KERNEL32_APITEST_PRECOMP_H_ */