diff --git a/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch b/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch index 9969909a..989b23f3 100644 --- a/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch +++ b/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch @@ -1,4 +1,4 @@ -From c204c9ed2a8504868c3cbf487e7a29c4e7254d3f Mon Sep 17 00:00:00 2001 +From 271f43a1fafb19e1404b05ec597b504ecad74784 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 6 Jul 2020 12:09:22 -0500 Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores. @@ -16,10 +16,10 @@ Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores. create mode 100644 dlls/ntdll/unix/esync.h diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in -index 185bc563e68..d7c757cab32 100644 +index 07688a5fcf6..4e490c475a2 100644 --- a/dlls/ntdll/Makefile.in +++ b/dlls/ntdll/Makefile.in -@@ -46,6 +46,7 @@ C_SRCS = \ +@@ -47,6 +47,7 @@ C_SRCS = \ unix/cdrom.c \ unix/debug.c \ unix/env.c \ @@ -346,7 +346,7 @@ index 00000000000..a50a755149a + +extern int receive_fd( obj_handle_t *handle ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index 10884a7a673..28cc48e04bf 100644 +index 35f2e5f986f..4d95c29ab24 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -89,6 +89,7 @@ @@ -357,8 +357,8 @@ index 10884a7a673..28cc48e04bf 100644 #include "wine/list.h" #include "wine/debug.h" -@@ -2082,6 +2083,7 @@ static void start_main_thread(void) - signal_init_thread( teb ); +@@ -2188,6 +2189,7 @@ static void start_main_thread(void) + signal_alloc_thread( teb ); dbg_init(); startup_info_size = server_init_process(); + esync_init(); @@ -366,7 +366,7 @@ index 10884a7a673..28cc48e04bf 100644 init_cpu_info(); init_files(); diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c -index 6a3224d8385..de65f936a59 100644 +index b7d8733f2bc..8cd5f0474e6 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -106,7 +106,7 @@ sigset_t server_block_set; /* signals to block during server calls */ @@ -378,7 +378,7 @@ index 6a3224d8385..de65f936a59 100644 /* atomically exchange a 64-bit value */ static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val ) -@@ -803,7 +803,7 @@ void wine_server_send_fd( int fd ) +@@ -834,7 +834,7 @@ void wine_server_send_fd( int fd ) * * Receive a file descriptor passed from the server. */ @@ -388,7 +388,7 @@ index 6a3224d8385..de65f936a59 100644 struct iovec vec; struct msghdr msghdr; diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c -index 442243d8bcf..72cbf92f93c 100644 +index 9112572c67d..c5f30428f79 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -64,6 +64,7 @@ @@ -399,7 +399,7 @@ index 442243d8bcf..72cbf92f93c 100644 WINE_DEFAULT_DEBUG_CHANNEL(sync); -@@ -262,6 +263,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ +@@ -273,6 +274,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ if (max <= 0 || initial < 0 || initial > max) return STATUS_INVALID_PARAMETER; if ((ret = alloc_object_attributes( attr, &objattr, &len ))) return ret; @@ -422,5 +422,5 @@ index b9dbfa322bc..99e57eca44c 100644 int do_esync(void) { -- -2.34.1 +2.38.1 diff --git a/patches/ntdll-ForceBottomUpAlloc/definition b/patches/ntdll-ForceBottomUpAlloc/definition index 646add00..db90605f 100644 --- a/patches/ntdll-ForceBottomUpAlloc/definition +++ b/patches/ntdll-ForceBottomUpAlloc/definition @@ -1,2 +1,3 @@ Fixes: [48175] AION (64 bit) - crashes in crysystem.dll.CryFree() due to high memory pointers allocated Fixes: [46568] 64-bit msxml6.dll from Microsoft Core XML Services 6.0 redist package fails to load (Wine doesn't respect 44-bit user-mode VA limitation from Windows < 8.1) +Disabled: True diff --git a/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch b/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch index b346b630..09287e3b 100644 --- a/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch +++ b/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch @@ -1,4 +1,4 @@ -From 2900e5cd5220e8a41e7c5a5971f7a32e72f508f5 Mon Sep 17 00:00:00 2001 +From 0e69c40a24de97bb97f3a0e94f39cff07326ebe7 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 30 May 2015 02:23:15 +0200 Subject: [PATCH] ntdll: Add support for hiding wine version information from @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Add support for hiding wine version information from 2 files changed, 103 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 23d44aae64c..77dd56c88f1 100644 +index 2e118a55490..c16c3fd01a1 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -89,6 +89,9 @@ HMODULE kernel32_handle = 0; +@@ -87,6 +87,9 @@ const WCHAR system_dir[] = L"C:\\windows\\system32\\"; /* system search path */ static const WCHAR system_path[] = L"C:\\windows\\system32;C:\\windows\\system;C:\\windows"; @@ -23,7 +23,7 @@ index 23d44aae64c..77dd56c88f1 100644 static BOOL is_prefix_bootstrap; /* are we bootstrapping the prefix? */ static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */ static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */ -@@ -107,6 +110,8 @@ struct dll_dir_entry +@@ -106,6 +109,8 @@ struct dll_dir_entry static struct list dll_dir_list = LIST_INIT( dll_dir_list ); /* extra dirs from LdrAddDllDirectory */ @@ -32,7 +32,7 @@ index 23d44aae64c..77dd56c88f1 100644 struct ldr_notification { struct list entry; -@@ -1862,6 +1867,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic ) +@@ -1980,6 +1985,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic ) } @@ -129,7 +129,7 @@ index 23d44aae64c..77dd56c88f1 100644 /****************************************************************** * LdrGetProcedureAddress (NTDLL.@) */ -@@ -1881,7 +1976,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name, +@@ -1999,7 +2094,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name, { void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, NULL ) : find_ordinal_export( module, exports, exp_size, ord - exports->Base, NULL ); @@ -138,20 +138,20 @@ index 23d44aae64c..77dd56c88f1 100644 { *address = proc; ret = STATUS_SUCCESS; -@@ -2121,6 +2216,8 @@ static void build_ntdll_module(void) - wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS; - node_ntdll = wm->ldr.DdagNode; +@@ -2242,6 +2337,8 @@ static void build_ntdll_module(void) if (TRACE_ON(relay)) RELAY_SetupDLL( meminfo.AllocationBase ); + NtQueryVirtualMemory( GetCurrentProcess(), meminfo.AllocationBase, MemoryWineUnixFuncs, + &ntdll_unix_handle, sizeof(ntdll_unix_handle), NULL ); + + hidden_exports_init( wm->ldr.FullDllName.Buffer ); } diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 27de37d5b88..a8c5e335870 100644 +index 99b563ca07c..5a201f5221c 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -149,6 +149,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiB +@@ -152,6 +152,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiB NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*); @@ -164,5 +164,5 @@ index 27de37d5b88..a8c5e335870 100644 static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len ) { -- -2.33.0 +2.38.1 diff --git a/patches/ntdll-Syscall_Emulation/definition b/patches/ntdll-Syscall_Emulation/definition index 89b59eb0..da459e75 100644 --- a/patches/ntdll-Syscall_Emulation/definition +++ b/patches/ntdll-Syscall_Emulation/definition @@ -1 +1,3 @@ Fixes: [48291] Detroit: Become Human crashes on launch +# Causing steam to networking service to crash. +Disabled: True diff --git a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch index 0725fb7e..d8fdfba7 100644 --- a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch +++ b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch @@ -1,4 +1,4 @@ -From 3442d399135d784923bda352f26692cc63cc746c Mon Sep 17 00:00:00 2001 +From d87b3ff060a52b851aec1f66ff4b04fceebfc8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 4 Oct 2014 02:53:22 +0200 Subject: [PATCH] ntdll: Setup a temporary signal handler during process @@ -15,10 +15,10 @@ Subject: [PATCH] ntdll: Setup a temporary signal handler during process 7 files changed, 74 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index 6c8f3a4996d..5d35b68476b 100644 +index 4d95c29ab24..4406c1eb634 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c -@@ -2212,6 +2212,8 @@ void __wine_main( int argc, char *argv[], char *envp[] ) +@@ -2532,6 +2532,8 @@ void __wine_main( int argc, char *argv[], char *envp[] ) #endif virtual_init(); @@ -28,10 +28,10 @@ index 6c8f3a4996d..5d35b68476b 100644 #ifdef __APPLE__ diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c -index c24fa3a9b78..516c30a95d2 100644 +index fe51629838c..a39f158530a 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c -@@ -892,6 +892,12 @@ void signal_init_process(void) +@@ -1584,6 +1584,12 @@ void signal_init_process(void) exit(1); } @@ -45,10 +45,10 @@ index c24fa3a9b78..516c30a95d2 100644 /*********************************************************************** * call_init_thunk diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c -index 5b8fff6a406..a005eb3ceaa 100644 +index 794aa7b2925..bf8e69f1661 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c -@@ -1077,6 +1077,12 @@ void signal_init_process(void) +@@ -1381,6 +1381,12 @@ void signal_init_process(void) exit(1); } @@ -62,10 +62,10 @@ index 5b8fff6a406..a005eb3ceaa 100644 /*********************************************************************** * call_init_thunk diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c -index eb69af9ce0e..39a36118e22 100644 +index cc8605c2a4f..bfd0c3eb7ef 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c -@@ -1780,6 +1780,30 @@ static BOOL handle_syscall_trap( ucontext_t *sigcontext ) +@@ -1839,6 +1839,30 @@ static BOOL handle_syscall_trap( ucontext_t *sigcontext ) } @@ -96,7 +96,7 @@ index eb69af9ce0e..39a36118e22 100644 /********************************************************************** * segv_handler * -@@ -2367,6 +2391,34 @@ void signal_init_process(void) +@@ -2410,6 +2434,34 @@ void signal_init_process(void) exit(1); } @@ -132,10 +132,10 @@ index eb69af9ce0e..39a36118e22 100644 /*********************************************************************** * call_init_thunk diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c -index ac8eddf739e..116bbaafd79 100644 +index cc070dda5ae..3b0f671afe2 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c -@@ -2624,6 +2624,12 @@ void signal_init_process(void) +@@ -2462,6 +2462,12 @@ void signal_init_process(void) exit(1); } @@ -149,22 +149,22 @@ index ac8eddf739e..116bbaafd79 100644 /*********************************************************************** * call_init_thunk diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h -index 339a93bf2db..38314688cba 100644 +index fa7b97117ff..12a484d079a 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h -@@ -237,6 +237,7 @@ extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN; +@@ -241,6 +241,7 @@ extern void signal_init_threading(void) DECLSPEC_HIDDEN; + extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN; extern void signal_free_thread( TEB *teb ) DECLSPEC_HIDDEN; - extern void signal_init_thread( TEB *teb ) DECLSPEC_HIDDEN; extern void signal_init_process(void) DECLSPEC_HIDDEN; +extern void signal_init_early(void) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN signal_start_thread( PRTL_THREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB *teb ) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN signal_exit_thread( int status, void (*func)(int), TEB *teb ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c -index 49dd3aa51e2..35a9b43d577 100644 +index 45089ae5845..0a9c4f2feb0 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c -@@ -3275,7 +3275,7 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack ) +@@ -3279,7 +3279,7 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack ) mutex_lock( &virtual_mutex ); /* no need for signal masking inside signal handler */ vprot = get_page_vprot( page ); @@ -174,5 +174,5 @@ index 49dd3aa51e2..35a9b43d577 100644 struct thread_stack_info stack_info; if (!is_inside_thread_stack( page, &stack_info )) -- -2.30.2 +2.38.1 diff --git a/patches/ntdll-WRITECOPY/0005-ntdll-Track-if-a-WRITECOPY-page-has-been-modified.patch b/patches/ntdll-WRITECOPY/0005-ntdll-Track-if-a-WRITECOPY-page-has-been-modified.patch index d6a19adf..573ee0f6 100644 --- a/patches/ntdll-WRITECOPY/0005-ntdll-Track-if-a-WRITECOPY-page-has-been-modified.patch +++ b/patches/ntdll-WRITECOPY/0005-ntdll-Track-if-a-WRITECOPY-page-has-been-modified.patch @@ -1,4 +1,4 @@ -From c16f89f347e49c107a46dda6d3b9bb811ccceb47 Mon Sep 17 00:00:00 2001 +From b6a6f7448cb4f202edec1a2644315e745b709afe Mon Sep 17 00:00:00 2001 From: Andrew Wesie Date: Fri, 24 Apr 2020 14:55:14 -0500 Subject: [PATCH] ntdll: Track if a WRITECOPY page has been modified. @@ -12,18 +12,18 @@ Signed-off-by: Andrew Wesie 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c -index d727ff341df..d39f73c8d85 100644 +index 578ef4139b8..ff15840adb6 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c -@@ -125,6 +125,7 @@ struct file_view +@@ -119,6 +119,7 @@ struct file_view #define VPROT_GUARD 0x10 #define VPROT_COMMITTED 0x20 #define VPROT_WRITEWATCH 0x40 +#define VPROT_WRITTEN 0x80 /* per-mapping protection flags */ #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */ - #define VPROT_NATIVE 0x0400 -@@ -1120,7 +1121,7 @@ static int get_unix_prot( BYTE vprot ) + +@@ -1072,7 +1073,7 @@ static int get_unix_prot( BYTE vprot ) #if defined(__i386__) if (vprot & VPROT_WRITECOPY) { @@ -32,7 +32,7 @@ index d727ff341df..d39f73c8d85 100644 prot = (prot & ~PROT_WRITE) | PROT_READ; else prot |= PROT_WRITE | PROT_READ; -@@ -1557,7 +1558,11 @@ static NTSTATUS create_view( struct file_view **view_ret, void *base, size_t siz +@@ -1635,7 +1636,11 @@ static NTSTATUS create_view( struct file_view **view_ret, void *base, size_t siz */ static DWORD get_win32_prot( BYTE vprot, unsigned int map_prot ) { @@ -45,7 +45,7 @@ index d727ff341df..d39f73c8d85 100644 if (vprot & VPROT_GUARD) ret |= PAGE_GUARD; if (map_prot & SEC_NOCACHE) ret |= PAGE_NOCACHE; return ret; -@@ -1668,12 +1673,21 @@ static BOOL set_vprot( struct file_view *view, void *base, size_t size, BYTE vpr +@@ -1746,12 +1751,21 @@ static BOOL set_vprot( struct file_view *view, void *base, size_t size, BYTE vpr if (view->protect & VPROT_WRITEWATCH) { /* each page may need different protections depending on write watch flag */ @@ -69,7 +69,7 @@ index d727ff341df..d39f73c8d85 100644 return TRUE; } -@@ -3433,7 +3447,7 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack ) +@@ -3325,7 +3339,7 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack ) } if (vprot & VPROT_WRITECOPY) { @@ -79,5 +79,5 @@ index d727ff341df..d39f73c8d85 100644 } /* ignore fault if page is writable now */ -- -2.33.0 +2.38.1 diff --git a/patches/ntdll-WRITECOPY/definition b/patches/ntdll-WRITECOPY/definition index 9f26ca0c..1bb1113b 100644 --- a/patches/ntdll-WRITECOPY/definition +++ b/patches/ntdll-WRITECOPY/definition @@ -1,5 +1,5 @@ Fixes: [29384] Multiple applications expect correct handling of WRITECOPY memory protection (Voobly fails to launch Age of Empires II, MSYS2) -Depends: ntdll-ForceBottomUpAlloc +#Depends: ntdll-ForceBottomUpAlloc # Causes regressions? # https://bugs.wine-staging.com/show_bug.cgi?id=207 # https://bugs.wine-staging.com/show_bug.cgi?id=521 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 1e01129c..634f9786 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "13cc08e32d6c04f8f915d07cda39638ee99c3d43" + echo "384b0b35c357ca31ccb080162e1f39f93ec70054" } # Show version information @@ -133,7 +133,6 @@ patch_enable_all () enable_ntdll_Builtin_Prot="$1" enable_ntdll_CriticalSection="$1" enable_ntdll_Exception="$1" - enable_ntdll_ForceBottomUpAlloc="$1" enable_ntdll_HashLinks="$1" enable_ntdll_Hide_Wine_Exports="$1" enable_ntdll_Junction_Points="$1" @@ -143,7 +142,6 @@ patch_enable_all () enable_ntdll_ProcessQuotaLimits="$1" enable_ntdll_RtlQueryPackageIdentity="$1" enable_ntdll_Serial_Port_Detection="$1" - enable_ntdll_Syscall_Emulation="$1" enable_ntdll_WRITECOPY="$1" enable_ntdll_ext4_case_folder="$1" enable_ntdll_wine_frames="$1" @@ -193,7 +191,6 @@ patch_enable_all () enable_user32_LR_LOADFROMFILE="$1" enable_user32_ListBox_Size="$1" enable_user32_LoadKeyboardLayoutEx="$1" - enable_user32_MessageBox_WS_EX_TOPMOST="$1" enable_user32_Mouse_Message_Hwnd="$1" enable_user32_QueryDisplayConfig="$1" enable_user32_Refresh_MDI_Menus="$1" @@ -414,9 +411,6 @@ patch_enable () ntdll-Exception) enable_ntdll_Exception="$2" ;; - ntdll-ForceBottomUpAlloc) - enable_ntdll_ForceBottomUpAlloc="$2" - ;; ntdll-HashLinks) enable_ntdll_HashLinks="$2" ;; @@ -444,9 +438,6 @@ patch_enable () ntdll-Serial_Port_Detection) enable_ntdll_Serial_Port_Detection="$2" ;; - ntdll-Syscall_Emulation) - enable_ntdll_Syscall_Emulation="$2" - ;; ntdll-WRITECOPY) enable_ntdll_WRITECOPY="$2" ;; @@ -594,9 +585,6 @@ patch_enable () user32-LoadKeyboardLayoutEx) enable_user32_LoadKeyboardLayoutEx="$2" ;; - user32-MessageBox_WS_EX_TOPMOST) - enable_user32_MessageBox_WS_EX_TOPMOST="$2" - ;; user32-Mouse_Message_Hwnd) enable_user32_Mouse_Message_Hwnd="$2" ;; @@ -1236,13 +1224,6 @@ if test "$enable_ntdll_Builtin_Prot" -eq 1; then enable_ntdll_WRITECOPY=1 fi -if test "$enable_ntdll_WRITECOPY" -eq 1; then - if test "$enable_ntdll_ForceBottomUpAlloc" -gt 1; then - abort "Patchset ntdll-ForceBottomUpAlloc disabled, but ntdll-WRITECOPY depends on that." - fi - enable_ntdll_ForceBottomUpAlloc=1 -fi - if test "$enable_fltmgr_sys_FltBuildDefaultSecurityDescriptor" -eq 1; then if test "$enable_winedevice_Default_Drivers" -gt 1; then abort "Patchset winedevice-Default_Drivers disabled, but fltmgr.sys-FltBuildDefaultSecurityDescriptor depends on that." @@ -2093,28 +2074,8 @@ if test "$enable_ntdll_APC_Performance" -eq 1; then patch_apply ntdll-APC_Performance/0001-ntdll-Reuse-old-async-fileio-structures-if-possible.patch fi -# Patchset ntdll-ForceBottomUpAlloc -# | -# | This patchset fixes the following Wine bugs: -# | * [#48175] AION (64 bit) - crashes in crysystem.dll.CryFree() due to high memory pointers allocated -# | * [#46568] 64-bit msxml6.dll from Microsoft Core XML Services 6.0 redist package fails to load (Wine doesn't respect -# | 44-bit user-mode VA limitation from Windows < 8.1) -# | -# | Modified files: -# | * dlls/ntdll/unix/virtual.c -# | -if test "$enable_ntdll_ForceBottomUpAlloc" -eq 1; then - patch_apply ntdll-ForceBottomUpAlloc/0001-ntdll-Increase-step-after-failed-map-attempt-in-try_.patch - patch_apply ntdll-ForceBottomUpAlloc/0002-ntdll-Increase-free-ranges-view-block-size-on-64-bit.patch - patch_apply ntdll-ForceBottomUpAlloc/0003-ntdll-Force-virtual-memory-allocation-order.patch - patch_apply ntdll-ForceBottomUpAlloc/0004-ntdll-Exclude-natively-mapped-areas-from-free-areas-.patch -fi - # Patchset ntdll-WRITECOPY # | -# | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ForceBottomUpAlloc -# | # | This patchset fixes the following Wine bugs: # | * [#29384] Multiple applications expect correct handling of WRITECOPY memory protection (Voobly fails to launch Age of # | Empires II, MSYS2) @@ -2138,7 +2099,7 @@ fi # Patchset ntdll-Builtin_Prot # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ForceBottomUpAlloc, ntdll-WRITECOPY +# | * ntdll-WRITECOPY # | # | This patchset fixes the following Wine bugs: # | * [#44650] Fix holes in ELF mappings @@ -2248,18 +2209,6 @@ if test "$enable_ntdll_RtlQueryPackageIdentity" -eq 1; then patch_apply ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch fi -# Patchset ntdll-Syscall_Emulation -# | -# | This patchset fixes the following Wine bugs: -# | * [#48291] Detroit: Become Human crashes on launch -# | -# | Modified files: -# | * configure.ac, dlls/ntdll/unix/signal_x86_64.c, tools/winebuild/import.c -# | -if test "$enable_ntdll_Syscall_Emulation" -eq 1; then - patch_apply ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch -fi - # Patchset ntdll-ext4-case-folder # | # | This patchset fixes the following Wine bugs: @@ -2936,16 +2885,6 @@ if test "$enable_user32_LoadKeyboardLayoutEx" -eq 1; then patch_apply user32-LoadKeyboardLayoutEx/0001-user32-Added-LoadKeyboardLayoutEx-stub.patch fi -# Patchset user32-MessageBox_WS_EX_TOPMOST -# | -# | Modified files: -# | * dlls/user32/msgbox.c, dlls/user32/tests/dialog.c -# | -if test "$enable_user32_MessageBox_WS_EX_TOPMOST" -eq 1; then - patch_apply user32-MessageBox_WS_EX_TOPMOST/0001-user32-tests-Add-some-tests-to-see-when-MessageBox-g.patch - patch_apply user32-MessageBox_WS_EX_TOPMOST/0002-user32-MessageBox-should-be-topmost-when-MB_SYSTEMMO.patch -fi - # Patchset user32-Mouse_Message_Hwnd # | # | This patchset fixes the following Wine bugs: diff --git a/patches/user32-MessageBox_WS_EX_TOPMOST/0001-user32-tests-Add-some-tests-to-see-when-MessageBox-g.patch b/patches/user32-MessageBox_WS_EX_TOPMOST/0001-user32-tests-Add-some-tests-to-see-when-MessageBox-g.patch deleted file mode 100644 index 91ae574c..00000000 --- a/patches/user32-MessageBox_WS_EX_TOPMOST/0001-user32-tests-Add-some-tests-to-see-when-MessageBox-g.patch +++ /dev/null @@ -1,141 +0,0 @@ -From b61dd32eb804c9ce027247d15e92b35c59010f6a Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Thu, 18 Feb 2016 10:17:46 +0800 -Subject: user32/tests: Add some tests to see when MessageBox gains - WS_EX_TOPMOST style. - ---- - dlls/user32/tests/dialog.c | 108 +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 108 insertions(+) - -diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c -index b8eea98b6e..de6aa463e9 100644 ---- a/dlls/user32/tests/dialog.c -+++ b/dlls/user32/tests/dialog.c -@@ -1573,8 +1573,69 @@ static LRESULT CALLBACK msgbox_hook_proc(INT code, WPARAM wParam, LPARAM lParam) - return CallNextHookEx(NULL, code, wParam, lParam); - } - -+struct create_window_params -+{ -+ BOOL owner; -+ char caption[64]; -+ DWORD style; -+}; -+ -+static DWORD WINAPI create_window_thread(void *param) -+{ -+ struct create_window_params *p = param; -+ HWND owner = 0; -+ -+ if (p->owner) -+ { -+ owner = CreateWindowExA(0, "Static", NULL, WS_POPUP, 10, 10, 10, 10, 0, 0, 0, NULL); -+ ok(owner != 0, "failed to create owner window\n"); -+ } -+ -+ MessageBoxA(owner, NULL, p->caption, p->style); -+ -+ if (owner) DestroyWindow(owner); -+ -+ return 0; -+} -+ -+static HWND wait_for_window(const char *caption) -+{ -+ HWND hwnd; -+ DWORD timeout = 0; -+ -+ for (;;) -+ { -+ hwnd = FindWindowA(NULL, caption); -+ if (hwnd) break; -+ -+ Sleep(50); -+ timeout += 50; -+ if (timeout > 3000) -+ { -+ ok(0, "failed to wait for a window %s\n", caption); -+ break; -+ } -+ } -+ -+ Sleep(50); -+ return hwnd; -+} -+ - static void test_MessageBox(void) - { -+ static const struct -+ { -+ DWORD mb_style; -+ DWORD ex_style; -+ } test[] = -+ { -+ { MB_OK, 0 }, -+ { MB_OK | MB_TASKMODAL, 0 }, -+ { MB_OK | MB_SYSTEMMODAL, WS_EX_TOPMOST }, -+ }; -+ struct create_window_params params; -+ HANDLE thread; -+ DWORD tid, i; - HHOOK hook; - int ret; - -@@ -1584,6 +1645,53 @@ static void test_MessageBox(void) - ok(ret == IDCANCEL, "got %d\n", ret); - - UnhookWindowsHookEx(hook); -+ -+ sprintf(params.caption, "pid %08lx, tid %08lx, time %08lx", -+ GetCurrentProcessId(), GetCurrentThreadId(), GetCurrentTime()); -+ -+ params.owner = FALSE; -+ -+ for (i = 0; i < sizeof(test)/sizeof(test[0]); i++) -+ { -+ HWND hwnd; -+ DWORD ex_style; -+ -+ params.style = test[i].mb_style; -+ -+ thread = CreateThread(NULL, 0, create_window_thread, ¶ms, 0, &tid); -+ -+ hwnd = wait_for_window(params.caption); -+ ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE); -+ todo_wine_if(test[i].ex_style == WS_EX_TOPMOST) -+ ok((ex_style & WS_EX_TOPMOST) == test[i].ex_style, "%ld: got window ex_style %#lx\n", i, ex_style); -+ -+ PostMessageA(hwnd, WM_COMMAND, IDCANCEL, 0); -+ -+ ok(WaitForSingleObject(thread, 5000) != WAIT_TIMEOUT, "thread failed to terminate\n"); -+ CloseHandle(thread); -+ } -+ -+ params.owner = TRUE; -+ -+ for (i = 0; i < sizeof(test)/sizeof(test[0]); i++) -+ { -+ HWND hwnd; -+ DWORD ex_style; -+ -+ params.style = test[i].mb_style; -+ -+ thread = CreateThread(NULL, 0, create_window_thread, ¶ms, 0, &tid); -+ -+ hwnd = wait_for_window(params.caption); -+ ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE); -+ todo_wine_if(test[i].ex_style == WS_EX_TOPMOST) -+ ok((ex_style & WS_EX_TOPMOST) == test[i].ex_style, "%ld: got window ex_style %#lx\n", i, ex_style); -+ -+ PostMessageA(hwnd, WM_COMMAND, IDCANCEL, 0); -+ -+ ok(WaitForSingleObject(thread, 5000) != WAIT_TIMEOUT, "thread failed to terminate\n"); -+ CloseHandle(thread); -+ } - } - - static INT_PTR CALLBACK custom_test_dialog_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) --- -2.12.2 - diff --git a/patches/user32-MessageBox_WS_EX_TOPMOST/0002-user32-MessageBox-should-be-topmost-when-MB_SYSTEMMO.patch b/patches/user32-MessageBox_WS_EX_TOPMOST/0002-user32-MessageBox-should-be-topmost-when-MB_SYSTEMMO.patch deleted file mode 100644 index 964f6f55..00000000 --- a/patches/user32-MessageBox_WS_EX_TOPMOST/0002-user32-MessageBox-should-be-topmost-when-MB_SYSTEMMO.patch +++ /dev/null @@ -1,49 +0,0 @@ -From d5ce913a6d9dbf9b7fd6026ae78f4f8b5697055e Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Thu, 18 Feb 2016 10:22:29 +0800 -Subject: [PATCH] user32: MessageBox should be topmost when MB_SYSTEMMODAL - style is set. - ---- - dlls/user32/msgbox.c | 4 ++-- - dlls/user32/tests/dialog.c | 2 -- - 2 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/dlls/user32/msgbox.c b/dlls/user32/msgbox.c -index 195bab2384b..31285ab11fa 100644 ---- a/dlls/user32/msgbox.c -+++ b/dlls/user32/msgbox.c -@@ -310,8 +310,8 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb) - } - - /*handle modal message boxes*/ -- if (((lpmb->dwStyle & MB_TASKMODAL) && (lpmb->hwndOwner==NULL)) || (lpmb->dwStyle & MB_SYSTEMMODAL)) -- NtUserSetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE ); -+ if (lpmb->dwStyle & MB_SYSTEMMODAL) -+ NtUserSetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); - - HeapFree( GetProcessHeap(), 0, buffer ); - } -diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c -index 83a9efe0a24..4ac5b88717f 100644 ---- a/dlls/user32/tests/dialog.c -+++ b/dlls/user32/tests/dialog.c -@@ -2241,7 +2241,6 @@ static void test_MessageBox(void) - - hwnd = wait_for_window(params.caption); - ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE); -- todo_wine_if(test[i].ex_style == WS_EX_TOPMOST) - ok((ex_style & WS_EX_TOPMOST) == test[i].ex_style, "%ld: got window ex_style %#lx\n", i, ex_style); - - PostMessageA(hwnd, WM_COMMAND, IDCANCEL, 0); -@@ -2263,7 +2262,6 @@ static void test_MessageBox(void) - - hwnd = wait_for_window(params.caption); - ex_style = GetWindowLongA(hwnd, GWL_EXSTYLE); -- todo_wine_if(test[i].ex_style == WS_EX_TOPMOST) - ok((ex_style & WS_EX_TOPMOST) == test[i].ex_style, "%ld: got window ex_style %#lx\n", i, ex_style); - - PostMessageA(hwnd, WM_COMMAND, IDCANCEL, 0); --- -2.35.1 - diff --git a/patches/user32-MessageBox_WS_EX_TOPMOST/definition b/patches/user32-MessageBox_WS_EX_TOPMOST/definition deleted file mode 100644 index 42facfbf..00000000 --- a/patches/user32-MessageBox_WS_EX_TOPMOST/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: MessageBox should be topmost when MB_SYSTEMMODAL style is set diff --git a/staging/upstream-commit b/staging/upstream-commit index 50e91142..02f33347 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -13cc08e32d6c04f8f915d07cda39638ee99c3d43 +384b0b35c357ca31ccb080162e1f39f93ec70054