From 24319dc308046ed520dd2cb92f57d54f96ebec21 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 30 Aug 2021 22:26:36 -0500 Subject: [PATCH] Rebase against 21c4a25437969696cbf5ffecee191ba8302bb2dd. --- ...NtAlertThreadByThreadId-and-NtWaitFo.patch | 118 ++++++++++++++-- ...dll-Support-x86_64-syscall-emulation.patch | 22 +-- patches/patchinstall.sh | 28 ++-- ...x-the-return-value-of-SHAddDataBlock.patch | 132 ------------------ patches/shlwapi-SHAddDataBlock/definition | 1 - ...additional-tests-for-UrlCombine-and-.patch | 14 +- patches/shlwapi-UrlCombine/definition | 1 + staging/upstream-commit | 2 +- 8 files changed, 137 insertions(+), 181 deletions(-) delete mode 100644 patches/shlwapi-SHAddDataBlock/0001-shlwapi-Fix-the-return-value-of-SHAddDataBlock.patch delete mode 100644 patches/shlwapi-SHAddDataBlock/definition diff --git a/patches/ntdll-NtAlertThreadByThreadId/0003-ntdll-Implement-NtAlertThreadByThreadId-and-NtWaitFo.patch b/patches/ntdll-NtAlertThreadByThreadId/0003-ntdll-Implement-NtAlertThreadByThreadId-and-NtWaitFo.patch index 90abd62b..73a89daa 100644 --- a/patches/ntdll-NtAlertThreadByThreadId/0003-ntdll-Implement-NtAlertThreadByThreadId-and-NtWaitFo.patch +++ b/patches/ntdll-NtAlertThreadByThreadId/0003-ntdll-Implement-NtAlertThreadByThreadId-and-NtWaitFo.patch @@ -1,4 +1,4 @@ -From 4d20defb0e12891e3d85a2f162f152f89cf0447d Mon Sep 17 00:00:00 2001 +From 9bd824a4cb0539197c1ce17df9b0461a436d92e4 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 30 Apr 2021 15:07:04 -0500 Subject: [PATCH] ntdll: Implement NtAlertThreadByThreadId and @@ -6,13 +6,16 @@ Subject: [PATCH] ntdll: Implement NtAlertThreadByThreadId and Signed-off-by: Zebediah Figura --- - dlls/ntdll/ntdll.spec | 2 + - dlls/ntdll/unix/sync.c | 93 ++++++++++++++++++++++++++++++++++++++++++ - include/winternl.h | 2 + - 3 files changed, 97 insertions(+) + dlls/ntdll/ntdll.spec | 4 ++ + dlls/ntdll/unix/loader.c | 2 + + dlls/ntdll/unix/sync.c | 93 ++++++++++++++++++++++++++++++++++++++++ + dlls/wow64/sync.c | 23 ++++++++++ + dlls/wow64/syscall.h | 2 + + include/winternl.h | 2 + + 6 files changed, 126 insertions(+) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index aad7bd89d14..8544d759587 100644 +index c3d17d989ac..6d65ac0ad95 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -138,6 +138,7 @@ @@ -23,7 +26,7 @@ index aad7bd89d14..8544d759587 100644 @ stdcall -syscall NtAllocateLocallyUniqueId(ptr) # @ stub NtAllocateUserPhysicalPages @ stdcall -syscall NtAllocateUuids(ptr ptr ptr ptr) -@@ -424,6 +425,7 @@ +@@ -425,6 +426,7 @@ @ stdcall -syscall NtUnmapViewOfSection(long ptr) # @ stub NtVdmControl # @ stub NtW32Call @@ -31,8 +34,44 @@ index aad7bd89d14..8544d759587 100644 @ stdcall -syscall NtWaitForDebugEvent(long long ptr ptr) @ stdcall -syscall NtWaitForKeyedEvent(long ptr long ptr) @ stdcall -syscall NtWaitForMultipleObjects(long ptr long long ptr) +@@ -1162,6 +1164,7 @@ + @ stdcall -private -syscall ZwAdjustPrivilegesToken(long long ptr long ptr ptr) NtAdjustPrivilegesToken + @ stdcall -private -syscall ZwAlertResumeThread(long ptr) NtAlertResumeThread + @ stdcall -private -syscall ZwAlertThread(long) NtAlertThread ++@ stdcall -private -syscall ZwAlertThreadByThreadId(ptr) NtAlertThreadByThreadId + @ stdcall -private -syscall ZwAllocateLocallyUniqueId(ptr) NtAllocateLocallyUniqueId + # @ stub ZwAllocateUserPhysicalPages + @ stdcall -private -syscall ZwAllocateUuids(ptr ptr ptr ptr) NtAllocateUuids +@@ -1447,6 +1450,7 @@ + @ stdcall -private -syscall ZwUnmapViewOfSection(long ptr) NtUnmapViewOfSection + # @ stub ZwVdmControl + # @ stub ZwW32Call ++@ stdcall -private -syscall ZwWaitForAlertByThreadId(ptr ptr) NtWaitForAlertByThreadId + @ stdcall -private -syscall ZwWaitForDebugEvent(long long ptr ptr) NtWaitForDebugEvent + @ stdcall -private -syscall ZwWaitForKeyedEvent(long ptr long ptr) NtWaitForKeyedEvent + @ stdcall -private -syscall ZwWaitForMultipleObjects(long ptr long long ptr) NtWaitForMultipleObjects +diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c +index b15824346b7..736b1a8773e 100644 +--- a/dlls/ntdll/unix/loader.c ++++ b/dlls/ntdll/unix/loader.c +@@ -126,6 +126,7 @@ static void * const syscalls[] = + NtAdjustPrivilegesToken, + NtAlertResumeThread, + NtAlertThread, ++ NtAlertThreadByThreadId, + NtAllocateLocallyUniqueId, + NtAllocateUuids, + NtAllocateVirtualMemory, +@@ -331,6 +332,7 @@ static void * const syscalls[] = + NtUnlockFile, + NtUnlockVirtualMemory, + NtUnmapViewOfSection, ++ NtWaitForAlertByThreadId, + NtWaitForDebugEvent, + NtWaitForKeyedEvent, + NtWaitForMultipleObjects, diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c -index d31c5b69015..2dad70be456 100644 +index a13e53a437b..dc9ced540d4 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -32,6 +32,9 @@ @@ -45,7 +84,7 @@ index d31c5b69015..2dad70be456 100644 #ifdef HAVE_SYS_SYSCALL_H #include #endif -@@ -82,6 +85,12 @@ static const LARGE_INTEGER zero_timeout; +@@ -81,6 +84,12 @@ static const LARGE_INTEGER zero_timeout; static pthread_mutex_t addr_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -58,7 +97,7 @@ index d31c5b69015..2dad70be456 100644 /* return a monotonic time counter, in Win32 ticks */ static inline ULONGLONG monotonic_counter(void) { -@@ -2333,6 +2342,90 @@ NTSTATUS WINAPI NtQueryInformationAtom( RTL_ATOM atom, ATOM_INFORMATION_CLASS cl +@@ -2312,6 +2321,90 @@ NTSTATUS WINAPI NtQueryInformationAtom( RTL_ATOM atom, ATOM_INFORMATION_CLASS cl } @@ -149,11 +188,62 @@ index d31c5b69015..2dad70be456 100644 #ifdef __linux__ NTSTATUS CDECL fast_RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit, int timeout ) +diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c +index 0078508fc7f..5e59c8c5587 100644 +--- a/dlls/wow64/sync.c ++++ b/dlls/wow64/sync.c +@@ -1624,3 +1624,26 @@ NTSTATUS WINAPI wow64_NtYieldExecution( UINT *args ) + { + return NtYieldExecution(); + } ++ ++ ++/********************************************************************** ++ * wow64_NtAlertThreadByThreadId ++ */ ++NTSTATUS WINAPI wow64_NtAlertThreadByThreadId( UINT *args ) ++{ ++ HANDLE tid = get_handle( &args ); ++ ++ return NtAlertThreadByThreadId( tid ); ++} ++ ++ ++/********************************************************************** ++ * wow64_NtWaitForAlertByThreadId ++ */ ++NTSTATUS WINAPI wow64_NtWaitForAlertByThreadId( UINT *args ) ++{ ++ const void *address = get_ptr( &args ); ++ const LARGE_INTEGER *timeout = get_ptr( &args ); ++ ++ return NtWaitForAlertByThreadId( address, timeout ); ++} +diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h +index a565e9cda3a..feca707a9da 100644 +--- a/dlls/wow64/syscall.h ++++ b/dlls/wow64/syscall.h +@@ -30,6 +30,7 @@ + SYSCALL_ENTRY( NtAdjustPrivilegesToken ) \ + SYSCALL_ENTRY( NtAlertResumeThread ) \ + SYSCALL_ENTRY( NtAlertThread ) \ ++ SYSCALL_ENTRY( NtAlertThreadByThreadId ) \ + SYSCALL_ENTRY( NtAllocateLocallyUniqueId ) \ + SYSCALL_ENTRY( NtAllocateUuids ) \ + SYSCALL_ENTRY( NtAllocateVirtualMemory ) \ +@@ -234,6 +235,7 @@ + SYSCALL_ENTRY( NtUnlockFile ) \ + SYSCALL_ENTRY( NtUnlockVirtualMemory ) \ + SYSCALL_ENTRY( NtUnmapViewOfSection ) \ ++ SYSCALL_ENTRY( NtWaitForAlertByThreadId ) \ + SYSCALL_ENTRY( NtWaitForDebugEvent ) \ + SYSCALL_ENTRY( NtWaitForKeyedEvent ) \ + SYSCALL_ENTRY( NtWaitForMultipleObjects ) \ diff --git a/include/winternl.h b/include/winternl.h -index 7a8a977b512..6bb6ad58277 100644 +index fea9e9df117..9d7a95406ea 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -3799,6 +3799,7 @@ NTSYSAPI NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG +@@ -3820,6 +3820,7 @@ NTSYSAPI NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG NTSYSAPI NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD); NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG); NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle); @@ -161,7 +251,7 @@ index 7a8a977b512..6bb6ad58277 100644 NTSYSAPI NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid); NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG,PUCHAR); NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG_PTR,SIZE_T*,ULONG,ULONG); -@@ -4036,6 +4037,7 @@ NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PL +@@ -4062,6 +4063,7 @@ NTSYSAPI NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PL NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG); NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID); NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID); @@ -170,5 +260,5 @@ index 7a8a977b512..6bb6ad58277 100644 NTSYSAPI NTSTATUS WINAPI NtWaitForKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*); NTSYSAPI NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*); -- -2.30.2 +2.33.0 diff --git a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch index 9db342b2..80b5a891 100644 --- a/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch +++ b/patches/ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch @@ -1,4 +1,4 @@ -From 30a823033f450475796b7d24a757ef3b00be46fa Mon Sep 17 00:00:00 2001 +From 5199e9b66777ab4436b8d641dd8412da472d718d Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Tue, 14 Jul 2020 15:00:34 +0300 Subject: [PATCH] ntdll: Support x86_64 syscall emulation. @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Support x86_64 syscall emulation. 3 files changed, 124 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 4b03c869d5e0..477266b8ba80 100644 +index 594794ed93c..38f6e76eae0 100644 --- a/configure.ac +++ b/configure.ac -@@ -487,6 +487,7 @@ AC_CHECK_HEADERS(\ +@@ -479,6 +479,7 @@ AC_CHECK_HEADERS(\ linux/joystick.h \ linux/major.h \ linux/param.h \ @@ -22,7 +22,7 @@ index 4b03c869d5e0..477266b8ba80 100644 linux/types.h \ linux/ucdrom.h \ diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c -index da548eb1a492..2fb3eab73594 100644 +index a9bdbf62929..7d9ee03ffaf 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -28,6 +28,7 @@ @@ -166,7 +166,7 @@ index da548eb1a492..2fb3eab73594 100644 /*********************************************************************** * handle_interrupt -@@ -3004,6 +3124,7 @@ void signal_init_process(void) +@@ -2980,6 +3100,7 @@ void signal_init_process(void) if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error; if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error; if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error; @@ -174,7 +174,7 @@ index da548eb1a492..2fb3eab73594 100644 return; error: -@@ -3222,6 +3343,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, +@@ -3175,6 +3296,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "leaq 0x28(%rsp),%rsi\n\t" /* first argument */ "movq %rcx,%rsp\n\t" "movq 0x00(%rcx),%rax\n\t" @@ -183,7 +183,7 @@ index da548eb1a492..2fb3eab73594 100644 "movl %eax,%ebx\n\t" "shrl $8,%ebx\n\t" diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c -index 6a1585781431..dc04a3214749 100644 +index fcd27117780..0da028d83e7 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1419,7 +1419,6 @@ static int cmp_link_name( const void *e1, const void *e2 ) @@ -194,15 +194,15 @@ index 6a1585781431..dc04a3214749 100644 /* output the functions for system calls */ void output_syscalls( DLLSPEC *spec ) { -@@ -1488,7 +1487,7 @@ void output_syscalls( DLLSPEC *spec ) +@@ -1477,7 +1476,7 @@ void output_syscalls( DLLSPEC *spec ) * validate that instruction, we can just put a jmp there instead. */ output( "\t.byte 0x4c,0x8b,0xd1\n" ); /* movq %rcx,%r10 */ output( "\t.byte 0xb8\n" ); /* movl $i,%eax */ -- output( "\t.long %u\n", i ); -+ output( "\t.long %u\n", 0xf000 + i ); +- output( "\t.long %u\n", id ); ++ output( "\t.long %u\n", 0xf000 + id ); output( "\t.byte 0xf6,0x04,0x25,0x08,0x03,0xfe,0x7f,0x01\n" ); /* testb $1,0x7ffe0308 */ output( "\t.byte 0x75,0x03\n" ); /* jne 1f */ output( "\t.byte 0x0f,0x05\n" ); /* syscall */ -- -2.31.1 +2.33.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 80648ddb..fe64695f 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "8e2df64cf8979334618a3e2672d19cb9b891fa3f" + echo "21c4a25437969696cbf5ffecee191ba8302bb2dd" } # Show version information @@ -206,7 +206,6 @@ patch_enable_all () enable_shell32_Toolbar_Bitmaps="$1" enable_shell32_UnixFS="$1" enable_shlwapi_AssocGetPerceivedType="$1" - enable_shlwapi_SHAddDataBlock="$1" enable_shlwapi_UrlCanonicalize="$1" enable_shlwapi_UrlCombine="$1" enable_stdole32_idl_Typelib="$1" @@ -658,9 +657,6 @@ patch_enable () shlwapi-AssocGetPerceivedType) enable_shlwapi_AssocGetPerceivedType="$2" ;; - shlwapi-SHAddDataBlock) - enable_shlwapi_SHAddDataBlock="$2" - ;; shlwapi-UrlCanonicalize) enable_shlwapi_UrlCanonicalize="$2" ;; @@ -1262,6 +1258,13 @@ if test "$enable_stdole32_tlb_SLTG_Typelib" -eq 1; then enable_widl_SLTG_Typelib_Support=1 fi +if test "$enable_shlwapi_UrlCombine" -eq 1; then + if test "$enable_shlwapi_UrlCanonicalize" -gt 1; then + abort "Patchset shlwapi-UrlCanonicalize disabled, but shlwapi-UrlCombine depends on that." + fi + enable_shlwapi_UrlCanonicalize=1 +fi + if test "$enable_shell32_ACE_Viewer" -eq 1; then if test "$enable_shell32_Progress_Dialog" -gt 1; then abort "Patchset shell32-Progress_Dialog disabled, but shell32-ACE_Viewer depends on that." @@ -2681,7 +2684,8 @@ fi # | Modified files: # | * dlls/ntdll/Makefile.in, dlls/ntdll/critsection.c, dlls/ntdll/ntdll.spec, dlls/ntdll/sync.c, # | dlls/ntdll/tests/Makefile.in, dlls/ntdll/tests/om.c, dlls/ntdll/tests/sync.c, dlls/ntdll/unix/loader.c, -# | dlls/ntdll/unix/sync.c, dlls/ntdll/unix/unix_private.h, dlls/ntdll/unixlib.h, include/winternl.h +# | dlls/ntdll/unix/sync.c, dlls/ntdll/unix/unix_private.h, dlls/ntdll/unixlib.h, dlls/wow64/sync.c, dlls/wow64/syscall.h, +# | include/winternl.h # | if test "$enable_ntdll_NtAlertThreadByThreadId" -eq 1; then patch_apply ntdll-NtAlertThreadByThreadId/0001-ntdll-tests-Move-some-tests-to-a-new-sync.c-file.patch @@ -3266,15 +3270,6 @@ if test "$enable_shlwapi_AssocGetPerceivedType" -eq 1; then patch_apply shlwapi-AssocGetPerceivedType/0002-shlwapi-Implement-AssocGetPerceivedType.patch fi -# Patchset shlwapi-SHAddDataBlock -# | -# | Modified files: -# | * dlls/shlwapi/clist.c, dlls/shlwapi/tests/clist.c -# | -if test "$enable_shlwapi_SHAddDataBlock" -eq 1; then - patch_apply shlwapi-SHAddDataBlock/0001-shlwapi-Fix-the-return-value-of-SHAddDataBlock.patch -fi - # Patchset shlwapi-UrlCanonicalize # | # | This patchset fixes the following Wine bugs: @@ -3289,6 +3284,9 @@ fi # Patchset shlwapi-UrlCombine # | +# | This patchset has the following (direct or indirect) dependencies: +# | * shlwapi-UrlCanonicalize +# | # | Modified files: # | * dlls/kernelbase/path.c, dlls/shlwapi/tests/url.c # | diff --git a/patches/shlwapi-SHAddDataBlock/0001-shlwapi-Fix-the-return-value-of-SHAddDataBlock.patch b/patches/shlwapi-SHAddDataBlock/0001-shlwapi-Fix-the-return-value-of-SHAddDataBlock.patch deleted file mode 100644 index a0710c12..00000000 --- a/patches/shlwapi-SHAddDataBlock/0001-shlwapi-Fix-the-return-value-of-SHAddDataBlock.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 0cf3e133b7ab01d7d1facf955263bd9b8a0ed28e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Herm=C3=A8s=20B=C3=89LUSCA-MA=C3=8FTO?= - -Date: Tue, 17 Jan 2017 23:46:31 +0100 -Subject: shlwapi: Fix the return value of SHAddDataBlock - -This patch fixes the return type and value of SHAddDataBlock. -The corresponding test (shlwapi's clist) is adjusted to reflect -those changes. Tested on Windows 2003 and 7. - -In addition I set, in SHRemoveDataBlock, the lpList pointer -to NULL, to respect the fact it's a pointer, not just a number. - -Signed-off-by: Hermes Belusca-Maito ---- - dlls/shlwapi/clist.c | 14 +++++++------- - dlls/shlwapi/tests/clist.c | 21 +++++++++------------ - 2 files changed, 16 insertions(+), 19 deletions(-) - -diff --git a/dlls/shlwapi/clist.c b/dlls/shlwapi/clist.c -index 52bee37c9e4..77917b35469 100644 ---- a/dlls/shlwapi/clist.c -+++ b/dlls/shlwapi/clist.c -@@ -65,19 +65,19 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList) - * the call returns S_OK but does not actually add the element. - * See SHWriteDataBlockList. - */ --HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem) -+BOOL WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem) - { - LPDATABLOCK_HEADER lpInsertAt = NULL; - ULONG ulSize; - - TRACE("(%p,%p)\n", lppList, lpNewItem); - -- if(!lppList || !lpNewItem ) -- return E_INVALIDARG; -+ if(!lppList || !lpNewItem) -+ return FALSE; - - if (lpNewItem->cbSize < sizeof(DATABLOCK_HEADER) || - lpNewItem->dwSignature == CLIST_ID_CONTAINER) -- return S_OK; -+ return FALSE; - - ulSize = lpNewItem->cbSize; - -@@ -134,9 +134,9 @@ HRESULT WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewIt - lpInsertAt = NextItem(lpInsertAt); - lpInsertAt->cbSize = 0; - -- return lpNewItem->cbSize; -+ return TRUE; - } -- return S_OK; -+ return FALSE; - } - - /************************************************************************* -@@ -354,7 +354,7 @@ VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList) - */ - BOOL WINAPI SHRemoveDataBlock(LPDBLIST* lppList, DWORD dwSignature) - { -- LPDATABLOCK_HEADER lpList = 0; -+ LPDATABLOCK_HEADER lpList = NULL; - LPDATABLOCK_HEADER lpItem = NULL; - LPDATABLOCK_HEADER lpNext; - ULONG ulNewSize; -diff --git a/dlls/shlwapi/tests/clist.c b/dlls/shlwapi/tests/clist.c -index b930470806e..309b3335ec1 100644 ---- a/dlls/shlwapi/tests/clist.c -+++ b/dlls/shlwapi/tests/clist.c -@@ -218,7 +218,7 @@ static IStreamVtbl iclvt = - static HMODULE SHLWAPI_hshlwapi = 0; - - static VOID (WINAPI *pSHLWAPI_19)(LPSHLWAPI_CLIST); --static HRESULT (WINAPI *pSHLWAPI_20)(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST); -+static BOOL (WINAPI *pSHLWAPI_20)(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST); - static BOOL (WINAPI *pSHLWAPI_21)(LPSHLWAPI_CLIST*,ULONG); - static LPSHLWAPI_CLIST (WINAPI *pSHLWAPI_22)(LPSHLWAPI_CLIST,ULONG); - static HRESULT (WINAPI *pSHLWAPI_17)(IStream*, SHLWAPI_CLIST*); -@@ -292,6 +292,7 @@ static void test_CList(void) - struct dummystream streamobj; - LPSHLWAPI_CLIST list = NULL; - LPCSHLWAPI_CLIST item = SHLWAPI_CLIST_items; -+ BOOL bRet; - HRESULT hRet; - LPSHLWAPI_CLIST inserted; - BYTE buff[64]; -@@ -312,10 +313,10 @@ static void test_CList(void) - buff[sizeof(SHLWAPI_CLIST)+i] = i*2; - - /* Add it */ -- hRet = pSHLWAPI_20(&list, inserted); -- ok(hRet > S_OK, "failed list add\n"); -+ bRet = pSHLWAPI_20(&list, inserted); -+ ok(bRet == TRUE, "failed list add\n"); - -- if (hRet > S_OK) -+ if (bRet == TRUE) - { - ok(list && list->ulSize, "item not added\n"); - -@@ -390,11 +391,8 @@ static void test_CList(void) - inserted = (LPSHLWAPI_CLIST)buff; - inserted->ulSize = sizeof(SHLWAPI_CLIST) -1; - inserted->ulId = 33; -- -- /* The call succeeds but the item is not inserted, except on some early -- * versions which return failure. Wine behaves like later versions. -- */ -- pSHLWAPI_20(&list, inserted); -+ bRet = pSHLWAPI_20(&list, inserted); -+ ok(bRet == FALSE, "Expected failure\n"); - - inserted = pSHLWAPI_22(list, 33); - ok(inserted == NULL, "inserted bad element size\n"); -@@ -402,9 +400,8 @@ static void test_CList(void) - inserted = (LPSHLWAPI_CLIST)buff; - inserted->ulSize = 44; - inserted->ulId = ~0U; -- -- /* See comment above, some early versions fail this call */ -- pSHLWAPI_20(&list, inserted); -+ bRet = pSHLWAPI_20(&list, inserted); -+ ok(bRet == FALSE, "Expected failure\n"); - - item = SHLWAPI_CLIST_items; - --- -2.11.0 - diff --git a/patches/shlwapi-SHAddDataBlock/definition b/patches/shlwapi-SHAddDataBlock/definition deleted file mode 100644 index 693e563e..00000000 --- a/patches/shlwapi-SHAddDataBlock/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: Fix return type of shlwapi.SHAddDataBlock diff --git a/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch b/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch index 39db1fe8..f97fe121 100644 --- a/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch +++ b/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch @@ -1,4 +1,4 @@ -From 95dcb9cf88979d5894c300a71a080470dcefde87 Mon Sep 17 00:00:00 2001 +From ba33fe7790adb2bbd335470b00a419bf051d9ae0 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 17 Jan 2014 01:19:41 +0100 Subject: [PATCH] shlwapi/tests: Add additional tests for UrlCombine and @@ -9,7 +9,7 @@ Subject: [PATCH] shlwapi/tests: Add additional tests for UrlCombine and 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c -index 96635c98361..90e0d2e1b10 100644 +index 4f1f15b6e2c..04281a7a77d 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -209,6 +209,14 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { @@ -51,7 +51,7 @@ index 96635c98361..90e0d2e1b10 100644 {"file:///C:\\dir\\file.txt", "test.txt", 0, S_OK, "file:///C:/dir/test.txt"}, {"file:///C:\\dir\\file.txt#hash\\hash", "test.txt", 0, S_OK, "file:///C:/dir/file.txt#hash/test.txt"}, {"file:///C:\\dir\\file.html#hash\\hash", "test.html", 0, S_OK, "file:///C:/dir/test.html"}, -@@ -1201,7 +1219,7 @@ static void test_UrlCanonicalizeW(void) +@@ -1233,7 +1251,7 @@ static void test_UrlCanonicalizeW(void) /* ########################### */ @@ -60,7 +60,7 @@ index 96635c98361..90e0d2e1b10 100644 { HRESULT hr; CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH]; -@@ -1226,34 +1244,42 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla +@@ -1258,34 +1276,42 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla dwSize = 0; hr = pUrlCombineA(szUrl1, szUrl2, NULL, &dwSize, dwFlags); ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER); @@ -110,8 +110,8 @@ index 96635c98361..90e0d2e1b10 100644 + ok(todo || dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); if(SUCCEEDED(hr)) { wszConvertedUrl = GetWideString(szReturnUrl); - ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, "Strings didn't match between ascii and unicode UrlCombine!\n"); -@@ -1273,7 +1299,7 @@ static void test_UrlCombine(void) + ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, "Strings didn't match between ansi and unicode UrlCombine!\n"); +@@ -1305,7 +1331,7 @@ static void test_UrlCombine(void) unsigned int i; for (i = 0; i < ARRAY_SIZE(TEST_COMBINE); i++) { test_url_combine(TEST_COMBINE[i].url1, TEST_COMBINE[i].url2, TEST_COMBINE[i].flags, @@ -121,5 +121,5 @@ index 96635c98361..90e0d2e1b10 100644 } -- -2.17.1 +2.33.0 diff --git a/patches/shlwapi-UrlCombine/definition b/patches/shlwapi-UrlCombine/definition index adeb42e1..bc920c37 100644 --- a/patches/shlwapi-UrlCombine/definition +++ b/patches/shlwapi-UrlCombine/definition @@ -1 +1,2 @@ Fixes: Workaround for shlwapi URLs with relative paths +Depends: shlwapi-UrlCanonicalize diff --git a/staging/upstream-commit b/staging/upstream-commit index cd3b5259..a4e9aa2e 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -8e2df64cf8979334618a3e2672d19cb9b891fa3f +21c4a25437969696cbf5ffecee191ba8302bb2dd