Rebase against f41f67806b9d630e7fbb0e31e3a166e84212dc9b.

This commit is contained in:
Elizabeth Figura
2025-11-25 18:00:38 -06:00
parent 463f0b7936
commit b7f859e90d
6 changed files with 20 additions and 721 deletions

View File

@@ -1,48 +0,0 @@
From 4039b5b7bd3e8df9052006c5755a63aab93d52ef Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 29 May 2019 15:11:42 -0600
Subject: kernel32: Add reparse support to FindNextFile.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
dlls/kernelbase/file.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index bf6e9e17c9e..26d3dde5ad6 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -1508,6 +1508,30 @@ BOOL WINAPI DECLSPEC_HOTPATCH FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *da
memcpy( data->cFileName, dir_info->FileName, dir_info->FileNameLength );
data->cFileName[dir_info->FileNameLength/sizeof(WCHAR)] = 0;
+ /* get reparse tag */
+ if (dir_info->FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ {
+ INT path_len = info->path.Length + dir_info->FileNameLength + sizeof(WCHAR);
+ WCHAR *path = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, path_len );
+ FILE_ATTRIBUTE_TAG_INFORMATION taginfo;
+ IO_STATUS_BLOCK iosb;
+ NTSTATUS status;
+ HANDLE hlink;
+
+ if (!path) break;
+
+ lstrcpynW( path, info->path.Buffer, info->path.Length/sizeof(WCHAR) + 1 );
+ lstrcatW( path, data->cFileName );
+
+ hlink = CreateFileW( path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0 );
+ HeapFree( GetProcessHeap(), 0, path );
+ status = NtQueryInformationFile( hlink, &iosb, &taginfo, sizeof(taginfo),
+ FileAttributeTagInformation );
+ if (status == STATUS_SUCCESS) data->dwReserved0 = taginfo.ReparseTag;
+ CloseHandle( hlink );
+ }
+
if (info->level != FindExInfoBasic)
{
memcpy( data->cAlternateFileName, dir_info->ShortName, dir_info->ShortNameLength );
--
2.17.1

View File

@@ -1,32 +0,0 @@
From 0eda0c4092b0673e4b4e646388c53e2a8ecc2379 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 18 May 2016 18:08:24 +0800
Subject: user32: Add a workaround for Windows 3.1 apps which call
LoadImage(LR_LOADFROMFILE) with a resource id. (v2)
Fixes #24963.
---
dlls/user32/cursoricon.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 4f93195..95cc410 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -1404,7 +1404,12 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
hInstance, debugstr_w(name), width, height, depth, fCursor, loadflags);
if ( loadflags & LR_LOADFROMFILE ) /* Load from file */
- return CURSORICON_LoadFromFile( name, width, height, depth, fCursor, loadflags );
+ {
+ if (IS_INTRESOURCE(name) && GetProcessVersion(0) < 0x40000)
+ WARN("Windows 3.1 app set LR_LOADFROMFILE without a name, fallback to loading from resource\n");
+ else
+ return CURSORICON_LoadFromFile( name, width, height, depth, fCursor, loadflags );
+ }
if (!hInstance) hInstance = user32_module; /* Load OEM cursor/icon */
--
2.8.0

View File

@@ -1 +0,0 @@
Fixes: [24963] Workaround for Windows 3.1 apps which call LoadImage(LR_LOADFROMFILE) with a resource id

View File

@@ -1,51 +1,24 @@
From 4274d901461697a7fb05b0d1e0b06216061166f1 Mon Sep 17 00:00:00 2001
From 3f2c89666f2eee64db4b634c0bfc420dfbbacc57 Mon Sep 17 00:00:00 2001
From: Ben Shefte <shefben@gmail.com>
Date: Wed, 1 Mar 2023 07:37:52 +1100
Subject: [PATCH] vcomp: Implement _vcomp_for_dynamic_init_i8
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52012
---
dlls/vcomp/main.c | 135 ++++++++++++++++++++++++++++++++++++
dlls/vcomp/vcomp.spec | 6 +-
dlls/vcomp100/vcomp100.spec | 6 +-
dlls/vcomp110/vcomp110.spec | 6 +-
dlls/vcomp120/vcomp120.spec | 6 +-
dlls/vcomp140/vcomp140.spec | 6 +-
dlls/vcomp90/vcomp90.spec | 6 +-
7 files changed, 153 insertions(+), 18 deletions(-)
dlls/vcomp/main.c | 115 ++++++++++++++++++++++++++++++++++++
dlls/vcomp/vcomp.spec | 4 +-
dlls/vcomp100/vcomp100.spec | 4 +-
dlls/vcomp110/vcomp110.spec | 4 +-
dlls/vcomp120/vcomp120.spec | 4 +-
dlls/vcomp140/vcomp140.spec | 4 +-
dlls/vcomp90/vcomp90.spec | 4 +-
7 files changed, 127 insertions(+), 12 deletions(-)
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c
index 63ec0502b9b..4cde0381693 100644
index 6a12da8d458..3b93926a405 100644
--- a/dlls/vcomp/main.c
+++ b/dlls/vcomp/main.c
@@ -1034,6 +1034,26 @@ double CDECL omp_get_wtime(void)
return GetTickCount() / 1000.0;
}
+/*****************************************************
+* omp_get_wtick - Taken from:
+* https://gist.github.com/Randl/45bcca59720f661fa033a67d5f44bff0
+*/
+double CDECL omp_get_wtick (void)
+{
+ /*return GetTickCount();*/
+ FILETIME createTime;
+ FILETIME exitTime;
+ FILETIME kernelTime;
+ FILETIME userTime;
+ ULARGE_INTEGER li;
+
+ GetProcessTimes(GetCurrentProcess(), &createTime, &exitTime, &kernelTime, &userTime);
+ li.LowPart = userTime.dwLowDateTime;
+ li.HighPart = userTime.dwHighDateTime;
+
+ return (double)li.QuadPart / 10000000.0;
+}
+
void CDECL omp_set_dynamic(int val)
{
TRACE("(%d): stub\n", val);
@@ -1486,6 +1506,77 @@ void CDECL _vcomp_for_dynamic_init(unsigned int flags, unsigned int first, unsig
@@ -1341,6 +1341,77 @@ void CDECL _vcomp_for_dynamic_init(unsigned int flags, unsigned int first, unsig
}
}
@@ -123,7 +96,7 @@ index 63ec0502b9b..4cde0381693 100644
int CDECL _vcomp_for_dynamic_next(unsigned int *begin, unsigned int *end)
{
struct vcomp_thread_data *thread_data = vcomp_init_thread_data();
@@ -1530,6 +1621,50 @@ int CDECL _vcomp_for_dynamic_next(unsigned int *begin, unsigned int *end)
@@ -1385,6 +1456,50 @@ int CDECL _vcomp_for_dynamic_next(unsigned int *begin, unsigned int *end)
return 0;
}
@@ -175,7 +148,7 @@ index 63ec0502b9b..4cde0381693 100644
{
TRACE("()\n");
diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec
index fb67146e058..09bf45550d5 100644
index 1a981a6c6c1..09bf45550d5 100644
--- a/dlls/vcomp/vcomp.spec
+++ b/dlls/vcomp/vcomp.spec
@@ -56,9 +56,9 @@
@@ -190,17 +163,8 @@ index fb67146e058..09bf45550d5 100644
@ cdecl _vcomp_for_static_end()
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr)
@ cdecl _vcomp_for_static_init_i8(int64 int64 int64 int64 ptr ptr ptr ptr ptr)
@@ -96,7 +96,7 @@
@ cdecl omp_get_num_procs()
@ cdecl omp_get_num_threads()
@ cdecl omp_get_thread_num()
-@ stub omp_get_wtick
+@ cdecl omp_get_wtick()
@ cdecl omp_get_wtime()
@ cdecl omp_in_parallel()
@ cdecl omp_init_lock(ptr)
diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec
index fb67146e058..9aa43e3ba4b 100644
index 1a981a6c6c1..c38fae6d27d 100644
--- a/dlls/vcomp100/vcomp100.spec
+++ b/dlls/vcomp100/vcomp100.spec
@@ -56,9 +56,9 @@
@@ -215,17 +179,8 @@ index fb67146e058..9aa43e3ba4b 100644
@ cdecl _vcomp_for_static_end()
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr)
@ cdecl _vcomp_for_static_init_i8(int64 int64 int64 int64 ptr ptr ptr ptr ptr)
@@ -96,7 +96,7 @@
@ cdecl omp_get_num_procs()
@ cdecl omp_get_num_threads()
@ cdecl omp_get_thread_num()
-@ stub omp_get_wtick
+@ cdecl omp_get_wtick() vcomp.omp_get_wtick
@ cdecl omp_get_wtime()
@ cdecl omp_in_parallel()
@ cdecl omp_init_lock(ptr)
diff --git a/dlls/vcomp110/vcomp110.spec b/dlls/vcomp110/vcomp110.spec
index e1cb8ab9931..d8b4d3e3f16 100644
index d39aeb1f347..0475980a109 100644
--- a/dlls/vcomp110/vcomp110.spec
+++ b/dlls/vcomp110/vcomp110.spec
@@ -57,9 +57,9 @@
@@ -240,17 +195,8 @@ index e1cb8ab9931..d8b4d3e3f16 100644
@ cdecl _vcomp_for_static_end()
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr)
@ cdecl _vcomp_for_static_init_i8(int64 int64 int64 int64 ptr ptr ptr ptr ptr)
@@ -97,7 +97,7 @@
@ cdecl omp_get_num_procs()
@ cdecl omp_get_num_threads()
@ cdecl omp_get_thread_num()
-@ stub omp_get_wtick
+@ cdecl omp_get_wtick() vcomp.omp_get_wtick
@ cdecl omp_get_wtime()
@ cdecl omp_in_parallel()
@ cdecl omp_init_lock(ptr)
diff --git a/dlls/vcomp120/vcomp120.spec b/dlls/vcomp120/vcomp120.spec
index e1cb8ab9931..d8b4d3e3f16 100644
index d39aeb1f347..0475980a109 100644
--- a/dlls/vcomp120/vcomp120.spec
+++ b/dlls/vcomp120/vcomp120.spec
@@ -57,9 +57,9 @@
@@ -265,17 +211,8 @@ index e1cb8ab9931..d8b4d3e3f16 100644
@ cdecl _vcomp_for_static_end()
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr)
@ cdecl _vcomp_for_static_init_i8(int64 int64 int64 int64 ptr ptr ptr ptr ptr)
@@ -97,7 +97,7 @@
@ cdecl omp_get_num_procs()
@ cdecl omp_get_num_threads()
@ cdecl omp_get_thread_num()
-@ stub omp_get_wtick
+@ cdecl omp_get_wtick() vcomp.omp_get_wtick
@ cdecl omp_get_wtime()
@ cdecl omp_in_parallel()
@ cdecl omp_init_lock(ptr)
diff --git a/dlls/vcomp140/vcomp140.spec b/dlls/vcomp140/vcomp140.spec
index e1cb8ab9931..d8b4d3e3f16 100644
index d39aeb1f347..0475980a109 100644
--- a/dlls/vcomp140/vcomp140.spec
+++ b/dlls/vcomp140/vcomp140.spec
@@ -57,9 +57,9 @@
@@ -290,17 +227,8 @@ index e1cb8ab9931..d8b4d3e3f16 100644
@ cdecl _vcomp_for_static_end()
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr)
@ cdecl _vcomp_for_static_init_i8(int64 int64 int64 int64 ptr ptr ptr ptr ptr)
@@ -97,7 +97,7 @@
@ cdecl omp_get_num_procs()
@ cdecl omp_get_num_threads()
@ cdecl omp_get_thread_num()
-@ stub omp_get_wtick
+@ cdecl omp_get_wtick() vcomp.omp_get_wtick
@ cdecl omp_get_wtime()
@ cdecl omp_in_parallel()
@ cdecl omp_init_lock(ptr)
diff --git a/dlls/vcomp90/vcomp90.spec b/dlls/vcomp90/vcomp90.spec
index 9fac400ea0e..563f5391ed9 100644
index a751e0b3da4..563f5391ed9 100644
--- a/dlls/vcomp90/vcomp90.spec
+++ b/dlls/vcomp90/vcomp90.spec
@@ -56,9 +56,9 @@
@@ -315,15 +243,6 @@ index 9fac400ea0e..563f5391ed9 100644
@ cdecl _vcomp_for_static_end() vcomp._vcomp_for_static_end
@ cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr) vcomp._vcomp_for_static_init
@ cdecl _vcomp_for_static_init_i8(int64 int64 int64 int64 ptr ptr ptr ptr ptr) vcomp._vcomp_for_static_init_i8
@@ -96,7 +96,7 @@
@ cdecl omp_get_num_procs() vcomp.omp_get_num_procs
@ cdecl omp_get_num_threads() vcomp.omp_get_num_threads
@ cdecl omp_get_thread_num() vcomp.omp_get_thread_num
-@ stub omp_get_wtick
+@ cdecl omp_get_wtick() vcomp.omp_get_wtick
@ cdecl omp_get_wtime() vcomp.omp_get_wtime
@ cdecl omp_in_parallel() vcomp.omp_in_parallel
@ cdecl omp_init_lock(ptr) vcomp.omp_init_lock
--
2.43.0
2.51.0