From d8c817aa7808d73fee296aa8ddbaf7693f0c473c Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 1 Jan 2014 21:42:31 +0000 Subject: [PATCH] [WINHTTP] * Move some inclusions to the main header. * Set the default debugging channel globally through the main header. * Remove inclusions and definitions that already exist in the main header. CORE-7716 svn path=/trunk/; revision=61478 --- reactos/dll/win32/winhttp/cookie.c | 16 ----------- reactos/dll/win32/winhttp/handle.c | 16 ----------- reactos/dll/win32/winhttp/main.c | 21 ++------------ reactos/dll/win32/winhttp/net.c | 31 ++------------------- reactos/dll/win32/winhttp/request.c | 20 ++----------- reactos/dll/win32/winhttp/session.c | 27 +++--------------- reactos/dll/win32/winhttp/url.c | 17 ----------- reactos/dll/win32/winhttp/winhttp_private.h | 26 +++++++++++++---- 8 files changed, 32 insertions(+), 142 deletions(-) diff --git a/reactos/dll/win32/winhttp/cookie.c b/reactos/dll/win32/winhttp/cookie.c index 661cc7945c7..e340dbedc5d 100644 --- a/reactos/dll/win32/winhttp/cookie.c +++ b/reactos/dll/win32/winhttp/cookie.c @@ -16,24 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include -//#include - -#include -//#include "wine/list.h" - -//#include "windef.h" -#include -#include - #include "winhttp_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(winhttp); - static domain_t *add_domain( session_t *session, WCHAR *name ) { domain_t *domain; diff --git a/reactos/dll/win32/winhttp/handle.c b/reactos/dll/win32/winhttp/handle.c index 16bd601d96f..f7d1b395ffc 100644 --- a/reactos/dll/win32/winhttp/handle.c +++ b/reactos/dll/win32/winhttp/handle.c @@ -18,24 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include -//#include "wine/port.h" -#include - -//#include - -//#include "windef.h" -#include -#include - #include "winhttp_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(winhttp); - #define HANDLE_CHUNK_SIZE 0x10 static CRITICAL_SECTION handle_cs; diff --git a/reactos/dll/win32/winhttp/main.c b/reactos/dll/win32/winhttp/main.c index 7a442dce1e8..1707a345e91 100644 --- a/reactos/dll/win32/winhttp/main.c +++ b/reactos/dll/win32/winhttp/main.c @@ -16,27 +16,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#include -#include - -#include -#include -#include -#include -#include -#include - -#include #include "winhttp_private.h" -static HINSTANCE instance; +#include +#include -WINE_DEFAULT_DEBUG_CHANNEL(winhttp); +static HINSTANCE instance; /****************************************************************** * DllMain (winhttp.@) diff --git a/reactos/dll/win32/winhttp/net.c b/reactos/dll/win32/winhttp/net.c index cbf642d019c..0f5dc7f0d35 100644 --- a/reactos/dll/win32/winhttp/net.c +++ b/reactos/dll/win32/winhttp/net.c @@ -17,19 +17,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H +#include "winhttp_private.h" -#include -//#include - -//#include -//#include -//#include #include +#include -//#include #ifdef HAVE_SYS_SOCKET_H # include #endif @@ -43,25 +35,6 @@ # include #endif -#define NONAMELESSUNION - -#include -#include - -//#include "windef.h" -//#include "winbase.h" -#include -//#include "wincrypt.h" -#include - -#include "winhttp_private.h" - -/* to avoid conflicts with the Unix socket headers */ -#define USE_WS_PREFIX -//#include "winsock2.h" - -WINE_DEFAULT_DEBUG_CHANNEL(winhttp); - #ifndef HAVE_GETADDRINFO /* critical section to protect non-reentrant gethostbyname() */ diff --git a/reactos/dll/win32/winhttp/request.c b/reactos/dll/win32/winhttp/request.c index 8da3a2e72f3..fd113d44b43 100644 --- a/reactos/dll/win32/winhttp/request.c +++ b/reactos/dll/win32/winhttp/request.c @@ -19,33 +19,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H +#include "winhttp_private.h" -#define COBJMACROS -#include -//#include "wine/port.h" -#include - -#include #ifdef HAVE_ARPA_INET_H # include #endif -#include -#include -#include -//#include "initguid.h" +#include #include -#include - -#include "winhttp_private.h" #include "inet_ntop.c" -WINE_DEFAULT_DEBUG_CHANNEL(winhttp); - static const WCHAR attr_accept[] = {'A','c','c','e','p','t',0}; static const WCHAR attr_accept_charset[] = {'A','c','c','e','p','t','-','C','h','a','r','s','e','t', 0}; static const WCHAR attr_accept_encoding[] = {'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g',0}; diff --git a/reactos/dll/win32/winhttp/session.c b/reactos/dll/win32/winhttp/session.c index d5dae41b0ef..9f23a8d5196 100644 --- a/reactos/dll/win32/winhttp/session.c +++ b/reactos/dll/win32/winhttp/session.c @@ -16,31 +16,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include -//#include "wine/port.h" -#include - -//#include -//#include - -#include -#include -#include -#include -#include -#include -#define COBJMACROS -#include -#include -#include - #include "winhttp_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(winhttp); +#include +#include +#include +#include #define DEFAULT_RESOLVE_TIMEOUT 0 #define DEFAULT_CONNECT_TIMEOUT 20000 diff --git a/reactos/dll/win32/winhttp/url.c b/reactos/dll/win32/winhttp/url.c index b6cfb151226..684d1c02381 100644 --- a/reactos/dll/win32/winhttp/url.c +++ b/reactos/dll/win32/winhttp/url.c @@ -16,25 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include -//#include - -#include - -//#include "windef.h" -#include -//#include "winreg.h" -#include -//#include "shlwapi.h" - #include "winhttp_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(winhttp); - static const WCHAR scheme_http[] = {'h','t','t','p',0}; static const WCHAR scheme_https[] = {'h','t','t','p','s',0}; diff --git a/reactos/dll/win32/winhttp/winhttp_private.h b/reactos/dll/win32/winhttp/winhttp_private.h index 2413d828f2e..e1ca4a79313 100644 --- a/reactos/dll/win32/winhttp/winhttp_private.h +++ b/reactos/dll/win32/winhttp/winhttp_private.h @@ -19,14 +19,27 @@ #ifndef _WINE_WINHTTP_PRIVATE_H_ #define _WINE_WINHTTP_PRIVATE_H_ -#ifndef __WINE_CONFIG_H -# error You must include config.h to use this header -#endif +#include + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS +#define NONAMELESSUNION + +#include +#include +#include +#include +#include +#include #include #include -//#include #ifdef HAVE_SYS_SOCKET_H # include #endif @@ -42,9 +55,12 @@ # define closesocket close # define ioctlsocket ioctl #endif -#include + #include +#include +WINE_DEFAULT_DEBUG_CHANNEL(winhttp); + static const WCHAR getW[] = {'G','E','T',0}; static const WCHAR postW[] = {'P','O','S','T',0}; static const WCHAR headW[] = {'H','E','A','D',0};