https://git.reactos.org/?p=reactos.git;a=commitdiff;h=71ddf5374afe94770caceā¦
commit 71ddf5374afe94770cace84664331f1d41bd8dfc
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Dec 17 12:24:27 2017 +0100
[ADVAPI32_WINETEST] Add a PCH.
---
modules/rostests/winetests/advapi32/CMakeLists.txt | 5 +++--
modules/rostests/winetests/advapi32/cred.c | 9 ++-------
modules/rostests/winetests/advapi32/crypt.c | 10 ++--------
modules/rostests/winetests/advapi32/crypt_lmhash.c | 9 +--------
modules/rostests/winetests/advapi32/crypt_md4.c | 10 +---------
modules/rostests/winetests/advapi32/crypt_md5.c | 7 +------
modules/rostests/winetests/advapi32/crypt_sha.c | 8 +-------
modules/rostests/winetests/advapi32/eventlog.c | 18 +++++-------------
modules/rostests/winetests/advapi32/lsa.c | 21 +++++----------------
modules/rostests/winetests/advapi32/precomp.h | 19 +++++++++++++++++++
modules/rostests/winetests/advapi32/registry.c | 15 ++-------------
modules/rostests/winetests/advapi32/security.c | 20 +-------------------
modules/rostests/winetests/advapi32/service.c | 17 +----------------
13 files changed, 44 insertions(+), 124 deletions(-)
diff --git a/modules/rostests/winetests/advapi32/CMakeLists.txt
b/modules/rostests/winetests/advapi32/CMakeLists.txt
index a148e08ddc..5d9cb9c3bd 100644
--- a/modules/rostests/winetests/advapi32/CMakeLists.txt
+++ b/modules/rostests/winetests/advapi32/CMakeLists.txt
@@ -13,9 +13,9 @@ list(APPEND SOURCE
registry.c
security.c
service.c
- testlist.c)
+ precomp.h)
-add_executable(advapi32_winetest ${SOURCE})
+add_executable(advapi32_winetest ${SOURCE} testlist.c)
if(USE_CLANG_CL OR (NOT MSVC))
add_target_compile_flags(advapi32_winetest "-Wno-format")
@@ -23,4 +23,5 @@ endif()
set_module_type(advapi32_winetest win32cui)
add_importlibs(advapi32_winetest advapi32 ole32 user32 msvcrt kernel32 ntdll)
+add_pch(advapi32_winetest precomp.h SOURCE)
add_rostests_file(TARGET advapi32_winetest)
diff --git a/modules/rostests/winetests/advapi32/cred.c
b/modules/rostests/winetests/advapi32/cred.c
index bb5fb4eace..38b23bc667 100644
--- a/modules/rostests/winetests/advapi32/cred.c
+++ b/modules/rostests/winetests/advapi32/cred.c
@@ -18,14 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-#include <stdio.h>
+#include "precomp.h"
-#include "windef.h"
-#include "winbase.h"
-#include "wincred.h"
-
-#include "wine/test.h"
+#include <wincred.h>
static BOOL (WINAPI *pCredDeleteA)(LPCSTR,DWORD,DWORD);
static BOOL (WINAPI *pCredEnumerateA)(LPCSTR,DWORD,DWORD *,PCREDENTIALA **);
diff --git a/modules/rostests/winetests/advapi32/crypt.c
b/modules/rostests/winetests/advapi32/crypt.c
index 13671eb0c2..4e05a8a15f 100644
--- a/modules/rostests/winetests/advapi32/crypt.c
+++ b/modules/rostests/winetests/advapi32/crypt.c
@@ -18,15 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
+#include "precomp.h"
-#include "windef.h"
-#include "winbase.h"
-#include "wincrypt.h"
-#include "winerror.h"
-#include "winreg.h"
-
-#include "wine/test.h"
+#include <wincrypt.h>
static const char szRsaBaseProv[] = MS_DEF_PROV_A;
static const char szNonExistentProv[] = "Wine Nonexistent Cryptographic Provider
v11.2";
diff --git a/modules/rostests/winetests/advapi32/crypt_lmhash.c
b/modules/rostests/winetests/advapi32/crypt_lmhash.c
index 7ea4fc4d76..4a5ca15dde 100644
--- a/modules/rostests/winetests/advapi32/crypt_lmhash.c
+++ b/modules/rostests/winetests/advapi32/crypt_lmhash.c
@@ -19,14 +19,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 "windef.h"
-#include "winbase.h"
-#include "wine/winternl.h"
+#include "precomp.h"
struct ustring {
DWORD Length;
diff --git a/modules/rostests/winetests/advapi32/crypt_md4.c
b/modules/rostests/winetests/advapi32/crypt_md4.c
index df36b36899..2b9d2412d3 100644
--- a/modules/rostests/winetests/advapi32/crypt_md4.c
+++ b/modules/rostests/winetests/advapi32/crypt_md4.c
@@ -18,15 +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 "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "wine/winternl.h"
+#include "precomp.h"
typedef struct
{
diff --git a/modules/rostests/winetests/advapi32/crypt_md5.c
b/modules/rostests/winetests/advapi32/crypt_md5.c
index 4cf88688ea..cae4fc5229 100644
--- a/modules/rostests/winetests/advapi32/crypt_md5.c
+++ b/modules/rostests/winetests/advapi32/crypt_md5.c
@@ -18,12 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
+#include "precomp.h"
typedef struct
{
diff --git a/modules/rostests/winetests/advapi32/crypt_sha.c
b/modules/rostests/winetests/advapi32/crypt_sha.c
index 2737ee7c0c..f0350204b6 100644
--- a/modules/rostests/winetests/advapi32/crypt_sha.c
+++ b/modules/rostests/winetests/advapi32/crypt_sha.c
@@ -18,13 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-
-#include "wine/test.h"
+#include "precomp.h"
typedef struct {
ULONG Unknown[6];
diff --git a/modules/rostests/winetests/advapi32/eventlog.c
b/modules/rostests/winetests/advapi32/eventlog.c
index 8c78dcf73f..0b8484f17c 100644
--- a/modules/rostests/winetests/advapi32/eventlog.c
+++ b/modules/rostests/winetests/advapi32/eventlog.c
@@ -18,19 +18,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
-#include "initguid.h"
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "winnt.h"
-#include "winreg.h"
-#include "sddl.h"
-#include "wmistr.h"
-#include "evntrace.h"
-
-#include "wine/test.h"
+#include "precomp.h"
+
+#include <wmistr.h>
+#include <initguid.h>
+#include <evntrace.h>
static BOOL (WINAPI *pCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*);
static BOOL (WINAPI *pGetEventLogInformation)(HANDLE,DWORD,LPVOID,DWORD,LPDWORD);
diff --git a/modules/rostests/winetests/advapi32/lsa.c
b/modules/rostests/winetests/advapi32/lsa.c
index 58bccd147b..0ce93c678d 100644
--- a/modules/rostests/winetests/advapi32/lsa.c
+++ b/modules/rostests/winetests/advapi32/lsa.c
@@ -18,22 +18,11 @@
* 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
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#include "windef.h"
-#include "winbase.h"
-#include "winreg.h"
-#include "ntsecapi.h"
-#include "sddl.h"
-#include "winnls.h"
-#include "objbase.h"
-#include "initguid.h"
-#include "wine/test.h"
+#include "precomp.h"
+
+#include <winnls.h>
+#include <objbase.h>
+#include <initguid.h>
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
diff --git a/modules/rostests/winetests/advapi32/precomp.h
b/modules/rostests/winetests/advapi32/precomp.h
new file mode 100644
index 0000000000..21bf46d9f3
--- /dev/null
+++ b/modules/rostests/winetests/advapi32/precomp.h
@@ -0,0 +1,19 @@
+#ifndef _ADVAPI32_WINETEST_PRECOMP_H_
+#define _ADVAPI32_WINETEST_PRECOMP_H_
+
+#include <stdio.h>
+#include <ntstatus.h>
+#define WIN32_NO_STATUS
+#define WIN32_LEAN_AND_MEAN
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#include <wine/test.h>
+#include <winreg.h>
+#include <wine/winternl.h>
+#include <ntsecapi.h>
+#include <sddl.h>
+#include <lmcons.h>
+#include <aclapi.h>
+
+
+#endif /* !_ADVAPI32_WINETEST_PRECOMP_H_ */
\ No newline at end of file
diff --git a/modules/rostests/winetests/advapi32/registry.c
b/modules/rostests/winetests/advapi32/registry.c
index 053113a293..4b99099b65 100644
--- a/modules/rostests/winetests/advapi32/registry.c
+++ b/modules/rostests/winetests/advapi32/registry.c
@@ -19,21 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define WIN32_LEAN_AND_MEAN
+#include "precomp.h"
#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include "wine/test.h"
-#include "windef.h"
-#include "winbase.h"
-#include "wine/winternl.h"
-#include "winreg.h"
-#include "winperf.h"
-#include "winsvc.h"
-#include "winerror.h"
-#include "aclapi.h"
+#include <winperf.h>
#define IS_HKCR(hk) ((UINT_PTR)hk > 0 && ((UINT_PTR)hk & 3) == 2)
diff --git a/modules/rostests/winetests/advapi32/security.c
b/modules/rostests/winetests/advapi32/security.c
index 7ca17b71e8..c64b1d99e9 100644
--- a/modules/rostests/winetests/advapi32/security.c
+++ b/modules/rostests/winetests/advapi32/security.c
@@ -19,25 +19,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
-#define WIN32_LEAN_AND_MEAN
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "wine/winternl.h"
-#include "aclapi.h"
-#include "winnt.h"
-#include "sddl.h"
-#include "ntsecapi.h"
-#include "lmcons.h"
-
-#include <winsvc.h>
-
-#include "wine/test.h"
+#include "precomp.h"
/* FIXME: Inspect */
#define GetCurrentProcessToken() ((HANDLE)~(ULONG_PTR)3)
diff --git a/modules/rostests/winetests/advapi32/service.c
b/modules/rostests/winetests/advapi32/service.c
index 3a85b1cef7..7d62a08359 100644
--- a/modules/rostests/winetests/advapi32/service.c
+++ b/modules/rostests/winetests/advapi32/service.c
@@ -18,22 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define WIN32_LEAN_AND_MEAN
-
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "winreg.h"
-#include "winsvc.h"
-#include "winnls.h"
-#include "lmcons.h"
-#include "aclapi.h"
-
-#include "wine/test.h"
+#include "precomp.h"
static const CHAR spooler[] = "Spooler"; /* Should be available on all
platforms */
static CHAR selfname[MAX_PATH];