diff --git a/README.md b/README.md index b61f8943..a95a0363 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [10]:** +**Bug fixes and features included in the next upcoming release [11]:** * Add IDragSourceHelper stub interface ([Wine Bug #24699](https://bugs.winehq.org/show_bug.cgi?id=24699)) * Catch invalid memory accesses in imagehlp.CheckSumMappedFile @@ -51,6 +51,7 @@ Included bug fixes and improvements * Only set SFGAO_HASSUBFOLDER when there are really subfolders ([Wine Bug #24851](https://bugs.winehq.org/show_bug.cgi?id=24851)) * Properly implement imagehlp.ImageLoad and ImageUnload * Report correct ObjectName for NamedPipe wineserver objects +* Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject ([Wine Bug #39127](https://bugs.winehq.org/show_bug.cgi?id=39127)) **Bug fixes and features in Wine Staging 1.7.49 [235]:** diff --git a/debian/changelog b/debian/changelog index 97343ff0..b990d820 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,8 @@ wine-staging (1.7.50) UNRELEASED; urgency=low * Added patch to fix implementation of krnl386.exe16.GetTempDrive. * Added patch for forward/backward compatibility of previous format of high precision registry timestamps. + * Added patch to use a helper function for NtWaitForMultipleObjects and + NtWaitForSingleObject. * Removed patch to move security cookie initialization from memory management to loader (accepted upstream). * Removed patches for stub of D3DCompileFromFile and D3DCompile2 (accepted diff --git a/patches/ntdll-NtWaitForMultipleObjects/0001-ntdll-Use-helper-function-for-NtWaitForMultipleObjec.patch b/patches/ntdll-NtWaitForMultipleObjects/0001-ntdll-Use-helper-function-for-NtWaitForMultipleObjec.patch new file mode 100644 index 00000000..60b2be8b --- /dev/null +++ b/patches/ntdll-NtWaitForMultipleObjects/0001-ntdll-Use-helper-function-for-NtWaitForMultipleObjec.patch @@ -0,0 +1,57 @@ +From d9ce312996674d62b417615d50b9fd035063240b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Fri, 21 Aug 2015 06:33:49 +0200 +Subject: ntdll: Use helper function for NtWaitForMultipleObjects and + NtWaitForSingleObject. + +--- + dlls/ntdll/sync.c | 22 +++++++++++++++------- + 1 file changed, 15 insertions(+), 7 deletions(-) + +diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c +index b0329ab..9773382 100644 +--- a/dlls/ntdll/sync.c ++++ b/dlls/ntdll/sync.c +@@ -990,12 +990,9 @@ NTSTATUS WINAPI NtSetTimerResolution(IN ULONG resolution, + + /* wait operations */ + +-/****************************************************************** +- * NtWaitForMultipleObjects (NTDLL.@) +- */ +-NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, +- BOOLEAN wait_any, BOOLEAN alertable, +- const LARGE_INTEGER *timeout ) ++static inline NTSTATUS wait_objects( DWORD count, const HANDLE *handles, ++ BOOLEAN wait_any, BOOLEAN alertable, ++ const LARGE_INTEGER *timeout ) + { + select_op_t select_op; + UINT i, flags = SELECT_INTERRUPTIBLE; +@@ -1010,11 +1007,22 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, + + + /****************************************************************** ++ * NtWaitForMultipleObjects (NTDLL.@) ++ */ ++NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, ++ BOOLEAN wait_any, BOOLEAN alertable, ++ const LARGE_INTEGER *timeout ) ++{ ++ return wait_objects( count, handles, wait_any, alertable, timeout ); ++} ++ ++ ++/****************************************************************** + * NtWaitForSingleObject (NTDLL.@) + */ + NTSTATUS WINAPI NtWaitForSingleObject(HANDLE handle, BOOLEAN alertable, const LARGE_INTEGER *timeout ) + { +- return NtWaitForMultipleObjects( 1, &handle, FALSE, alertable, timeout ); ++ return wait_objects( 1, &handle, FALSE, alertable, timeout ); + } + + +-- +2.5.0 + diff --git a/patches/ntdll-NtWaitForMultipleObjects/definition b/patches/ntdll-NtWaitForMultipleObjects/definition new file mode 100644 index 00000000..ff406007 --- /dev/null +++ b/patches/ntdll-NtWaitForMultipleObjects/definition @@ -0,0 +1 @@ +Fixes: [39127] Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 6930b9d5..aab58263 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -178,6 +178,7 @@ patch_enable_all () enable_ntdll_NtQueryEaFile="$1" enable_ntdll_NtQuerySection="$1" enable_ntdll_NtSetLdtEntries="$1" + enable_ntdll_NtWaitForMultipleObjects="$1" enable_ntdll_Pipe_SpecialCharacters="$1" enable_ntdll_RtlIpStringToAddress="$1" enable_ntdll_SystemRoot_Symlink="$1" @@ -619,6 +620,9 @@ patch_enable () ntdll-NtSetLdtEntries) enable_ntdll_NtSetLdtEntries="$2" ;; + ntdll-NtWaitForMultipleObjects) + enable_ntdll_NtWaitForMultipleObjects="$2" + ;; ntdll-Pipe_SpecialCharacters) enable_ntdll_Pipe_SpecialCharacters="$2" ;; @@ -3856,6 +3860,21 @@ if test "$enable_ntdll_NtSetLdtEntries" -eq 1; then ) >> "$patchlist" fi +# Patchset ntdll-NtWaitForMultipleObjects +# | +# | This patchset fixes the following Wine bugs: +# | * [#39127] Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject +# | +# | Modified files: +# | * dlls/ntdll/sync.c +# | +if test "$enable_ntdll_NtWaitForMultipleObjects" -eq 1; then + patch_apply ntdll-NtWaitForMultipleObjects/0001-ntdll-Use-helper-function-for-NtWaitForMultipleObjec.patch + ( + echo '+ { "Michael Müller", "ntdll: Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject.", 1 },'; + ) >> "$patchlist" +fi + # Patchset ntdll-Pipe_SpecialCharacters # | # | This patchset fixes the following Wine bugs: