From e7110e515375081055b91fa6f8632cfdc5751f80 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 14 Jun 2019 09:20:21 +1000 Subject: [PATCH] Rebase against c13351c05af43aa542938e0c0935b154a8166905 --- ...MonitorInfo-give-a-different-device-.patch | 60 -------- ...-EnumDisplayDevicesW-based-on-EnumDi.patch | 138 ------------------ ...n-a-more-reasonable-display-DeviceID.patch | 61 -------- ...s-up-to-CheckSum-are-mandatory-regar.patch | 25 ++-- ...ive-symlinks-before-returning-sectio.patch | 34 ++--- patches/patchinstall.sh | 11 +- ...-Implement-virtual_map_shared_memory.patch | 4 +- 7 files changed, 31 insertions(+), 302 deletions(-) delete mode 100644 patches/gdi32-MultiMonitor/0002-winex11-Make-GetMonitorInfo-give-a-different-device-.patch delete mode 100644 patches/gdi32-MultiMonitor/0003-user32-Implement-EnumDisplayDevicesW-based-on-EnumDi.patch delete mode 100644 patches/gdi32-MultiMonitor/0005-user32-Return-a-more-reasonable-display-DeviceID.patch diff --git a/patches/gdi32-MultiMonitor/0002-winex11-Make-GetMonitorInfo-give-a-different-device-.patch b/patches/gdi32-MultiMonitor/0002-winex11-Make-GetMonitorInfo-give-a-different-device-.patch deleted file mode 100644 index 838544cb..00000000 --- a/patches/gdi32-MultiMonitor/0002-winex11-Make-GetMonitorInfo-give-a-different-device-.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 67e34d580dc8ca1115c8e8b0d53cf7649c4c3dcf Mon Sep 17 00:00:00 2001 -From: Ken Thomases -Date: Sat, 18 Oct 2014 22:33:04 +0200 -Subject: winex11: Make GetMonitorInfo() give a different device name - (\.\DISPLAY) to each monitor - ---- - dlls/winex11.drv/xinerama.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c -index 7e28726..ace84c5 100644 ---- a/dlls/winex11.drv/xinerama.c -+++ b/dlls/winex11.drv/xinerama.c -@@ -30,6 +30,7 @@ - #include "wine/library.h" - #include "x11drv.h" - #include "wine/debug.h" -+#include "wine/unicode.h" - - WINE_DEFAULT_DEBUG_CHANNEL(x11drv); - -@@ -43,6 +44,7 @@ static MONITORINFOEXW default_monitor = - MONITORINFOF_PRIMARY, /* dwFlags */ - { '\\','\\','.','\\','D','I','S','P','L','A','Y','1',0 } /* szDevice */ - }; -+static const WCHAR monitor_deviceW[] = { '\\','\\','.','\\','D','I','S','P','L','A','Y','%','d',0 }; - - static MONITORINFOEXW *monitors; - static int nb_monitors; -@@ -127,6 +129,8 @@ static int query_screens(void) - if (monitors != &default_monitor) HeapFree( GetProcessHeap(), 0, monitors ); - if ((monitors = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*monitors) ))) - { -+ int device = 2; /* 1 is reserved for primary */ -+ - nb_monitors = count; - for (i = 0; i < nb_monitors; i++) - { -@@ -138,11 +142,15 @@ static int query_screens(void) - monitors[i].dwFlags = 0; - if (!IntersectRect( &monitors[i].rcWork, &rc_work, &monitors[i].rcMonitor )) - monitors[i].rcWork = monitors[i].rcMonitor; -- /* FIXME: using the same device name for all monitors for now */ -- lstrcpyW( monitors[i].szDevice, default_monitor.szDevice ); - } - - get_primary()->dwFlags |= MONITORINFOF_PRIMARY; -+ -+ for (i = 0; i < nb_monitors; i++) -+ { -+ snprintfW( monitors[i].szDevice, sizeof(monitors[i].szDevice) / sizeof(WCHAR), -+ monitor_deviceW, (monitors[i].dwFlags & MONITORINFOF_PRIMARY) ? 1 : device++ ); -+ } - } - else count = 0; - --- -1.9.1 - diff --git a/patches/gdi32-MultiMonitor/0003-user32-Implement-EnumDisplayDevicesW-based-on-EnumDi.patch b/patches/gdi32-MultiMonitor/0003-user32-Implement-EnumDisplayDevicesW-based-on-EnumDi.patch deleted file mode 100644 index 85ab4834..00000000 --- a/patches/gdi32-MultiMonitor/0003-user32-Implement-EnumDisplayDevicesW-based-on-EnumDi.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 5133a02b554cf4e9d10548be321bef52d25b4477 Mon Sep 17 00:00:00 2001 -From: Ken Thomases -Date: Sat, 18 Oct 2014 23:39:48 +0200 -Subject: user32: Implement EnumDisplayDevicesW() based on - EnumDisplayMonitors() and GetMonitorInfoW(). - ---- - dlls/user32/misc.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 84 insertions(+), 12 deletions(-) - -diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c -index 2e6cc35..b1d1bd8 100644 ---- a/dlls/user32/misc.c -+++ b/dlls/user32/misc.c -@@ -226,11 +226,74 @@ DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) - return 1; - } - --static const WCHAR primary_device_name[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0}; --static const WCHAR primary_device_string[] = {'X','1','1',' ','W','i','n','d','o','w','i','n','g',' ', -- 'S','y','s','t','e','m',0}; --static const WCHAR primary_device_deviceid[] = {'P','C','I','\\','V','E','N','_','0','0','0','0','&', -+static const WCHAR adapter_device_string[] = {'W','i','n','e',' ','D','i','s','p','l','a','y',' ', -+ 'A','d','a','p','t','e','r',0}; -+static const WCHAR adapter_device_deviceid[] = {'P','C','I','\\','V','E','N','_','0','0','0','0','&', - 'D','E','V','_','0','0','0','0',0}; -+static const WCHAR display_device_name[] = {'%','s','\\','M','o','n','i','t','o','r','0',0}; -+static const WCHAR display_device_string[] = {'W','i','n','e',' ','D','i','s','p','l','a','y',0}; -+static const WCHAR display_device_deviceid[] = {'M','O','N','I','T','O','R','\\','W','I','N','E','%','0','4','d',0}; -+ -+struct display_devices_enum_info -+{ -+ LPCWSTR adapter; -+ DWORD target; -+ DWORD non_primary_seen; -+ LPDISPLAY_DEVICEW device; -+}; -+ -+/*********************************************************************** -+ * display_devices_enum -+ * -+ * Helper callback for EnumDisplayDevicesW() -+ */ -+static BOOL CALLBACK display_devices_enum( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp ) -+{ -+ struct display_devices_enum_info *info = (struct display_devices_enum_info *)lp; -+ MONITORINFOEXW mon_info; -+ BOOL match; -+ -+ mon_info.cbSize = sizeof(mon_info); -+ GetMonitorInfoW( monitor, (MONITORINFO*)&mon_info ); -+ -+ if (!(mon_info.dwFlags & MONITORINFOF_PRIMARY)) -+ info->non_primary_seen++; -+ -+ if (info->adapter) -+ { -+ match = !strcmpiW( info->adapter, mon_info.szDevice ); -+ if (match) -+ { -+ snprintfW( info->device->DeviceName, sizeof(info->device->DeviceName) / sizeof(WCHAR), -+ display_device_name, mon_info.szDevice ); -+ lstrcpynW( info->device->DeviceString, display_device_string, sizeof(info->device->DeviceString) / sizeof(WCHAR) ); -+ -+ if (info->device->cb >= offsetof(DISPLAY_DEVICEW, DeviceID) + sizeof(info->device->DeviceID)) -+ { -+ snprintfW( info->device->DeviceID, sizeof(info->device->DeviceID) / sizeof(WCHAR), -+ display_device_deviceid, (mon_info.dwFlags & MONITORINFOF_PRIMARY) ? 0 : info->non_primary_seen ); -+ } -+ } -+ } -+ else -+ { -+ if (mon_info.dwFlags & MONITORINFOF_PRIMARY) -+ match = (info->target == 0); -+ else -+ match = (info->target == info->non_primary_seen); -+ -+ if (match) -+ { -+ lstrcpynW( info->device->DeviceName, mon_info.szDevice, sizeof(info->device->DeviceName) / sizeof(WCHAR) ); -+ lstrcpynW( info->device->DeviceString, adapter_device_string, sizeof(info->device->DeviceString) / sizeof(WCHAR) ); -+ -+ if (info->device->cb >= offsetof(DISPLAY_DEVICEW, DeviceID) + sizeof(info->device->DeviceID)) -+ lstrcpynW( info->device->DeviceID, adapter_device_deviceid, sizeof(info->device->DeviceID) / sizeof(WCHAR) ); -+ } -+ } -+ -+ return !match; -+} - - /*********************************************************************** - * EnumDisplayDevicesA (USER32.@) -@@ -271,24 +334,33 @@ BOOL WINAPI EnumDisplayDevicesA( LPCSTR lpDevice, DWORD i, LPDISPLAY_DEVICEA lpD - BOOL WINAPI EnumDisplayDevicesW( LPCWSTR lpDevice, DWORD i, LPDISPLAY_DEVICEW lpDisplayDevice, - DWORD dwFlags ) - { -- FIXME("(%s,%d,%p,0x%08x), stub!\n",debugstr_w(lpDevice),i,lpDisplayDevice,dwFlags); -+ struct display_devices_enum_info info; - -- if (i) -+ TRACE("(%s,%d,%p,0x%08x)\n",debugstr_w(lpDevice),i,lpDisplayDevice,dwFlags); -+ -+ if (lpDevice && i) - return FALSE; - -- memcpy(lpDisplayDevice->DeviceName, primary_device_name, sizeof(primary_device_name)); -- memcpy(lpDisplayDevice->DeviceString, primary_device_string, sizeof(primary_device_string)); -- - lpDisplayDevice->StateFlags = - DISPLAY_DEVICE_ATTACHED_TO_DESKTOP | -- DISPLAY_DEVICE_PRIMARY_DEVICE | - DISPLAY_DEVICE_VGA_COMPATIBLE; - -- if(lpDisplayDevice->cb >= offsetof(DISPLAY_DEVICEW, DeviceID) + sizeof(lpDisplayDevice->DeviceID)) -- memcpy(lpDisplayDevice->DeviceID, primary_device_deviceid, sizeof(primary_device_deviceid)); -+ if (!lpDevice && i == 0) -+ lpDisplayDevice->StateFlags |= DISPLAY_DEVICE_PRIMARY_DEVICE; -+ -+ info.adapter = lpDevice; -+ info.target = i; -+ info.non_primary_seen = 0; -+ info.device = lpDisplayDevice; -+ if (EnumDisplayMonitors( 0, NULL, display_devices_enum, (LPARAM)&info )) -+ return FALSE; -+ - if(lpDisplayDevice->cb >= offsetof(DISPLAY_DEVICEW, DeviceKey) + sizeof(lpDisplayDevice->DeviceKey)) - lpDisplayDevice->DeviceKey[0] = 0; - -+ TRACE("DeviceName %s DeviceString %s DeviceID %s DeviceKey %s\n", debugstr_w(lpDisplayDevice->DeviceName), -+ debugstr_w(lpDisplayDevice->DeviceString), debugstr_w(lpDisplayDevice->DeviceID), debugstr_w(lpDisplayDevice->DeviceKey)); -+ - return TRUE; - } - --- -1.9.1 - diff --git a/patches/gdi32-MultiMonitor/0005-user32-Return-a-more-reasonable-display-DeviceID.patch b/patches/gdi32-MultiMonitor/0005-user32-Return-a-more-reasonable-display-DeviceID.patch deleted file mode 100644 index 39cebe3e..00000000 --- a/patches/gdi32-MultiMonitor/0005-user32-Return-a-more-reasonable-display-DeviceID.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 547a92d26b034a226b65a64aec229412129bdd61 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Sat, 27 May 2017 04:15:55 +0200 -Subject: [PATCH] user32: Return a more reasonable display DeviceID. - ---- - dlls/user32/misc.c | 7 ++++++- - dlls/user32/tests/monitor.c | 12 ++++++++++++ - 2 files changed, 18 insertions(+), 1 deletion(-) - -diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c -index a6b7644020f..c1c812dbd51 100644 ---- a/dlls/user32/misc.c -+++ b/dlls/user32/misc.c -@@ -249,7 +249,12 @@ static const WCHAR adapter_device_deviceid[] = {'P','C','I','\\','V','E','N','_' - 'D','E','V','_','0','0','0','0',0}; - static const WCHAR display_device_name[] = {'%','s','\\','M','o','n','i','t','o','r','0',0}; - static const WCHAR display_device_string[] = {'W','i','n','e',' ','D','i','s','p','l','a','y',0}; --static const WCHAR display_device_deviceid[] = {'M','O','N','I','T','O','R','\\','W','I','N','E','%','0','4','d',0}; -+static const WCHAR display_device_deviceid[] = {'M','O','N','I','T','O','R','\\', -+ 'D','e','f','a','u','l','t','_','M','o','n','i','t','o','r','\\', -+ '{','4','D','3','6','E','9','6','E','-','E','3','2','5','-', -+ '1','1','C','E','-','B','F','C','1','-', -+ '0','8','0','0','2','B','E','1','0','3','1','8','}','\\', -+ '%','0','4','d',0}; - - struct display_devices_enum_info - { -diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c -index 8bf284a5e1c..6a886da1b63 100644 ---- a/dlls/user32/tests/monitor.c -+++ b/dlls/user32/tests/monitor.c -@@ -225,6 +225,7 @@ static void test_enumdisplaydevices(void) - int adapter_index; - int monitor_index; - BOOL ret; -+ int num; - - if (!pEnumDisplayDevicesA) - { -@@ -276,6 +277,17 @@ static void test_enumdisplaydevices(void) - ok(!strcmp(primary_monitor_device_name, primary_device_name), - "monitor device name %s, device name %s\n", primary_monitor_device_name, - primary_device_name); -+ -+ dd.cb = sizeof(dd); -+ for (num = 0;; num++) -+ { -+ ret = pEnumDisplayDevicesA(primary_device_name, num, &dd, 0); -+ if (!ret) break; -+ -+ dd.DeviceID[63] = 0; -+ ok(!strcasecmp(dd.DeviceID, "Monitor\\Default_Monitor\\{4D36E96E-E325-11CE-BFC1-08002BE10318}\\"), -+ "DeviceID \"%s\" does not start with \"Monitor\\Default_Monitor\\...\" prefix\n", dd.DeviceID); -+ } - } - - struct vid_mode --- -2.20.1 - diff --git a/patches/kernel32-PE_Loader_Fixes/0001-server-All-fields-up-to-CheckSum-are-mandatory-regar.patch b/patches/kernel32-PE_Loader_Fixes/0001-server-All-fields-up-to-CheckSum-are-mandatory-regar.patch index 84c2aa99..945ff350 100644 --- a/patches/kernel32-PE_Loader_Fixes/0001-server-All-fields-up-to-CheckSum-are-mandatory-regar.patch +++ b/patches/kernel32-PE_Loader_Fixes/0001-server-All-fields-up-to-CheckSum-are-mandatory-regar.patch @@ -1,32 +1,27 @@ -From cf75e3e8e4019a302ef808c31090b52fb546feb0 Mon Sep 17 00:00:00 2001 +From 144568af9042e8a4924d7f8c25d74c64665905a1 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 2 Jan 2017 15:34:21 +0800 Subject: [PATCH] server: All fields up to CheckSum are mandatory regardless of SizeOfOptionalHeader value. --- - server/mapping.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) + server/mapping.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) diff --git a/server/mapping.c b/server/mapping.c -index 37c17b0..9f7cd7b 100644 +index 2fba0231e3d..7680f88c59b 100644 --- a/server/mapping.c +++ b/server/mapping.c -@@ -588,11 +588,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s +@@ -669,6 +669,8 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s mz_size = size; pos = mz.dos.e_lfanew; + /* zero out header in the case it's not present or partial */ + memset( &nt, 0, sizeof(nt) ); size = pread( unix_fd, &nt, sizeof(nt), pos ); - if (size < sizeof(nt.Signature) + sizeof(nt.FileHeader)) return STATUS_INVALID_IMAGE_FORMAT; -- /* zero out Optional header in the case it's not present or partial */ -- size = min( size, sizeof(nt.Signature) + sizeof(nt.FileHeader) + nt.FileHeader.SizeOfOptionalHeader ); -- if (size < sizeof(nt)) memset( (char *)&nt + size, 0, sizeof(nt) - size ); - if (nt.Signature != IMAGE_NT_SIGNATURE) - { - IMAGE_OS2_HEADER *os2 = (IMAGE_OS2_HEADER *)&nt; -@@ -605,6 +604,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s + if (size < sizeof(nt.Signature) + sizeof(nt.FileHeader)) return STATUS_INVALID_IMAGE_PROTECT; + /* zero out Optional header in the case it's not present or partial */ +@@ -686,6 +688,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s switch (nt.opt.hdr32.Magic) { case IMAGE_NT_OPTIONAL_HDR32_MAGIC: @@ -37,7 +32,7 @@ index 37c17b0..9f7cd7b 100644 switch (nt.FileHeader.Machine) { case IMAGE_FILE_MACHINE_I386: -@@ -650,6 +653,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s +@@ -731,6 +737,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s break; case IMAGE_NT_OPTIONAL_HDR64_MAGIC: @@ -49,5 +44,5 @@ index 37c17b0..9f7cd7b 100644 switch (nt.FileHeader.Machine) { -- -1.9.1 +2.17.1 diff --git a/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch b/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch index 3bc863cb..2a91ae35 100644 --- a/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch +++ b/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch @@ -1,4 +1,4 @@ -From e4d3e4ff13314d3b0161ade6f1cae2b7aa5c2f61 Mon Sep 17 00:00:00 2001 +From 7eab2b3aaa657c6db87de440786dedecae1abe21 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 28 May 2017 11:17:26 +0200 Subject: [PATCH] ntdll: Resolve drive symlinks before returning section name. @@ -6,12 +6,12 @@ Subject: [PATCH] ntdll: Resolve drive symlinks before returning section name. --- dlls/ntdll/directory.c | 2 +- dlls/ntdll/ntdll_misc.h | 1 + - dlls/ntdll/virtual.c | 38 ++++++++++++++++++++++++++++++++------ + dlls/ntdll/virtual.c | 38 +++++++++++++++++++++++++++++------ dlls/psapi/tests/psapi_main.c | 6 +----- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index 664fa7b..902517a 100644 +index 4810a9b7962..c6d496abdf2 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -2928,7 +2928,7 @@ static NTSTATUS nt_to_unix_file_name_internal( const UNICODE_STRING *nameW, ANSI @@ -24,19 +24,19 @@ index 664fa7b..902517a 100644 OBJECT_ATTRIBUTES attr; UNICODE_STRING targetW; diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 165f083..d5d91dd 100644 +index 5edd53c4610..6e1f14c432d 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -165,6 +165,7 @@ extern NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_S - UINT disposition ) DECLSPEC_HIDDEN; - +@@ -176,6 +176,7 @@ extern NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_S /* virtual memory */ + extern NTSTATUS virtual_alloc_aligned( PVOID *ret, ULONG zero_bits, SIZE_T *size_ptr, + ULONG type, ULONG protect, ULONG alignment ) DECLSPEC_HIDDEN; +extern NTSTATUS read_nt_symlink( HANDLE root, UNICODE_STRING *name, WCHAR *target, size_t length ) DECLSPEC_HIDDEN; extern NTSTATUS virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG zero_bits, SIZE_T commit_size, const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr, ULONG protect, pe_image_info_t *image_info ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index 1cb6428..a7bff45 100644 +index ff0df9de70f..0641e1310e1 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -56,6 +56,7 @@ @@ -56,7 +56,7 @@ index 1cb6428..a7bff45 100644 static struct file_view *view_block_start, *view_block_end, *next_free_view; static const size_t view_block_size = 0x100000; static void *preload_reserve_start; -@@ -2907,12 +2910,15 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, +@@ -2999,12 +3002,15 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, MEMORY_SECTION_NAME *info, SIZE_T len, SIZE_T *res_len ) { @@ -73,7 +73,7 @@ index 1cb6428..a7bff45 100644 if (!addr || !info || !res_len) return STATUS_INVALID_PARAMETER; -@@ -2971,14 +2977,34 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, +@@ -3063,14 +3069,34 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, } found: @@ -114,10 +114,10 @@ index 1cb6428..a7bff45 100644 else status = (len < sizeof(MEMORY_SECTION_NAME)) ? STATUS_INFO_LENGTH_MISMATCH : STATUS_BUFFER_OVERFLOW; diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c -index e92b55b..6eb7e23 100644 +index 9143fa79e7d..80636eb74a8 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c -@@ -477,7 +477,6 @@ static void test_GetMappedFileName(void) +@@ -489,7 +489,6 @@ static void test_GetMappedFileName(void) ret = GetMappedFileNameA(GetCurrentProcess(), base, map_name, sizeof(map_name)); ok(ret, "GetMappedFileName error %d\n", GetLastError()); ok(ret > strlen(device_name), "map_name should be longer than device_name\n"); @@ -125,7 +125,7 @@ index e92b55b..6eb7e23 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); SetLastError(0xdeadbeef); -@@ -490,7 +489,6 @@ todo_wine { +@@ -502,7 +501,6 @@ todo_wine { { ok(memcmp(map_nameW, nt_map_name, lstrlenW(map_nameW)) == 0, "map name does not start with a device name: %s\n", map_name); WideCharToMultiByte(CP_ACP, 0, map_nameW, -1, map_name, MAX_PATH, NULL, NULL); @@ -133,7 +133,7 @@ index e92b55b..6eb7e23 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); } -@@ -503,7 +501,6 @@ todo_wine +@@ -515,7 +513,6 @@ todo_wine { ok(memcmp(map_nameW, nt_map_name, lstrlenW(map_nameW)) == 0, "map name does not start with a device name: %s\n", map_name); WideCharToMultiByte(CP_ACP, 0, map_nameW, -1, map_name, MAX_PATH, NULL, NULL); @@ -141,7 +141,7 @@ index e92b55b..6eb7e23 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); } -@@ -511,7 +508,6 @@ todo_wine +@@ -523,7 +520,6 @@ todo_wine ret = GetMappedFileNameA(GetCurrentProcess(), base + 0x2000, map_name, sizeof(map_name)); ok(ret, "GetMappedFileName error %d\n", GetLastError()); ok(ret > strlen(device_name), "map_name should be longer than device_name\n"); @@ -149,7 +149,7 @@ index e92b55b..6eb7e23 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); SetLastError(0xdeadbeef); -@@ -593,7 +589,7 @@ static void test_GetProcessImageFileName(void) +@@ -605,7 +601,7 @@ static void test_GetProcessImageFileName(void) { /* Windows returns 2*strlen-1 */ ok(ret >= strlen(szImgPath), "szImgPath=\"%s\" ret=%d\n", szImgPath, ret); @@ -159,5 +159,5 @@ index e92b55b..6eb7e23 100644 SetLastError(0xdeadbeef); -- -2.7.4 +2.17.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index d2e5dd63..cd15463e 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "83ca9a95de80083d906a2aeb5d1e5ca2ed611199" + echo "c13351c05af43aa542938e0c0935b154a8166905" } # Show version information @@ -3891,21 +3891,14 @@ fi # | * [#41258] Return a more reasonable display DeviceID # | # | Modified files: -# | * dlls/gdi32/driver.c, dlls/user32/misc.c, dlls/user32/tests/monitor.c, dlls/winemac.drv/display.c, -# | dlls/winex11.drv/xinerama.c +# | * dlls/gdi32/driver.c, dlls/winemac.drv/display.c # | if test "$enable_gdi32_MultiMonitor" -eq 1; then patch_apply gdi32-MultiMonitor/0001-gdi32-Also-accept-.-DISPLAY-n-devices-names-with-n-o.patch - patch_apply gdi32-MultiMonitor/0002-winex11-Make-GetMonitorInfo-give-a-different-device-.patch - patch_apply gdi32-MultiMonitor/0003-user32-Implement-EnumDisplayDevicesW-based-on-EnumDi.patch patch_apply gdi32-MultiMonitor/0004-winemac-Make-GetMonitorInfo-give-a-different-device-.patch - patch_apply gdi32-MultiMonitor/0005-user32-Return-a-more-reasonable-display-DeviceID.patch ( printf '%s\n' '+ { "Ken Thomases", "gdi32: Also accept \"\\\\.\\DISPLAY\" devices names with other than 1 as display devices.", 1 },'; - printf '%s\n' '+ { "Ken Thomases", "winex11: Make GetMonitorInfo() give a different device name (\\.\\DISPLAY) to each monitor.", 1 },'; - printf '%s\n' '+ { "Ken Thomases", "user32: Implement EnumDisplayDevicesW() based on EnumDisplayMonitors() and GetMonitorInfoW().", 1 },'; printf '%s\n' '+ { "Ken Thomases", "winemac: Make GetMonitorInfo() give a different device name (\\\\.\\DISPLAY) to each monitor.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "user32: Return a more reasonable display DeviceID.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/server-Shared_Memory/0001-ntdll-Implement-virtual_map_shared_memory.patch b/patches/server-Shared_Memory/0001-ntdll-Implement-virtual_map_shared_memory.patch index 6bc4313a..d8015b0b 100644 --- a/patches/server-Shared_Memory/0001-ntdll-Implement-virtual_map_shared_memory.patch +++ b/patches/server-Shared_Memory/0001-ntdll-Implement-virtual_map_shared_memory.patch @@ -1,4 +1,4 @@ -From d1632e12696bc193aa988df005f63014d319c3af Mon Sep 17 00:00:00 2001 +From 1d176743641fcb4cf641858a53b7fd964514220b Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 18 Mar 2015 23:03:01 +0100 Subject: ntdll: Implement virtual_map_shared_memory. @@ -50,7 +50,7 @@ index 9f1b6da0c5e..4f816b2b1ca 100644 + + get_vprot_flags( protect, &vprot, FALSE ); + vprot |= VPROT_COMMITTED; -+ res = map_view( &view, *addr_ptr, size, mask, FALSE, vprot ); ++ res = map_view( &view, *addr_ptr, size, mask, FALSE, vprot, 0 ); + if (!res) + { + /* Map the shared memory */