Author: akhaldi
Date: Wed Jan 1 21:42:31 2014
New Revision: 61478
URL:
http://svn.reactos.org/svn/reactos?rev=61478&view=rev
Log:
[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
Modified:
trunk/reactos/dll/win32/winhttp/cookie.c
trunk/reactos/dll/win32/winhttp/handle.c
trunk/reactos/dll/win32/winhttp/main.c
trunk/reactos/dll/win32/winhttp/net.c
trunk/reactos/dll/win32/winhttp/request.c
trunk/reactos/dll/win32/winhttp/session.c
trunk/reactos/dll/win32/winhttp/url.c
trunk/reactos/dll/win32/winhttp/winhttp_private.h
Modified: trunk/reactos/dll/win32/winhttp/cookie.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/cookie.c…
==============================================================================
--- trunk/reactos/dll/win32/winhttp/cookie.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/cookie.c [iso-8859-1] Wed Jan 1 21:42:31 2014
@@ -16,23 +16,7 @@
* 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 <config.h>
-//#include <stdarg.h>
-
-#include <wine/debug.h>
-//#include "wine/list.h"
-
-//#include "windef.h"
-#include <winbase.h>
-#include <winhttp.h>
-
#include "winhttp_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(winhttp);
static domain_t *add_domain( session_t *session, WCHAR *name )
{
Modified: trunk/reactos/dll/win32/winhttp/handle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/handle.c…
==============================================================================
--- trunk/reactos/dll/win32/winhttp/handle.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/handle.c [iso-8859-1] Wed Jan 1 21:42:31 2014
@@ -18,23 +18,7 @@
* 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 <config.h>
-//#include "wine/port.h"
-#include <wine/debug.h>
-
-//#include <stdarg.h>
-
-//#include "windef.h"
-#include <winbase.h>
-#include <winhttp.h>
-
#include "winhttp_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(winhttp);
#define HANDLE_CHUNK_SIZE 0x10
Modified: trunk/reactos/dll/win32/winhttp/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/main.c?r…
==============================================================================
--- trunk/reactos/dll/win32/winhttp/main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/main.c [iso-8859-1] Wed Jan 1 21:42:31 2014
@@ -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
+#include "winhttp_private.h"
-#define COBJMACROS
-#include <config.h>
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
#include <rpcproxy.h>
#include <httprequest.h>
-#include <winhttp.h>
-
-#include <wine/debug.h>
-#include "winhttp_private.h"
static HINSTANCE instance;
-
-WINE_DEFAULT_DEBUG_CHANNEL(winhttp);
/******************************************************************
* DllMain (winhttp.@)
Modified: trunk/reactos/dll/win32/winhttp/net.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/net.c?re…
==============================================================================
--- trunk/reactos/dll/win32/winhttp/net.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/net.c [iso-8859-1] Wed Jan 1 21:42:31 2014
@@ -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 <config.h>
-//#include <wine/port.h>
-
-//#include <stdarg.h>
-//#include <stdio.h>
-//#include <errno.h>
+#include "winhttp_private.h"
+
#include <assert.h>
-
-//#include <sys/types.h>
+#include <schannel.h>
+
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
@@ -42,25 +34,6 @@
#ifdef HAVE_POLL_H
# include <poll.h>
#endif
-
-#define NONAMELESSUNION
-
-#include <wine/debug.h>
-#include <wine/library.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-#include <winhttp.h>
-//#include "wincrypt.h"
-#include <schannel.h>
-
-#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
Modified: trunk/reactos/dll/win32/winhttp/request.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/request.…
==============================================================================
--- trunk/reactos/dll/win32/winhttp/request.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/request.c [iso-8859-1] Wed Jan 1 21:42:31 2014
@@ -19,32 +19,16 @@
* 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 <config.h>
-//#include "wine/port.h"
-#include <wine/debug.h>
-
-#include <stdarg.h>
+#include "winhttp_private.h"
+
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-//#include "initguid.h"
+#include <winuser.h>
#include <httprequest.h>
-#include <winhttp.h>
-
-#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};
Modified: trunk/reactos/dll/win32/winhttp/session.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/session.…
==============================================================================
--- trunk/reactos/dll/win32/winhttp/session.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/session.c [iso-8859-1] Wed Jan 1 21:42:31 2014
@@ -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 <config.h>
-//#include "wine/port.h"
-#include <wine/debug.h>
-
-//#include <stdarg.h>
-//#include <stdlib.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winsock2.h>
-#include <winhttp.h>
+#include "winhttp_private.h"
+
#include <wincrypt.h>
#include <winreg.h>
-#define COBJMACROS
-#include <ole2.h>
#include <dispex.h>
#include <activscp.h>
-
-#include "winhttp_private.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(winhttp);
#define DEFAULT_RESOLVE_TIMEOUT 0
#define DEFAULT_CONNECT_TIMEOUT 20000
Modified: trunk/reactos/dll/win32/winhttp/url.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/url.c?re…
==============================================================================
--- trunk/reactos/dll/win32/winhttp/url.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/url.c [iso-8859-1] Wed Jan 1 21:42:31 2014
@@ -16,24 +16,7 @@
* 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 <config.h>
-//#include <stdarg.h>
-
-#include <wine/debug.h>
-
-//#include "windef.h"
-#include <winbase.h>
-//#include "winreg.h"
-#include <winhttp.h>
-//#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};
Modified: trunk/reactos/dll/win32/winhttp/winhttp_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/winhttp_…
==============================================================================
--- trunk/reactos/dll/win32/winhttp/winhttp_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/winhttp/winhttp_private.h [iso-8859-1] Wed Jan 1 21:42:31
2014
@@ -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 <wine/config.h>
+
+#include <stdarg.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include <windef.h>
+#include <winbase.h>
+#include <objbase.h>
+#include <oleauto.h>
+#include <winsock2.h>
+#include <winhttp.h>
#include <wine/list.h>
#include <wine/unicode.h>
-//#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
@@ -42,8 +55,11 @@
# define closesocket close
# define ioctlsocket ioctl
#endif
-#include <ole2.h>
+
#include <sspi.h>
+
+#include <wine/debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(winhttp);
static const WCHAR getW[] = {'G','E','T',0};
static const WCHAR postW[] = {'P','O','S','T',0};