You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against b253bd65658fe7dde8e50d7f7e6930cd215282df.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 8af2ae9864c4a94b2db9a12283fe5ddee6cb26c8 Mon Sep 17 00:00:00 2001
|
||||
From bec0c81d2917427c8cdc22fea8f5db86157bccf8 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 13 Mar 2019 16:02:05 -0600
|
||||
Subject: [PATCH] kernel32: Implement CreateSymbolicLink[A|W] with ntdll
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
4 files changed, 277 insertions(+), 81 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index a369ca90120..0b7202ef961 100644
|
||||
index 849be11d2..bc30e03b0 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -34,6 +34,8 @@
|
||||
@@ -25,7 +25,7 @@ index a369ca90120..0b7202ef961 100644
|
||||
|
||||
#include "kernel_private.h"
|
||||
#include "wine/unicode.h"
|
||||
@@ -924,8 +926,106 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str )
|
||||
@@ -926,8 +928,106 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str )
|
||||
*/
|
||||
BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags)
|
||||
{
|
||||
@@ -134,7 +134,7 @@ index a369ca90120..0b7202ef961 100644
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -933,8 +1033,24 @@ BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags)
|
||||
@@ -935,8 +1035,24 @@ BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags)
|
||||
*/
|
||||
BOOLEAN WINAPI CreateSymbolicLinkA(LPCSTR link, LPCSTR target, DWORD flags)
|
||||
{
|
||||
@@ -162,10 +162,10 @@ index a369ca90120..0b7202ef961 100644
|
||||
|
||||
/*************************************************************************
|
||||
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
|
||||
index 71577793b0b..11b5ea35f0a 100644
|
||||
index 7342a865a..78a2e2e06 100644
|
||||
--- a/dlls/kernel32/tests/path.c
|
||||
+++ b/dlls/kernel32/tests/path.c
|
||||
@@ -92,6 +92,9 @@ static void (WINAPI *pReleaseActCtx)(HANDLE);
|
||||
@@ -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 *);
|
||||
|
||||
@@ -175,8 +175,8 @@ index 71577793b0b..11b5ea35f0a 100644
|
||||
/* a structure to deal with wine todos somewhat cleanly */
|
||||
typedef struct {
|
||||
DWORD shortlen;
|
||||
@@ -2217,11 +2220,14 @@ static void init_pointers(void)
|
||||
MAKEFUNC(ReleaseActCtx);
|
||||
@@ -2147,11 +2150,14 @@ static void init_pointers(void)
|
||||
MAKEFUNC(SetDefaultDllDirectories);
|
||||
MAKEFUNC(CheckNameLegalDOS8Dot3W);
|
||||
MAKEFUNC(CheckNameLegalDOS8Dot3A);
|
||||
+ MAKEFUNC(CreateSymbolicLinkW);
|
||||
@@ -190,7 +190,7 @@ index 71577793b0b..11b5ea35f0a 100644
|
||||
#undef MAKEFUNC
|
||||
}
|
||||
|
||||
@@ -2744,6 +2750,95 @@ static void test_LdrGetDllPath(void)
|
||||
@@ -2672,6 +2678,95 @@ static void test_LdrGetDllPath(void)
|
||||
SetEnvironmentVariableW( pathW, old_path );
|
||||
}
|
||||
|
||||
@@ -286,17 +286,17 @@ index 71577793b0b..11b5ea35f0a 100644
|
||||
START_TEST(path)
|
||||
{
|
||||
CHAR origdir[MAX_PATH],curdir[MAX_PATH], curDrive, otherDrive;
|
||||
@@ -2781,4 +2876,5 @@ START_TEST(path)
|
||||
@@ -2701,4 +2796,5 @@ START_TEST(path)
|
||||
test_RtlGetSearchPath();
|
||||
test_RtlGetExePath();
|
||||
test_LdrGetDllPath();
|
||||
+ test_CreateSymbolicLink();
|
||||
}
|
||||
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
|
||||
index d484cdd7ed7..7aca5703ab9 100644
|
||||
index 7a382ac6f..9775ef5e1 100644
|
||||
--- a/dlls/msvcp120/tests/msvcp120.c
|
||||
+++ b/dlls/msvcp120/tests/msvcp120.c
|
||||
@@ -1625,15 +1625,14 @@ static void test_tr2_sys__Stat(void)
|
||||
@@ -1615,15 +1615,14 @@ static void test_tr2_sys__Stat(void)
|
||||
char const *path;
|
||||
enum file_type ret;
|
||||
int err_code;
|
||||
@@ -319,7 +319,7 @@ index d484cdd7ed7..7aca5703ab9 100644
|
||||
};
|
||||
WCHAR testW[] = {'t','r','2','_','t','e','s','t','_','d','i','r',0};
|
||||
WCHAR testW2[] = {'t','r','2','_','t','e','s','t','_','d','i','r','/','f','1',0};
|
||||
@@ -1678,16 +1677,14 @@ static void test_tr2_sys__Stat(void)
|
||||
@@ -1668,16 +1667,14 @@ static void test_tr2_sys__Stat(void)
|
||||
for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||
err_code = 0xdeadbeef;
|
||||
val = p_tr2_sys__Stat(tests[i].path, &err_code);
|
||||
@@ -338,7 +338,7 @@ index d484cdd7ed7..7aca5703ab9 100644
|
||||
ok(tests[i].err_code == err_code, "tr2_sys__Lstat(): test %d err_code expect: %d, got %d\n",
|
||||
i+1, tests[i].err_code, err_code);
|
||||
}
|
||||
@@ -1702,8 +1699,8 @@ static void test_tr2_sys__Stat(void)
|
||||
@@ -1692,8 +1689,8 @@ static void test_tr2_sys__Stat(void)
|
||||
ok(ERROR_SUCCESS == err_code, "tr2_sys__Lstat_wchar(): err_code expect ERROR_SUCCESS, got %d\n", err_code);
|
||||
|
||||
if(ret) {
|
||||
@@ -349,7 +349,7 @@ index d484cdd7ed7..7aca5703ab9 100644
|
||||
}
|
||||
ok(DeleteFileA("tr2_test_dir/f1"), "expect tr2_test_dir/f1 to exist\n");
|
||||
ok(RemoveDirectoryA("tr2_test_dir"), "expect tr2_test_dir to exist\n");
|
||||
@@ -1933,16 +1930,15 @@ static void test_tr2_sys__Symlink(void)
|
||||
@@ -1923,16 +1920,15 @@ static void test_tr2_sys__Symlink(void)
|
||||
char const *existing_path;
|
||||
char const *new_path;
|
||||
int last_error;
|
||||
@@ -374,7 +374,7 @@ index d484cdd7ed7..7aca5703ab9 100644
|
||||
};
|
||||
|
||||
ret = p_tr2_sys__Make_dir("tr2_test_dir");
|
||||
@@ -1967,18 +1963,17 @@ static void test_tr2_sys__Symlink(void)
|
||||
@@ -1957,18 +1953,17 @@ static void test_tr2_sys__Symlink(void)
|
||||
}
|
||||
|
||||
ok(errno == 0xdeadbeef, "tr2_sys__Symlink(): test %d errno expect 0xdeadbeef, got %d\n", i+1, errno);
|
||||
@@ -399,7 +399,7 @@ index d484cdd7ed7..7aca5703ab9 100644
|
||||
ret = p_tr2_sys__Remove_dir("tr2_test_dir");
|
||||
ok(ret == 1, "tr2_sys__Remove_dir(): expect 1 got %d\n", ret);
|
||||
}
|
||||
@@ -1992,15 +1987,14 @@ static void test_tr2_sys__Unlink(void)
|
||||
@@ -1982,15 +1977,14 @@ static void test_tr2_sys__Unlink(void)
|
||||
struct {
|
||||
char const *path;
|
||||
int last_error;
|
||||
@@ -422,7 +422,7 @@ index d484cdd7ed7..7aca5703ab9 100644
|
||||
};
|
||||
|
||||
GetCurrentDirectoryA(MAX_PATH, current_path);
|
||||
@@ -2029,9 +2023,8 @@ static void test_tr2_sys__Unlink(void)
|
||||
@@ -2019,9 +2013,8 @@ static void test_tr2_sys__Unlink(void)
|
||||
for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||
errno = 0xdeadbeef;
|
||||
ret = p_tr2_sys__Unlink(tests[i].path);
|
||||
@@ -435,7 +435,7 @@ index d484cdd7ed7..7aca5703ab9 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
|
||||
index 751b1beed86..382f5732c29 100644
|
||||
index 751b1beed..382f5732c 100644
|
||||
--- a/dlls/msvcp140/tests/msvcp140.c
|
||||
+++ b/dlls/msvcp140/tests/msvcp140.c
|
||||
@@ -803,16 +803,15 @@ static void test_Stat(void)
|
||||
@@ -545,5 +545,5 @@ index 751b1beed86..382f5732c29 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.25.0
|
||||
|
||||
|
Reference in New Issue
Block a user