diff --git a/patches/ntdll-Junction_Points/0019-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch b/patches/ntdll-Junction_Points/0019-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch deleted file mode 100644 index c4eba389..00000000 --- a/patches/ntdll-Junction_Points/0019-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch +++ /dev/null @@ -1,539 +0,0 @@ -From 14e979a3f3623a580b592ebaff952445307b87c5 Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Wed, 13 Mar 2019 16:02:05 -0600 -Subject: [PATCH] kernel32: Implement CreateSymbolicLink[A|W] with ntdll - reparse points. - -Signed-off-by: Erich E. Hoover ---- - dlls/kernel32/path.c | 12 +++- - dlls/kernel32/tests/path.c | 94 ++++++++++++++++++++++++++++++ - dlls/kernelbase/file.c | 103 ++++++++++++++++++++++++++++++++- - dlls/msvcp120/tests/msvcp120.c | 75 +++++++++++------------- - dlls/msvcp140/tests/msvcp140.c | 63 +++++++++----------- - 5 files changed, 266 insertions(+), 81 deletions(-) - -diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c -index f4bdc08b87e..49c4c6437a8 100644 ---- a/dlls/kernel32/path.c -+++ b/dlls/kernel32/path.c -@@ -463,8 +463,16 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str ) - */ - BOOLEAN WINAPI CreateSymbolicLinkA(LPCSTR link, LPCSTR target, DWORD flags) - { -- FIXME("(%s %s %ld): stub\n", debugstr_a(link), debugstr_a(target), flags); -- return TRUE; -+ WCHAR *linkW, *targetW; -+ BOOL ret; -+ -+ if (!(linkW = FILE_name_AtoW( link, FALSE ))) return FALSE; -+ if (!(targetW = FILE_name_AtoW( target, TRUE ))) return FALSE; -+ -+ ret = CreateSymbolicLinkW( linkW, targetW, flags ); -+ -+ HeapFree( GetProcessHeap(), 0, targetW ); -+ return ret; - } - - /************************************************************************* -diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c -index 7e122780602..2ce175e1749 100644 ---- a/dlls/kernel32/tests/path.c -+++ b/dlls/kernel32/tests/path.c -@@ -83,6 +83,9 @@ static NTSTATUS (WINAPI *pLdrGetDllPath)(LPCWSTR,ULONG,LPWSTR*,LPWSTR*); - static BOOL (WINAPI *pCheckNameLegalDOS8Dot3W)(const WCHAR *, char *, DWORD, BOOL *, BOOL *); - static BOOL (WINAPI *pCheckNameLegalDOS8Dot3A)(const char *, char *, DWORD, BOOL *, BOOL *); - -+/* Present in Vista+ */ -+static BOOL (WINAPI *pCreateSymbolicLinkW)(LPCWSTR, LPCWSTR, DWORD); -+ - /* a structure to deal with wine todos somewhat cleanly */ - typedef struct { - DWORD shortlen; -@@ -2106,6 +2109,7 @@ static void init_pointers(void) - MAKEFUNC(SetDefaultDllDirectories); - MAKEFUNC(CheckNameLegalDOS8Dot3W); - MAKEFUNC(CheckNameLegalDOS8Dot3A); -+ MAKEFUNC(CreateSymbolicLinkW); - mod = GetModuleHandleA("ntdll.dll"); - MAKEFUNC(LdrGetDllPath); - MAKEFUNC(RtlGetExePath); -@@ -2691,6 +2695,95 @@ static void test_LdrGetDllPath(void) - SetEnvironmentVariableW( pathW, old_path ); - } - -+static void test_CreateSymbolicLink(void) -+{ -+ static const WCHAR target_fileW[] = {'t','a','r','g','e','t','_','f','i','l','e',0}; -+ static const WCHAR target_dirW[] = {'t','a','r','g','e','t','_','d','i','r',0}; -+ static const WCHAR linkW[] = {'l','i','n','k',0}; -+ static const WCHAR fooW[] = {'f','o','o',0}; -+ static WCHAR volW[] = {'c',':','\\',0}; -+ static const WCHAR dotW[] = {'.',0}; -+ WCHAR path[MAX_PATH], old_path[MAX_PATH], tmp[MAX_PATH]; -+ DWORD dwLen, dwFlags; -+ TOKEN_PRIVILEGES tp; -+ HANDLE token; -+ LUID luid; -+ BOOL bret; -+ HANDLE h; -+ -+ if (!pCreateSymbolicLinkW) -+ { -+ win_skip( "CreateSymbolicLink isn't available\n" ); -+ return; -+ } -+ -+ /* Create a temporary folder for the symlink tests */ -+ GetTempFileNameW( dotW, fooW, 0, path ); -+ DeleteFileW( path ); -+ if (!CreateDirectoryW( path, NULL )) -+ { -+ win_skip("Unable to create a temporary reparse point directory.\n"); -+ return; -+ } -+ GetCurrentDirectoryW( sizeof(old_path)/sizeof(WCHAR), old_path ); -+ SetCurrentDirectoryW( path ); -+ -+ /* Check that the volume this folder is located on supports reparse points */ -+ GetFullPathNameW( path, sizeof(tmp)/sizeof(WCHAR), tmp, NULL ); -+ volW[0] = tmp[0]; -+ GetVolumeInformationW( volW, 0, 0, 0, &dwLen, &dwFlags, 0, 0 ); -+ if (!(dwFlags & FILE_SUPPORTS_REPARSE_POINTS)) -+ { -+ skip("File system does not support reparse points.\n"); -+ goto cleanup; -+ } -+ -+ /* Establish permissions for symlink creation */ -+ bret = OpenProcessToken( GetCurrentProcess(), TOKEN_ALL_ACCESS, &token ); -+ ok(bret, "OpenProcessToken failed: %ld\n", GetLastError()); -+ bret = LookupPrivilegeValueA( NULL, "SeCreateSymbolicLinkPrivilege", &luid ); -+ todo_wine ok(bret || broken(!bret && GetLastError() == ERROR_NO_SUCH_PRIVILEGE) /* winxp */, -+ "LookupPrivilegeValue failed: %lu\n", GetLastError()); -+ if (bret) -+ { -+ tp.PrivilegeCount = 1; -+ tp.Privileges[0].Luid = luid; -+ tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; -+ bret = AdjustTokenPrivileges( token, FALSE, &tp, 0, NULL, NULL ); -+ ok(bret, "AdjustTokenPrivileges failed: %ld\n", GetLastError()); -+ } -+ if ((!bret && GetLastError() != ERROR_NO_SUCH_PRIVILEGE) || GetLastError() == ERROR_NOT_ALL_ASSIGNED) -+ { -+ win_skip("Insufficient permissions to perform symlink tests.\n"); -+ goto cleanup; -+ } -+ -+ /* Create a destination folder and file for symlinks to target */ -+ bret = CreateDirectoryW( target_dirW, NULL ); -+ ok(bret, "Failed to create symlink target directory.\n"); -+ h = CreateFileW( target_fileW, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); -+ ok(h != INVALID_HANDLE_VALUE, "Failed to create symlink target file.\n"); -+ CloseHandle( h ); -+ -+ /* Create a directory symbolic link */ -+ bret = CreateSymbolicLinkW( linkW, target_dirW, SYMBOLIC_LINK_FLAG_DIRECTORY ); -+ ok(bret, "Failed to create directory symbolic link! (0x%lx)\n", GetLastError()); -+ bret = RemoveDirectoryW( linkW ); -+ ok(bret, "Failed to remove directory symbolic link! (0x%lx)\n", GetLastError()); -+ -+ /* Create a file symbolic link */ -+ bret = CreateSymbolicLinkW( linkW, target_fileW, 0x0 ); -+ ok(bret, "Failed to create file symbolic link! (0x%lx)\n", GetLastError()); -+ bret = DeleteFileW( linkW ); -+ ok(bret, "Failed to remove file symbolic link! (0x%lx)\n", GetLastError()); -+ -+cleanup: -+ DeleteFileW( target_fileW ); -+ RemoveDirectoryW( target_dirW ); -+ SetCurrentDirectoryW( old_path ); -+ RemoveDirectoryW( path ); -+} -+ - START_TEST(path) - { - CHAR origdir[MAX_PATH],curdir[MAX_PATH], curDrive, otherDrive; -@@ -2720,4 +2813,5 @@ START_TEST(path) - test_RtlGetSearchPath(); - test_RtlGetExePath(); - test_LdrGetDllPath(); -+ test_CreateSymbolicLink(); - } -diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c -index 2c261e0f57d..562440f4f8b 100644 ---- a/dlls/kernelbase/file.c -+++ b/dlls/kernelbase/file.c -@@ -37,6 +37,7 @@ - #include "ddk/ntddk.h" - #include "ddk/ntddser.h" - #include "ioringapi.h" -+#include "ddk/ntifs.h" - - #include "kernelbase.h" - #include "wine/exception.h" -@@ -946,8 +947,106 @@ done: - */ - BOOLEAN WINAPI /* DECLSPEC_HOTPATCH */ CreateSymbolicLinkW( LPCWSTR link, LPCWSTR target, DWORD flags ) - { -- FIXME( "(%s %s %ld): stub\n", debugstr_w(link), debugstr_w(target), flags ); -- return TRUE; -+ static INT struct_size = offsetof(REPARSE_DATA_BUFFER, SymbolicLinkReparseBuffer.PathBuffer[0]); -+ static INT header_size = offsetof(REPARSE_DATA_BUFFER, GenericReparseBuffer); -+ INT buffer_size, data_size, string_len, prefix_len; -+ WCHAR *subst_dest, *print_dest, *string; -+ REPARSE_DATA_BUFFER *buffer; -+ LPWSTR target_path = NULL; -+ BOOL is_relative, is_dir; -+ int target_path_len = 0; -+ UNICODE_STRING nt_name; -+ BOOLEAN bret = FALSE; -+ NTSTATUS status; -+ HANDLE hlink; -+ DWORD dwret; -+ -+ TRACE( "(%s %s %ld): stub\n", debugstr_w(link), debugstr_w(target), flags ); -+ -+ is_relative = (RtlDetermineDosPathNameType_U( target ) == RtlPathTypeRelative); -+ is_dir = (flags & SYMBOLIC_LINK_FLAG_DIRECTORY); -+ if (is_dir && !CreateDirectoryW( link, NULL )) -+ return FALSE; -+ hlink = CreateFileW( link, GENERIC_READ | GENERIC_WRITE, 0, 0, -+ is_dir ? OPEN_EXISTING : CREATE_NEW, -+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0 ); -+ if (hlink == INVALID_HANDLE_VALUE) -+ goto cleanup; -+ if (is_relative) -+ { -+ UNICODE_STRING nt_path; -+ int len; -+ -+ status = RtlDosPathNameToNtPathName_U_WithStatus( link, &nt_path, NULL, NULL ); -+ if (status != STATUS_SUCCESS) -+ { -+ SetLastError( RtlNtStatusToDosError(status) ); -+ goto cleanup; -+ } -+ /* obtain the path of the link */ -+ for (; nt_path.Length > 0; nt_path.Length -= sizeof(WCHAR)) -+ { -+ WCHAR c = nt_path.Buffer[nt_path.Length/sizeof(WCHAR)]; -+ if (c == '/' || c == '\\') -+ { -+ nt_path.Length += sizeof(WCHAR); -+ break; -+ } -+ } -+ /* append the target to the link path */ -+ target_path_len = nt_path.Length / sizeof(WCHAR); -+ len = target_path_len + (lstrlenW( target ) + 1); -+ target_path = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR) ); -+ lstrcpynW( target_path, nt_path.Buffer, target_path_len+1 ); -+ target_path[target_path_len+1] = 0; -+ lstrcatW( target_path, target ); -+ RtlFreeUnicodeString( &nt_path ); -+ } -+ else -+ target_path = (LPWSTR)target; -+ status = RtlDosPathNameToNtPathName_U_WithStatus( target_path, &nt_name, NULL, NULL ); -+ if (status != STATUS_SUCCESS) -+ { -+ SetLastError( RtlNtStatusToDosError(status) ); -+ goto cleanup; -+ } -+ if (is_relative && _wcsnicmp( target_path, nt_name.Buffer, target_path_len ) != 0) -+ { -+ SetLastError( RtlNtStatusToDosError(status) ); -+ goto cleanup; -+ } -+ prefix_len = is_relative ? 0 : strlen("\\??\\"); -+ string = &nt_name.Buffer[target_path_len]; -+ string_len = lstrlenW( &string[prefix_len] ); -+ data_size = (prefix_len + 2 * string_len + 2) * sizeof(WCHAR); -+ buffer_size = struct_size + data_size; -+ buffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, buffer_size ); -+ buffer->ReparseTag = IO_REPARSE_TAG_SYMLINK; -+ buffer->ReparseDataLength = struct_size - header_size + data_size; -+ buffer->SymbolicLinkReparseBuffer.SubstituteNameLength = (prefix_len + string_len) * sizeof(WCHAR); -+ buffer->SymbolicLinkReparseBuffer.PrintNameOffset = (prefix_len + string_len + 1) * sizeof(WCHAR); -+ buffer->SymbolicLinkReparseBuffer.PrintNameLength = string_len * sizeof(WCHAR); -+ buffer->SymbolicLinkReparseBuffer.Flags = is_relative ? SYMLINK_FLAG_RELATIVE : 0; -+ subst_dest = &buffer->SymbolicLinkReparseBuffer.PathBuffer[0]; -+ print_dest = &buffer->SymbolicLinkReparseBuffer.PathBuffer[prefix_len + string_len + 1]; -+ lstrcpyW( subst_dest, string ); -+ lstrcpyW( print_dest, &string[prefix_len] ); -+ RtlFreeUnicodeString( &nt_name ); -+ bret = DeviceIoControl( hlink, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_size, NULL, 0, -+ &dwret, 0 ); -+ HeapFree( GetProcessHeap(), 0, buffer ); -+ -+cleanup: -+ CloseHandle( hlink ); -+ if (!bret) -+ { -+ if (is_dir) -+ RemoveDirectoryW( link ); -+ else -+ DeleteFileW( link ); -+ } -+ if (is_relative) HeapFree( GetProcessHeap(), 0, target_path ); -+ return bret; - } - - -diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c -index 44c0a3f0fe0..e5561636584 100644 ---- a/dlls/msvcp120/tests/msvcp120.c -+++ b/dlls/msvcp120/tests/msvcp120.c -@@ -1613,15 +1613,14 @@ static void test_tr2_sys__Stat(void) - char const *path; - enum file_type ret; - int err_code; -- int is_todo; - } tests[] = { -- { NULL, status_unknown, ERROR_INVALID_PARAMETER, FALSE }, -- { "tr2_test_dir", directory_file, ERROR_SUCCESS, FALSE }, -- { "tr2_test_dir\\f1", regular_file, ERROR_SUCCESS, FALSE }, -- { "tr2_test_dir\\not_exist_file ", file_not_found, ERROR_SUCCESS, FALSE }, -- { "tr2_test_dir\\??invalid_name>>", file_not_found, ERROR_SUCCESS, FALSE }, -- { "tr2_test_dir\\f1_link" , regular_file, ERROR_SUCCESS, TRUE }, -- { "tr2_test_dir\\dir_link", directory_file, ERROR_SUCCESS, TRUE }, -+ { NULL, status_unknown, ERROR_INVALID_PARAMETER }, -+ { "tr2_test_dir", directory_file, ERROR_SUCCESS }, -+ { "tr2_test_dir\\f1", regular_file, ERROR_SUCCESS }, -+ { "tr2_test_dir\\not_exist_file ", file_not_found, ERROR_SUCCESS }, -+ { "tr2_test_dir\\??invalid_name>>", file_not_found, ERROR_SUCCESS }, -+ { "tr2_test_dir\\f1_link" , regular_file, ERROR_SUCCESS }, -+ { "tr2_test_dir\\dir_link", directory_file, ERROR_SUCCESS }, - }; - - CreateDirectoryA("tr2_test_dir", NULL); -@@ -1664,16 +1663,14 @@ static void test_tr2_sys__Stat(void) - for(i=0; i>", file_not_found, 0xdeadbeef, FALSE }, -- { L"wine_test_dir\\f1_link", regular_file, 0777, TRUE }, -- { L"wine_test_dir\\dir_link", directory_file, 0777, TRUE }, -+ { NULL, file_not_found, 0xdeadbeef }, -+ { L"wine_test_dir", directory_file, 0777 }, -+ { L"wine_test_dir/f1", regular_file, 0777 }, -+ { L"wine_test_dir/f2", regular_file, 0555 }, -+ { L"wine_test_dir/ne", file_not_found, 0xdeadbeef }, -+ { L"wine_test_dir\\??invalid_name>>", file_not_found, 0xdeadbeef }, -+ { L"wine_test_dir\\f1_link", regular_file, 0777 }, -+ { L"wine_test_dir\\dir_link", directory_file, 0777 }, - }; - - GetCurrentDirectoryW(MAX_PATH, origin_path); -@@ -924,26 +923,20 @@ static void test_Stat(void) - for(i=0; i -Date: Wed, 29 May 2019 15:11:42 -0600 -Subject: kernel32: Add reparse support to FindNextFile. - -Signed-off-by: Erich E. Hoover ---- - 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 - diff --git a/patches/user32-LR_LOADFROMFILE/0001-user32-Add-a-workaround-for-Windows-3.1-apps-which-c.patch b/patches/user32-LR_LOADFROMFILE/0001-user32-Add-a-workaround-for-Windows-3.1-apps-which-c.patch deleted file mode 100644 index 5562f6ae..00000000 --- a/patches/user32-LR_LOADFROMFILE/0001-user32-Add-a-workaround-for-Windows-3.1-apps-which-c.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0eda0c4092b0673e4b4e646388c53e2a8ecc2379 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -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 - diff --git a/patches/user32-LR_LOADFROMFILE/definition b/patches/user32-LR_LOADFROMFILE/definition deleted file mode 100644 index 2a5c2dde..00000000 --- a/patches/user32-LR_LOADFROMFILE/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [24963] Workaround for Windows 3.1 apps which call LoadImage(LR_LOADFROMFILE) with a resource id diff --git a/patches/vcomp_for_dynamic_init_i8/0001-vcomp-Implement-_vcomp_for_dynamic_init_i8.patch b/patches/vcomp_for_dynamic_init_i8/0001-vcomp-Implement-_vcomp_for_dynamic_init_i8.patch index e476c2e0..b72e11df 100644 --- a/patches/vcomp_for_dynamic_init_i8/0001-vcomp-Implement-_vcomp_for_dynamic_init_i8.patch +++ b/patches/vcomp_for_dynamic_init_i8/0001-vcomp-Implement-_vcomp_for_dynamic_init_i8.patch @@ -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 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 diff --git a/staging/upstream-commit b/staging/upstream-commit index 4053f6e3..4ed0a8e8 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -8bbc65df51c7c62c9b62a7b92bfd288ba51a2d8f +f41f67806b9d630e7fbb0e31e3a166e84212dc9b