https://git.reactos.org/?p=reactos.git;a=commitdiff;h=24f894695692800754a22e...
commit 24f894695692800754a22e802860e7add1ed58c2 Author: Amine Khaldi amine.khaldi@reactos.org AuthorDate: Tue Dec 12 12:44:32 2017 +0100
[ADVAPI32_APITEST] Add a PCH. --- modules/rostests/apitests/advapi32/CMakeLists.txt | 5 +++-- modules/rostests/apitests/advapi32/CreateService.c | 6 +----- modules/rostests/apitests/advapi32/DuplicateTokenEx.c | 4 +--- modules/rostests/apitests/advapi32/HKEY_CLASSES_ROOT.c | 6 +----- modules/rostests/apitests/advapi32/IsTextUnicode.c | 7 +------ modules/rostests/apitests/advapi32/LockServiceDatabase.c | 5 +---- modules/rostests/apitests/advapi32/QueryServiceConfig2.c | 6 +----- modules/rostests/apitests/advapi32/RegEnumKey.c | 5 +---- modules/rostests/apitests/advapi32/RegEnumValueW.c | 5 +---- modules/rostests/apitests/advapi32/RegOpenKeyExW.c | 6 +----- modules/rostests/apitests/advapi32/RegQueryInfoKey.c | 5 +---- modules/rostests/apitests/advapi32/RegQueryValueExW.c | 4 +--- modules/rostests/apitests/advapi32/RtlEncryptMemory.c | 6 +----- modules/rostests/apitests/advapi32/SaferIdentifyLevel.c | 5 +---- modules/rostests/apitests/advapi32/ServiceArgs.c | 5 +---- modules/rostests/apitests/advapi32/ServiceEnv.c | 4 ++-- modules/rostests/apitests/advapi32/eventlog.c | 5 +---- modules/rostests/apitests/advapi32/precomp.h | 12 ++++++++++++ modules/rostests/apitests/advapi32/svchlp.c | 5 +---- modules/rostests/apitests/advapi32/svchlp.h | 3 +-- 20 files changed, 34 insertions(+), 75 deletions(-)
diff --git a/modules/rostests/apitests/advapi32/CMakeLists.txt b/modules/rostests/apitests/advapi32/CMakeLists.txt index d78ba867cb..e34f682676 100644 --- a/modules/rostests/apitests/advapi32/CMakeLists.txt +++ b/modules/rostests/apitests/advapi32/CMakeLists.txt @@ -17,10 +17,11 @@ list(APPEND SOURCE ServiceArgs.c ServiceEnv.c svchlp.c - testlist.c) + precomp.h)
-add_executable(advapi32_apitest ${SOURCE}) +add_executable(advapi32_apitest ${SOURCE} testlist.c) target_link_libraries(advapi32_apitest wine ${PSEH_LIB}) set_module_type(advapi32_apitest win32cui) add_importlibs(advapi32_apitest advapi32 msvcrt kernel32 ntdll) +add_pch(advapi32_apitest precomp.h SOURCE) add_rostests_file(TARGET advapi32_apitest) diff --git a/modules/rostests/apitests/advapi32/CreateService.c b/modules/rostests/apitests/advapi32/CreateService.c index ee2f15c3a0..a3c5aa04e8 100644 --- a/modules/rostests/apitests/advapi32/CreateService.c +++ b/modules/rostests/apitests/advapi32/CreateService.c @@ -5,11 +5,7 @@ * PROGRAMMER: Thomas Faber thomas.faber@reactos.org */
-#include <apitest.h> - -#include <winreg.h> -#include <winsvc.h> -#include <strsafe.h> +#include "precomp.h"
static int MakeService(SC_HANDLE hScm, const wchar_t *serviceName, SC_HANDLE *hService, DWORD *tag) { diff --git a/modules/rostests/apitests/advapi32/DuplicateTokenEx.c b/modules/rostests/apitests/advapi32/DuplicateTokenEx.c index b8e64c6957..252faf7261 100644 --- a/modules/rostests/apitests/advapi32/DuplicateTokenEx.c +++ b/modules/rostests/apitests/advapi32/DuplicateTokenEx.c @@ -5,9 +5,7 @@ * PROGRAMMER: Jérôme Gardou jerome.gardou@reactos.org */
-#include <apitest.h> -#include <winbase.h> -#include <rtlfuncs.h> +#include "precomp.h"
#define ok_luid_equal(Luid, Expected) \ ok(RtlEqualLuid((Luid), (Expected)), "Got wrong LUID %08lx%08lx, expected (%08lx%08lx).\n", \ diff --git a/modules/rostests/apitests/advapi32/HKEY_CLASSES_ROOT.c b/modules/rostests/apitests/advapi32/HKEY_CLASSES_ROOT.c index c65e76abbe..cec975f5b0 100644 --- a/modules/rostests/apitests/advapi32/HKEY_CLASSES_ROOT.c +++ b/modules/rostests/apitests/advapi32/HKEY_CLASSES_ROOT.c @@ -5,13 +5,9 @@ * PROGRAMMER: Jérôme Gardou jerome.gardou@reactos.org */
-#include <apitest.h> +#include "precomp.h"
-#define WIN32_NO_STATUS -#include <winreg.h> -#include <ndk/rtlfuncs.h> #include <ndk/cmfuncs.h> -#include <ndk/cmtypes.h>
#define IS_HKCR(hk) (((UINT_PTR)hk & 3) == 2)
diff --git a/modules/rostests/apitests/advapi32/IsTextUnicode.c b/modules/rostests/apitests/advapi32/IsTextUnicode.c index 5b51e3b385..9bd170cefb 100644 --- a/modules/rostests/apitests/advapi32/IsTextUnicode.c +++ b/modules/rostests/apitests/advapi32/IsTextUnicode.c @@ -6,13 +6,8 @@ * Dmitry Chapyshev */
-#include <apitest.h> +#include "precomp.h"
-#define WIN32_NO_STATUS -#include <ndk/rtlfuncs.h> -#include <winbase.h> -#include <winnls.h> -#include <wincon.h> #include <stdio.h>
PVOID LoadCodePageData(ULONG Code) diff --git a/modules/rostests/apitests/advapi32/LockServiceDatabase.c b/modules/rostests/apitests/advapi32/LockServiceDatabase.c index 5bd2ad7b97..850cc4c70a 100644 --- a/modules/rostests/apitests/advapi32/LockServiceDatabase.c +++ b/modules/rostests/apitests/advapi32/LockServiceDatabase.c @@ -5,10 +5,7 @@ * PROGRAMMER: Hermès BÉLUSCA - MAÏTO */
-#include <apitest.h> - -#include <winsvc.h> -#include <strsafe.h> +#include "precomp.h"
#define TESTING_SERVICE L"Spooler"
diff --git a/modules/rostests/apitests/advapi32/QueryServiceConfig2.c b/modules/rostests/apitests/advapi32/QueryServiceConfig2.c index 133b9a26ac..a9bc478efc 100644 --- a/modules/rostests/apitests/advapi32/QueryServiceConfig2.c +++ b/modules/rostests/apitests/advapi32/QueryServiceConfig2.c @@ -5,11 +5,7 @@ * PROGRAMMER: Hermès BÉLUSCA - MAÏTO */
-#include <apitest.h> - -#include <winreg.h> -#include <winsvc.h> -#include <strsafe.h> +#include "precomp.h"
#define TESTING_SERVICEW L"Spooler" #define TESTING_SERVICEA "Spooler" diff --git a/modules/rostests/apitests/advapi32/RegEnumKey.c b/modules/rostests/apitests/advapi32/RegEnumKey.c index 23ba958b62..b303e91bdb 100644 --- a/modules/rostests/apitests/advapi32/RegEnumKey.c +++ b/modules/rostests/apitests/advapi32/RegEnumKey.c @@ -5,10 +5,7 @@ * PROGRAMMER: Thomas Faber & Doug Lyons */
-#include <apitest.h> - -#define WIN32_NO_STATUS -#include <winreg.h> +#include "precomp.h"
START_TEST(RegEnumKey) { diff --git a/modules/rostests/apitests/advapi32/RegEnumValueW.c b/modules/rostests/apitests/advapi32/RegEnumValueW.c index 51da24bb62..95f10d21ca 100644 --- a/modules/rostests/apitests/advapi32/RegEnumValueW.c +++ b/modules/rostests/apitests/advapi32/RegEnumValueW.c @@ -5,10 +5,7 @@ * PROGRAMMER: Jérôme Gardou jerome.gardou@reactos.org */
-#include <apitest.h> - -#define WIN32_NO_STATUS -#include <winreg.h> +#include "precomp.h"
START_TEST(RegEnumValueW) { diff --git a/modules/rostests/apitests/advapi32/RegOpenKeyExW.c b/modules/rostests/apitests/advapi32/RegOpenKeyExW.c index c84989072e..11ebdc9e3e 100644 --- a/modules/rostests/apitests/advapi32/RegOpenKeyExW.c +++ b/modules/rostests/apitests/advapi32/RegOpenKeyExW.c @@ -4,15 +4,11 @@ * PURPOSE: Test for the RegOpenKeyExW alignment * PROGRAMMER: Mark Jansen (mark.jansen@reactos.org) */ -#include <apitest.h> - -#define WIN32_NO_STATUS -#include <winreg.h>
+#include "precomp.h"
#define TEST_STR L".exe"
- START_TEST(RegOpenKeyExW) { char GccShouldNotAlignThis[20 * 2]; diff --git a/modules/rostests/apitests/advapi32/RegQueryInfoKey.c b/modules/rostests/apitests/advapi32/RegQueryInfoKey.c index 024f3d15b0..0bda2cd57d 100644 --- a/modules/rostests/apitests/advapi32/RegQueryInfoKey.c +++ b/modules/rostests/apitests/advapi32/RegQueryInfoKey.c @@ -5,10 +5,7 @@ * PROGRAMMER: Thomas Faber thomas.faber@reactos.org */
-#include <apitest.h> - -#define WIN32_NO_STATUS -#include <winreg.h> +#include "precomp.h"
#define TestKeyAccess(da, er, es) TestKeyAccess_(__FILE__, __LINE__, da, er, es) static diff --git a/modules/rostests/apitests/advapi32/RegQueryValueExW.c b/modules/rostests/apitests/advapi32/RegQueryValueExW.c index ada53d85d9..1438457069 100644 --- a/modules/rostests/apitests/advapi32/RegQueryValueExW.c +++ b/modules/rostests/apitests/advapi32/RegQueryValueExW.c @@ -4,10 +4,8 @@ * PURPOSE: Test for the RegQueryValueW API * PROGRAMMER: Victor Martinez Calvo victor.martinez@reactos.org */ -#include <apitest.h>
-#define WIN32_NO_STATUS -#include <winreg.h> +#include "precomp.h"
static DWORD delete_key(HKEY hkey) { diff --git a/modules/rostests/apitests/advapi32/RtlEncryptMemory.c b/modules/rostests/apitests/advapi32/RtlEncryptMemory.c index 7a0b3d3b35..8cc5036962 100644 --- a/modules/rostests/apitests/advapi32/RtlEncryptMemory.c +++ b/modules/rostests/apitests/advapi32/RtlEncryptMemory.c @@ -5,12 +5,8 @@ * PROGRAMMER: Timo Kreuzer timo.kreuzer@reactos.org */
-#include <apitest.h> +#include "precomp.h"
-#define WIN32_NO_STATUS -#include <windows.h> -#include <ndk/ntndk.h> -#include <winsafer.h> #include <ntsecapi.h>
START_TEST(RtlEncryptMemory) diff --git a/modules/rostests/apitests/advapi32/SaferIdentifyLevel.c b/modules/rostests/apitests/advapi32/SaferIdentifyLevel.c index c704dccb60..1aea94f2c3 100644 --- a/modules/rostests/apitests/advapi32/SaferIdentifyLevel.c +++ b/modules/rostests/apitests/advapi32/SaferIdentifyLevel.c @@ -5,11 +5,8 @@ * PROGRAMMER: Thomas Faber thomas.faber@reactos.org */
-#include <apitest.h> +#include "precomp.h"
-#define WIN32_NO_STATUS -#include <windows.h> -#include <ndk/ntndk.h> #include <winsafer.h>
#define SaferIdentifyLevel(c, p, h, r) SaferIdentifyLevel(c, (PSAFER_CODE_PROPERTIES)(p), h, r) diff --git a/modules/rostests/apitests/advapi32/ServiceArgs.c b/modules/rostests/apitests/advapi32/ServiceArgs.c index 16d675a297..18d9b82096 100644 --- a/modules/rostests/apitests/advapi32/ServiceArgs.c +++ b/modules/rostests/apitests/advapi32/ServiceArgs.c @@ -6,10 +6,7 @@ * Thomas Faber thomas.faber@reactos.org */
-#include <apitest.h> -#include <winnls.h> -#include <winsvc.h> -#include <strsafe.h> +#include "precomp.h"
static char **argv; static int argc; diff --git a/modules/rostests/apitests/advapi32/ServiceEnv.c b/modules/rostests/apitests/advapi32/ServiceEnv.c index 0e8aa2bac6..b98a076b30 100644 --- a/modules/rostests/apitests/advapi32/ServiceEnv.c +++ b/modules/rostests/apitests/advapi32/ServiceEnv.c @@ -5,8 +5,8 @@ * PROGRAMMER: Hermes Belusca-Maito */
-#include <apitest.h> -#include <winsvc.h> +#include "precomp.h" + #include "svchlp.h"
diff --git a/modules/rostests/apitests/advapi32/eventlog.c b/modules/rostests/apitests/advapi32/eventlog.c index c4aa9c08d3..d7860a9887 100644 --- a/modules/rostests/apitests/advapi32/eventlog.c +++ b/modules/rostests/apitests/advapi32/eventlog.c @@ -5,10 +5,7 @@ * PROGRAMMER: Hermes Belusca-Maito */
-#include <apitest.h> - -#define WIN32_NO_STATUS -#include <winbase.h> +#include "precomp.h"
START_TEST(eventlog) { diff --git a/modules/rostests/apitests/advapi32/precomp.h b/modules/rostests/apitests/advapi32/precomp.h new file mode 100644 index 0000000000..503d956465 --- /dev/null +++ b/modules/rostests/apitests/advapi32/precomp.h @@ -0,0 +1,12 @@ +#ifndef _ADVAPI32_APITEST_PRECOMP_H_ +#define _ADVAPI32_APITEST_PRECOMP_H_ + +#include <apitest.h> +#include <winreg.h> +#include <winsvc.h> +#include <winnls.h> +#include <strsafe.h> +#include <ntstatus.h> +#include <ndk/rtlfuncs.h> + +#endif /* _ADVAPI32_APITEST_PRECOMP_H_ */ diff --git a/modules/rostests/apitests/advapi32/svchlp.c b/modules/rostests/apitests/advapi32/svchlp.c index 764c5d8359..7a3aca65e7 100644 --- a/modules/rostests/apitests/advapi32/svchlp.c +++ b/modules/rostests/apitests/advapi32/svchlp.c @@ -13,10 +13,7 @@ * the service process, without really passing it */
-#include <apitest.h> -#include <winnls.h> -#include <winsvc.h> -#include <strsafe.h> +#include "precomp.h"
static HANDLE hClientPipe = INVALID_HANDLE_VALUE; static WCHAR named_pipe_name[100]; // Shared: FIXME! diff --git a/modules/rostests/apitests/advapi32/svchlp.h b/modules/rostests/apitests/advapi32/svchlp.h index 3e503f8b49..0adb20fe55 100644 --- a/modules/rostests/apitests/advapi32/svchlp.h +++ b/modules/rostests/apitests/advapi32/svchlp.h @@ -7,8 +7,7 @@ * Hermes Belusca-Maito */
-// #include <apitest.h> - +#pragma once
/********** S E R V I C E ( C L I E N T ) M O D U L E S I D E *********/