[WS2_32_APITEST] Improve the existing PCH and make use of it.
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 21 Dec 2017 12:36:04 +0000 (13:36 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 21 Dec 2017 12:36:04 +0000 (13:36 +0100)
18 files changed:
modules/rostests/apitests/ws2_32/CMakeLists.txt
modules/rostests/apitests/ws2_32/WSAAsync.c
modules/rostests/apitests/ws2_32/WSAIoctl.c
modules/rostests/apitests/ws2_32/WSARecv.c
modules/rostests/apitests/ws2_32/WSAStartup.c
modules/rostests/apitests/ws2_32/bind.c
modules/rostests/apitests/ws2_32/close.c
modules/rostests/apitests/ws2_32/getaddrinfo.c
modules/rostests/apitests/ws2_32/getnameinfo.c
modules/rostests/apitests/ws2_32/getservbyname.c
modules/rostests/apitests/ws2_32/getservbyport.c
modules/rostests/apitests/ws2_32/helpers.c
modules/rostests/apitests/ws2_32/ioctlsocket.c
modules/rostests/apitests/ws2_32/nonblocking.c
modules/rostests/apitests/ws2_32/nostartup.c
modules/rostests/apitests/ws2_32/recv.c
modules/rostests/apitests/ws2_32/send.c
modules/rostests/apitests/ws2_32/ws2_32.h

index 1538e29..cd63545 100644 (file)
@@ -16,10 +16,11 @@ list(APPEND SOURCE
     WSAIoctl.c
     WSARecv.c
     WSAStartup.c
-    testlist.c)
+    ws2_32.h)
 
-add_executable(ws2_32_apitest ${SOURCE})
+add_executable(ws2_32_apitest ${SOURCE} testlist.c)
 target_link_libraries(ws2_32_apitest wine ${PSEH_LIB})
 set_module_type(ws2_32_apitest win32cui)
 add_importlibs(ws2_32_apitest ws2_32 msvcrt iphlpapi kernel32 ntdll)
+add_pch(ws2_32_apitest ws2_32.h SOURCE)
 add_rostests_file(TARGET ws2_32_apitest)
index 083d2cc..6d784f1 100644 (file)
@@ -5,11 +5,7 @@
 * PROGRAMMERS:     Miroslav Mastny 
 */
 
-#include <apitest.h>
-
-#include <stdio.h>
-#include <windows.h>
-#include <winsock2.h>
+#include "ws2_32.h"
 
 #define SVR_PORT 5000
 #define WAIT_TIMEOUT_ 10000
index 2e1f722..5f98c01 100644 (file)
@@ -6,11 +6,9 @@
  * PROGRAMMERS:     Andreas Maier
  */
 
-#include <apitest.h>
+#include "ws2_32.h"
 
-#include <stdio.h>
-#include "ws2tcpip.h"
-#include "iphlpapi.h"
+#include <iphlpapi.h>
 
 void traceaddr(char* txt, sockaddr_gen a)
 {
index 051a1ce..4a076b2 100644 (file)
@@ -5,11 +5,6 @@
  * PROGRAMMERS:     Peter Hater
  */
 
-#include <apitest.h>
-
-#include <stdio.h>
-#include <ntstatus.h>
-#include <wine/winternl.h>
 #include "ws2_32.h"
 
 #define RECV_BUF   4
index 92edb42..11e731a 100644 (file)
@@ -5,15 +5,7 @@
  * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
  */
 
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#include <windef.h>
-#include <winsock2.h>
-#include <ndk/rtlfuncs.h>
-#include <ndk/mmfuncs.h>
+#include "ws2_32.h"
 
 static
 PVOID
index 1e8c393..bf9069d 100644 (file)
@@ -5,16 +5,7 @@
  * PROGRAMMER:      Peter Hater
  */
 
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <ws2tcpip.h>
-#include <ndk/umtypes.h>
+#include "ws2_32.h"
 
 CHAR LocalAddress[sizeof("255.255.255.255")];
 #define PORT 58888
index 624571b..8701a3c 100644 (file)
@@ -5,11 +5,6 @@
  * PROGRAMMERS:     Peter Hater
  */
 
-#include <apitest.h>
-
-#include <stdio.h>
-#include <ntstatus.h>
-#include <wine/winternl.h>
 #include "ws2_32.h"
 
 void Test_CloseDuplicatedSocket()
index b9b3ab5..369c5b3 100644 (file)
@@ -5,16 +5,7 @@
  * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
  */
 
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <ws2tcpip.h>
-#include <ndk/umtypes.h>
+#include "ws2_32.h"
 
 #define ok_addrinfo(ai, flags, family, socktype, protocol, addrlen) do  \
 {                                                                       \
index 294259b..f8dbafc 100644 (file)
@@ -5,16 +5,7 @@
  * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
  */
 
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <ws2tcpip.h>
-#include <ndk/umtypes.h>
+#include "ws2_32.h"
 
 START_TEST(getnameinfo)
 {
index bfb0f0f..fcfef09 100644 (file)
@@ -5,15 +5,7 @@
  * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
  */
 
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <ws2tcpip.h>
+#include "ws2_32.h"
 
 START_TEST(getservbyname)
 {
index acf48de..0e06904 100644 (file)
@@ -5,15 +5,7 @@
  * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
  */
 
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <ws2tcpip.h>
+#include "ws2_32.h"
 
 START_TEST(getservbyport)
 {
index 7048696..702ac36 100644 (file)
@@ -6,9 +6,6 @@
  * COPYRIGHT:   Copyright 2008 Colin Finck <mail@colinfinck.de>
  */
 
-#include <apitest.h>
-
-#include <stdio.h>
 #include "ws2_32.h"
 
 int CreateSocket(SOCKET* psck)
index 90398b3..2667f6c 100644 (file)
@@ -5,9 +5,6 @@
  * PROGRAMMERS:     Colin Finck
  */
 
-#include <apitest.h>
-
-#include <stdio.h>
 #include "ws2_32.h"
 
 int Test_ioctlsocket()
index 328f823..29e6e38 100644 (file)
@@ -5,11 +5,7 @@
 * PROGRAMMERS:     Peter Hater 
 */
 
-#include <apitest.h>
-
-#include <stdio.h>
-#include <windows.h>
-#include <winsock2.h>
+#include "ws2_32.h"
 
 #define SVR_PORT 5000
 #define WAIT_TIMEOUT_ 10000
index 2449d88..28b0a9c 100644 (file)
@@ -5,16 +5,7 @@
  *  PROGRAMMER:      Sylvain Petreolle <sylvain.petreolle@reactos.org>
  */
 
-#include <apitest.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#include <windef.h>
-#include <winsock2.h>
-#include <ndk/rtlfuncs.h>
-#include <ndk/mmfuncs.h>
+#include "ws2_32.h"
 
 // This test depends on WSAStartup not having been called
 START_TEST(nostartup)
index 55982ce..9721280 100644 (file)
@@ -5,13 +5,12 @@
  * PROGRAMMERS:     Colin Finck
  */
 
-#include <apitest.h>
-
-#include <stdio.h>
-#include <ntstatus.h>
-#include <wine/winternl.h>
 #include "ws2_32.h"
 
+#include <ndk/exfuncs.h>
+#include <ndk/iofuncs.h>
+#include <ndk/obfuncs.h>
+
 #define RECV_BUF   4
 
 /* For valid test results, the ReactOS Website needs to return at least 8 bytes on a "GET / HTTP/1.0" request.
index 5e70223..d8a149c 100644 (file)
@@ -5,12 +5,7 @@
  * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
  */
 
-#include <apitest.h>
-#include <winsock2.h>
-
-#define WIN32_NO_STATUS
-#include <ndk/mmfuncs.h>
-#include <ndk/rtlfuncs.h>
+#include "ws2_32.h"
 
 static
 PVOID
index b8415bf..35a3d4e 100644 (file)
@@ -9,10 +9,17 @@
 #ifndef _WS2_32_APITESTS_H
 #define _WS2_32_APITESTS_H
 
+#include <ntstatus.h>
+#include <stdio.h>
+
 #define WIN32_NO_STATUS
 #define _INC_WINDOWS
 #define COM_NO_WINDOWS_H
-#include <winsock2.h>
+
+#include <apitest.h>
+#include <ws2tcpip.h>
+#include <ndk/rtlfuncs.h>
+#include <ndk/mmfuncs.h>
 
 /* Simple macro for executing a socket command and doing cleanup operations in case of a failure */
 #define SCKTEST(_cmd_) \
@@ -34,4 +41,4 @@ int GetRequestAndWait(SOCKET sck);
 /* ws2_32.c */
 extern HANDLE g_hHeap;
 
-#endif
+#endif /* !_WS2_32_APITESTS_H */