From 0044cd0fca04ccce365b5b67ad812f4f5f87e4c8 Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Thu, 31 Oct 2019 13:37:42 +0100
Subject: [PATCH] httpapi: add stub for HttpReceiveRequestEntityBody

stub for https://bugs.winehq.org/show_bug.cgi?id=48017

Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
---
 dlls/httpapi/httpapi.spec   |  2 +-
 dlls/httpapi/httpapi_main.c | 14 ++++++++++++++
 include/http.h              |  1 +
 include/wine/debug.h        |  4 ++--
 include/wine/library.h      |  2 +-
 include/winternl.h          |  2 +-
 6 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/dlls/httpapi/httpapi.spec b/dlls/httpapi/httpapi.spec
index e2f165c688..c27d0c96b0 100644
--- a/dlls/httpapi/httpapi.spec
+++ b/dlls/httpapi/httpapi.spec
@@ -39,7 +39,7 @@
 @ stub HttpReceiveClientCertificate
 @ stdcall HttpReceiveHttpRequest(ptr int64 long ptr long ptr ptr)
 @ stub HttpReceiveHttpResponse
-@ stub HttpReceiveRequestEntityBody
+@ stdcall HttpReceiveRequestEntityBody(ptr int64 long ptr long ptr ptr)
 @ stub HttpRemoveAllUrlsFromConfigGroup
 @ stdcall HttpRemoveUrl(ptr wstr)
 @ stub HttpRemoveUrlFromConfigGroup
diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c
index 03511d6c9f..47b5d8a2bb 100644
--- a/dlls/httpapi/httpapi_main.c
+++ b/dlls/httpapi/httpapi_main.c
@@ -278,6 +278,20 @@ ULONG WINAPI HttpRemoveUrl(HANDLE queue, const WCHAR *url)
     return remove_url(queue, url);
 }
 
+/***********************************************************************
+ *        HttpReceiveRequestEntityBody     (HTTPAPI.@)
+ */
+ULONG WINAPI HttpReceiveRequestEntityBody(HANDLE queue, HTTP_REQUEST_ID id, ULONG flags,
+        void *buffer, ULONG size, ULONG *ret_size, OVERLAPPED *ovl)
+{
+    *ret_size = 0;
+
+    FIXME("stub: queue %p, id %s, flags %#x, buffer %p, size %#x, ret_size %p, ovl %p.\n",
+            queue, wine_dbgstr_longlong(id), flags, buffer, size, ret_size, ovl);
+
+    return ERROR_HANDLE_EOF;
+}
+
 /***********************************************************************
  *        HttpReceiveHttpRequest     (HTTPAPI.@)
  */
diff --git a/include/http.h b/include/http.h
index 7586d0cbe0..49eb557fae 100644
--- a/include/http.h
+++ b/include/http.h
@@ -441,6 +441,7 @@ ULONG WINAPI HttpInitialize(HTTPAPI_VERSION version, ULONG flags, void *reserved
 ULONG WINAPI HttpTerminate(ULONG flags, void *reserved);
 ULONG WINAPI HttpQueryServiceConfiguration(HANDLE,HTTP_SERVICE_CONFIG_ID,PVOID,ULONG,PVOID,ULONG,PULONG,LPOVERLAPPED);
 ULONG WINAPI HttpReceiveHttpRequest(HANDLE queue, HTTP_REQUEST_ID id, ULONG flags, HTTP_REQUEST *request, ULONG size, ULONG *ret_size, OVERLAPPED *ovl);
+ULONG WINAPI HttpReceiveRequestEntityBody(HANDLE queue, HTTP_REQUEST_ID id, ULONG flags, void *buffer, ULONG size, ULONG *ret_size, OVERLAPPED *ovl);
 ULONG WINAPI HttpRemoveUrl(HANDLE queue, const WCHAR *url);
 ULONG WINAPI HttpRemoveUrlFromUrlGroup(HTTP_URL_GROUP_ID id, const WCHAR *url, ULONG flags);
 ULONG WINAPI HttpSendHttpResponse(HANDLE queue, HTTP_REQUEST_ID id, ULONG flags, HTTP_RESPONSE *response, HTTP_CACHE_POLICY *cache_policy, ULONG *ret_size, void *reserved1, ULONG reserved2, OVERLAPPED *ovl, HTTP_LOG_DATA *log_data);
diff --git a/include/wine/debug.h b/include/wine/debug.h
index 1c312e9322..0ff4ac01af 100644
--- a/include/wine/debug.h
+++ b/include/wine/debug.h
@@ -146,7 +146,7 @@ struct __wine_debug_channel
 extern unsigned char __cdecl __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel );
 extern const char * __cdecl __wine_dbg_strdup( const char *str );
 extern int __cdecl __wine_dbg_output( const char *str );
-extern int __cdecl __wine_dbg_header( enum __wine_debug_class cls, struct __wine_debug_channel *channel,
+extern int __cdecl q__wine_dbg_header( enum __wine_debug_class cls, struct __wine_debug_channel *channel,
                                       const char *function );
 
 /*
@@ -209,7 +209,7 @@ static inline int __wine_dbg_cdecl wine_dbg_log( enum __wine_debug_class cls,
         format++;
         function = NULL;
     }
-    if ((ret = __wine_dbg_header( cls, channel, function )) == -1) return ret;
+    if ((ret = q__wine_dbg_header( cls, channel, function )) == -1) return ret;
 
     __wine_dbg_va_start( args, format );
     vsnprintf( buffer, sizeof(buffer), format, args );
diff --git a/include/wine/library.h b/include/wine/library.h
index af9deaf93f..ae08c74930 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -46,7 +46,7 @@ extern const char *wine_get_config_dir(void);
 extern const char *wine_get_data_dir(void);
 extern const char *wine_get_server_dir(void);
 extern const char *wine_get_user_name(void);
-extern const char *wine_get_version(void);
+extern const char *qwine_get_version(void);
 extern const char *wine_get_build_id(void);
 extern void wine_init_argv0_path( const char *argv0 );
 extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
diff --git a/include/winternl.h b/include/winternl.h
index 9b8bef0fe7..7e46b77665 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2976,7 +2976,7 @@ NTSYSAPI void      WINAPI TpWaitForWork(TP_WORK *,BOOL);
 
 /* Wine internal functions */
 
-NTSYSAPI NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
+NTSYSAPI NTSTATUS CDECL qwine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
                                                    UINT disposition, BOOLEAN check_case );
 NTSYSAPI NTSTATUS CDECL wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt );
 
-- 
2.24.0.rc1

