Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/msvcp140/msvcp140.spec | 2 +- dlls/msvcp140/tests/msvcp140.c | 6 +++++- dlls/msvcp90/ios.c | 12 ++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec index a5b2bd40b2..70caad8dba 100644 --- a/dlls/msvcp140/msvcp140.spec +++ b/dlls/msvcp140/msvcp140.spec @@ -3638,7 +3638,7 @@ @ cdecl _Current_set(wstr) tr2_sys__Current_set_wchar @ extern _Denorm _Denorm @ cdecl _Dtest(ptr) _Dtest -@ cdecl _Equivalent(wstr wstr) tr2_sys__Equivalent_wchar +@ cdecl _Equivalent(wstr wstr) _Equivalent @ cdecl _Exp(ptr double long) _Exp @ stub _FCosh @ extern _FDenorm _FDenorm diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c index 04406240e0..8ad172495d 100644 --- a/dlls/msvcp140/tests/msvcp140.c +++ b/dlls/msvcp140/tests/msvcp140.c @@ -1400,7 +1400,6 @@ static void test_Equivalent(void) { f1W, NULL, 0 }, { f1W, wine_test_dirW, 0 }, { wine_test_dirW, f1W, 0 }, - { wine_test_dirW, wine_test_dirW, -1 }, { f1W_subdir, f2W, 0 }, { f1W, f1W, 1 }, { not_existW, f1W, 0 }, @@ -1429,6 +1428,11 @@ static void test_Equivalent(void) ok(errno == 0xdeadbeef, "errno = %d\n", errno); }
+ errno = 0xdeadbeef; + val = p_Equivalent(wine_test_dirW, wine_test_dirW); + ok(val == 1 || broken(val == -1), "_Equivalent() returned %d, expected %d\n", val, 1); + ok(errno == 0xdeadbeef, "errno = %d\n", errno); + ok(DeleteFileW(f1W), "expect wine_test_dir/f1 to exist\n"); ok(DeleteFileW(f2W), "expect wine_test_dir/f2 to exist\n"); ok(p_Remove_dir(wine_test_dirW), "expect wine_test_dir to exist\n"); diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index ceb3716180..52fa72d18a 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -15629,7 +15629,19 @@ int __cdecl tr2_sys__Equivalent_wchar(WCHAR const* path1, WCHAR const* path2) h2 = CreateFileW(path2, 0, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); return equivalent_handles(h1, h2); +} + +/* _Equivalent, msvcp140 version */ +int __cdecl _Equivalent(WCHAR const* path1, WCHAR const* path2) +{ + HANDLE h1, h2; + TRACE("(%s %s)\n", debugstr_w(path1), debugstr_w(path2));
+ h1 = CreateFileW(path1, 0, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); + h2 = CreateFileW(path2, 0, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); + return equivalent_handles(h1, h2); }
/* ?_Current_get@sys@tr2@std@@YAPA_WAAY0BAE@_W@Z */