diff --git a/patches/dinput-SetActionMap-genre/0002-dinput-Improved-tracing-of-Semantic-value.patch b/patches/dinput-SetActionMap-genre/0002-dinput-Improved-tracing-of-Semantic-value.patch index fb4c9191..333550f7 100644 --- a/patches/dinput-SetActionMap-genre/0002-dinput-Improved-tracing-of-Semantic-value.patch +++ b/patches/dinput-SetActionMap-genre/0002-dinput-Improved-tracing-of-Semantic-value.patch @@ -15,7 +15,7 @@ index cf050cb71ed..79ef9620de9 100644 TRACE("\n"); } -+static char *dump_semantic(DWORD semantic) ++static const char *dump_semantic(DWORD semantic) +{ + if((semantic & 0xff000000) == 0xff000000) + return "Any AXIS"; diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 00ad77f0..a237da1a 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "887a57fadd00b39b266b421fe1a04ab09e0d917d" + echo "6e9746158030c4a8f876bf411e598e2b42ff1032" } # Show version information @@ -347,7 +347,6 @@ patch_enable_all () enable_winex11_drv_Query_server_position="$1" enable_winex11_drv_mouse_coorrds="$1" enable_wininet_Cleanup="$1" - enable_wininet_Http_Decoding="$1" enable_winmm_Delay_Import_Depends="$1" enable_winmm_mciSendCommandA="$1" enable_wintab32_improvements="$1" @@ -1165,9 +1164,6 @@ patch_enable () wininet-Cleanup) enable_wininet_Cleanup="$2" ;; - wininet-Http_Decoding) - enable_wininet_Http_Decoding="$2" - ;; winmm-Delay_Import_Depends) enable_winmm_Delay_Import_Depends="$2" ;; @@ -2102,8 +2098,8 @@ fi # | * [#25834] Implement advapi32.CreateRestrictedToken # | # | Modified files: -# | * dlls/advapi32/security.c, dlls/advapi32/tests/security.c, dlls/ntdll/nt.c, dlls/ntdll/ntdll.spec, include/winnt.h, -# | include/winternl.h, server/process.c, server/protocol.def, server/security.h, server/token.c +# | * dlls/kernelbase/security.c, dlls/ntdll/nt.c, dlls/ntdll/ntdll.spec, include/winnt.h, include/winternl.h, +# | server/process.c, server/protocol.def, server/security.h, server/token.c # | if test "$enable_advapi32_CreateRestrictedToken" -eq 1; then patch_apply advapi32-CreateRestrictedToken/0001-ntdll-Implement-NtFilterToken.patch @@ -7015,21 +7011,6 @@ if test "$enable_wininet_Cleanup" -eq 1; then ) >> "$patchlist" fi -# Patchset wininet-Http_Decoding -# | -# | This patchset fixes the following Wine bugs: -# | * [#42374] Allow to set INTERNET_OPTION_HTTP_DECODING on wininet sessions and connections -# | -# | Modified files: -# | * dlls/wininet/http.c, dlls/wininet/internet.c, dlls/wininet/internet.h, dlls/wininet/tests/http.c -# | -if test "$enable_wininet_Http_Decoding" -eq 1; then - patch_apply wininet-Http_Decoding/0001-wininet-Allow-to-set-INTERNET_OPTION_HTTP_DECODING-o.patch - ( - printf '%s\n' '+ { "Michael Müller", "wininet: Allow to set INTERNET_OPTION_HTTP_DECODING on sessions and connections.", 1 },'; - ) >> "$patchlist" -fi - # Patchset winmm-Delay_Import_Depends # | # | This patchset fixes the following Wine bugs: diff --git a/patches/winemapi-user-xdg-mail/0001-winemapi-Directly-use-xdg-email-if-available-enablin.patch b/patches/winemapi-user-xdg-mail/0001-winemapi-Directly-use-xdg-email-if-available-enablin.patch index a28308fd..8a66ce03 100644 --- a/patches/winemapi-user-xdg-mail/0001-winemapi-Directly-use-xdg-email-if-available-enablin.patch +++ b/patches/winemapi-user-xdg-mail/0001-winemapi-Directly-use-xdg-email-if-available-enablin.patch @@ -1,29 +1,29 @@ -From 57e066e3be063d122243daa149ef327c2594901a Mon Sep 17 00:00:00 2001 +From 0ae9f7c32cf873611ce5ed7f341f5979690f2318 Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Thu, 29 Mar 2018 11:58:25 +1100 Subject: [PATCH] winemapi: Directly use xdg-email if available, enabling file attachments. -This addresses https://bugs.winehq.org/show_bug.cgi?id=11770 for systems with xdg-email. - v2: Use new heap_* function. +Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=11770 + Signed-off-by: Jeremy White --- dlls/winemapi/Makefile.in | 3 +- dlls/winemapi/sendmail.c | 48 ++++-- dlls/winemapi/winemapi_private.h | 27 ++++ - dlls/winemapi/xdg-email.c | 246 +++++++++++++++++++++++++++++++ - 4 files changed, 309 insertions(+), 15 deletions(-) + dlls/winemapi/xdg-email.c | 241 +++++++++++++++++++++++++++++++ + 4 files changed, 304 insertions(+), 15 deletions(-) create mode 100644 dlls/winemapi/winemapi_private.h create mode 100644 dlls/winemapi/xdg-email.c diff --git a/dlls/winemapi/Makefile.in b/dlls/winemapi/Makefile.in -index 813ee42b349..d6f79b403da 100644 +index 84ff227e1cb..4fd83830aea 100644 --- a/dlls/winemapi/Makefile.in +++ b/dlls/winemapi/Makefile.in -@@ -3,4 +3,5 @@ IMPORTS = shlwapi shell32 mapi32 +@@ -5,4 +5,5 @@ EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ main.c \ @@ -31,10 +31,10 @@ index 813ee42b349..d6f79b403da 100644 + sendmail.c \ + xdg-email.c diff --git a/dlls/winemapi/sendmail.c b/dlls/winemapi/sendmail.c -index cfb27e55c95..d5625686e9e 100644 +index ca1b6c59df1..e288837a33d 100644 --- a/dlls/winemapi/sendmail.c +++ b/dlls/winemapi/sendmail.c -@@ -37,6 +37,8 @@ +@@ -34,6 +34,8 @@ #include "winternl.h" #include "wine/debug.h" @@ -43,7 +43,7 @@ index cfb27e55c95..d5625686e9e 100644 WINE_DEFAULT_DEBUG_CHANNEL(winemapi); /* Escapes a string for use in mailto: URL */ -@@ -71,23 +73,12 @@ static char *escape_string(char *in, char *empty_string) +@@ -68,23 +70,12 @@ static char *escape_string(char *in, char *empty_string) } /************************************************************************** @@ -70,7 +70,7 @@ index cfb27e55c95..d5625686e9e 100644 lpMapiMessage message, FLAGS flags, ULONG reserved) { ULONG ret = MAPI_E_FAILURE; -@@ -292,6 +283,35 @@ exit: +@@ -289,6 +280,35 @@ exit: return ret; } @@ -141,10 +141,10 @@ index 00000000000..a8bb8c5e075 +#endif /* __WINEMAPI_PRIVATE_INCLUDED__ */ diff --git a/dlls/winemapi/xdg-email.c b/dlls/winemapi/xdg-email.c new file mode 100644 -index 00000000000..6b420663a26 +index 00000000000..08a9b49cc7f --- /dev/null +++ b/dlls/winemapi/xdg-email.c -@@ -0,0 +1,246 @@ +@@ -0,0 +1,241 @@ +/* + * MAPISendMail implementation for xdg-email + * @@ -165,9 +165,6 @@ index 00000000000..6b420663a26 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + -+#include "config.h" -+#include "wine/port.h" -+ +#include + +#define COBJMACROS @@ -177,11 +174,9 @@ index 00000000000..6b420663a26 +#include "winerror.h" +#include "winnls.h" +#include "mapi.h" ++#include "process.h" +#include "wine/heap.h" +#include "wine/debug.h" -+#ifdef HAVE_UNISTD_H -+#include -+#endif + +#include "winemapi_private.h" + @@ -392,5 +387,5 @@ index 00000000000..6b420663a26 + return ret; +} -- -2.20.1 +2.17.1 diff --git a/patches/wininet-Http_Decoding/0001-wininet-Allow-to-set-INTERNET_OPTION_HTTP_DECODING-o.patch b/patches/wininet-Http_Decoding/0001-wininet-Allow-to-set-INTERNET_OPTION_HTTP_DECODING-o.patch deleted file mode 100644 index 85dd512f..00000000 --- a/patches/wininet-Http_Decoding/0001-wininet-Allow-to-set-INTERNET_OPTION_HTTP_DECODING-o.patch +++ /dev/null @@ -1,179 +0,0 @@ -From d67b893edc3566b0163c8ec33b0f0f85a6e22fff Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Thu, 2 Mar 2017 21:10:41 +0100 -Subject: wininet: Allow to set INTERNET_OPTION_HTTP_DECODING on sessions and - connections. - ---- - dlls/wininet/http.c | 9 +++---- - dlls/wininet/internet.c | 17 ++++++++++--- - dlls/wininet/internet.h | 2 +- - dlls/wininet/tests/http.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 80 insertions(+), 10 deletions(-) - -diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c -index dfff22306de..1f2420f011e 100644 ---- a/dlls/wininet/http.c -+++ b/dlls/wininet/http.c -@@ -2359,11 +2359,6 @@ static DWORD HTTPREQ_SetOption(object_header_t *hdr, DWORD option, void *buffer, - if (!(req->session->appInfo->proxyPassword = heap_strdupW(buffer))) return ERROR_OUTOFMEMORY; - return ERROR_SUCCESS; - -- case INTERNET_OPTION_HTTP_DECODING: -- if(size != sizeof(BOOL)) -- return ERROR_INVALID_PARAMETER; -- req->decoding = *(BOOL*)buffer; -- return ERROR_SUCCESS; - } - - return INET_SetOption(hdr, option, buffer, size); -@@ -2955,7 +2950,7 @@ static DWORD set_content_length(http_request_t *request) - request->contentLength = ~0u; - } - -- if(request->decoding) { -+ if(request->hdr.decoding) { - int encoding_idx; - - static const WCHAR deflateW[] = {'d','e','f','l','a','t','e',0}; -@@ -3379,6 +3374,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, - request->hdr.htype = WH_HHTTPREQ; - request->hdr.dwFlags = dwFlags; - request->hdr.dwContext = dwContext; -+ request->hdr.decoding = session->hdr.decoding; - request->contentLength = ~0u; - - request->netconn_stream.data_stream.vtbl = &netconn_stream_vtbl; -@@ -5873,6 +5869,7 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, - session->hdr.dwFlags = dwFlags; - session->hdr.dwContext = dwContext; - session->hdr.dwInternalFlags |= dwInternalFlags; -+ session->hdr.decoding = hIC->hdr.decoding; - - WININET_AddRef( &hIC->hdr ); - session->appInfo = hIC; -diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c -index cd93dadeea5..b5868726cb2 100644 ---- a/dlls/wininet/internet.c -+++ b/dlls/wininet/internet.c -@@ -2865,10 +2865,21 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, - FIXME("Option INTERNET_OPTION_DISABLE_AUTODIAL; STUB\n"); - break; - case INTERNET_OPTION_HTTP_DECODING: -- FIXME("INTERNET_OPTION_HTTP_DECODING; STUB\n"); -- SetLastError(ERROR_INTERNET_INVALID_OPTION); -- ret = FALSE; -+ { -+ if (!lpwhh) -+ { -+ SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); -+ return FALSE; -+ } -+ if (!lpBuffer || dwBufferLength != sizeof(BOOL)) -+ { -+ SetLastError(ERROR_INVALID_PARAMETER); -+ ret = FALSE; -+ } -+ else -+ lpwhh->decoding = *(BOOL *)lpBuffer; - break; -+ } - case INTERNET_OPTION_COOKIES_3RD_PARTY: - FIXME("INTERNET_OPTION_COOKIES_3RD_PARTY; STUB\n"); - SetLastError(ERROR_INTERNET_INVALID_OPTION); -diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h -index d400df00e4f..d6d15c96afb 100644 ---- a/dlls/wininet/internet.h -+++ b/dlls/wininet/internet.h -@@ -301,6 +301,7 @@ struct _object_header_t - ULONG ErrorMask; - DWORD dwInternalFlags; - LONG refs; -+ BOOL decoding; - INTERNET_STATUS_CALLBACK lpfnStatusCB; - struct list entry; - struct list children; -@@ -397,7 +398,6 @@ typedef struct - DWORD read_size; /* valid data size in read_buf */ - BYTE read_buf[READ_BUFFER_SIZE]; /* buffer for already read but not returned data */ - -- BOOL decoding; - data_stream_t *data_stream; - netconn_stream_t netconn_stream; - } http_request_t; -diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c -index 4f0669063d6..fe11e0aab58 100644 ---- a/dlls/wininet/tests/http.c -+++ b/dlls/wininet/tests/http.c -@@ -3881,6 +3881,68 @@ static void test_cache_read_gzipped(int port) - InternetCloseHandle(con); - InternetCloseHandle(ses); - -+ /* Decompression doesn't work while reading from cache */ -+ test_cache_gzip = 0; -+ sprintf(cache_url, cache_url_fmt, port, get_gzip); -+ DeleteUrlCacheEntryA(cache_url); -+ -+ ses = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); -+ ok(ses != NULL,"InternetOpen failed with error %u\n", GetLastError()); -+ -+ ret = TRUE; -+ ret = InternetSetOptionA(ses, INTERNET_OPTION_HTTP_DECODING, &ret, sizeof(ret)); -+ ok(ret, "InternetSetOption(INTERNET_OPTION_HTTP_DECODING) failed: %d\n", GetLastError()); -+ -+ con = InternetConnectA(ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); -+ ok(con != NULL, "InternetConnect failed with error %u\n", GetLastError()); -+ -+ req = HttpOpenRequestA(con, NULL, get_gzip, NULL, NULL, NULL, 0, 0); -+ ok(req != NULL, "HttpOpenRequest failed\n"); -+ -+ ret = HttpSendRequestA(req, "Accept-Encoding: gzip", -1, NULL, 0); -+ ok(ret, "HttpSendRequest failed with error %u\n", GetLastError()); -+ size = 0; -+ while(InternetReadFile(req, buf+size, sizeof(buf)-1-size, &read) && read) -+ size += read; -+ ok(size == 10, "read %d bytes of data\n", size); -+ buf[size] = 0; -+ ok(!strncmp(buf, content, size), "incorrect page content: %s\n", buf); -+ InternetCloseHandle(req); -+ -+ InternetCloseHandle(con); -+ InternetCloseHandle(ses); -+ -+ /* Decompression doesn't work while reading from cache */ -+ test_cache_gzip = 0; -+ sprintf(cache_url, cache_url_fmt, port, get_gzip); -+ DeleteUrlCacheEntryA(cache_url); -+ -+ ses = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); -+ ok(ses != NULL,"InternetOpen failed with error %u\n", GetLastError()); -+ -+ con = InternetConnectA(ses, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); -+ ok(con != NULL, "InternetConnect failed with error %u\n", GetLastError()); -+ -+ ret = TRUE; -+ ret = InternetSetOptionA(con, INTERNET_OPTION_HTTP_DECODING, &ret, sizeof(ret)); -+ ok(ret, "InternetSetOption(INTERNET_OPTION_HTTP_DECODING) failed: %d\n", GetLastError()); -+ -+ req = HttpOpenRequestA(con, NULL, get_gzip, NULL, NULL, NULL, 0, 0); -+ ok(req != NULL, "HttpOpenRequest failed\n"); -+ -+ ret = HttpSendRequestA(req, "Accept-Encoding: gzip", -1, NULL, 0); -+ ok(ret, "HttpSendRequest failed with error %u\n", GetLastError()); -+ size = 0; -+ while(InternetReadFile(req, buf+size, sizeof(buf)-1-size, &read) && read) -+ size += read; -+ ok(size == 10, "read %d bytes of data\n", size); -+ buf[size] = 0; -+ ok(!strncmp(buf, content, size), "incorrect page content: %s\n", buf); -+ InternetCloseHandle(req); -+ -+ InternetCloseHandle(con); -+ InternetCloseHandle(ses); -+ - DeleteUrlCacheEntryA(cache_url); - } - --- -2.11.0 - diff --git a/patches/wininet-Http_Decoding/definition b/patches/wininet-Http_Decoding/definition deleted file mode 100644 index 157e2094..00000000 --- a/patches/wininet-Http_Decoding/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [42374] Allow to set INTERNET_OPTION_HTTP_DECODING on wininet sessions and connections