From 5b07326368816581c4adf478569f398366fc270a Mon Sep 17 00:00:00 2001 From: YongHao Hu Date: Mon, 10 Aug 2015 14:46:32 +0800 Subject: [PATCH] msvcp110: Add tr2_sys__Remove_dir_wchar implementation and test. --- dlls/msvcp110/msvcp110.spec | 4 ++-- dlls/msvcp120/msvcp120.spec | 4 ++-- dlls/msvcp120/tests/msvcp120.c | 11 ++++++++--- dlls/msvcp120_app/msvcp120_app.spec | 4 ++-- dlls/msvcp90/ios.c | 8 ++++++++ 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index c1c6212735d..fb22ca11847 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -1720,8 +1720,8 @@ @ stub -arch=win64 ?_Release@_Pad@std@@QEAAXXZ @ cdecl -arch=win32 ?_Remove_dir@sys@tr2@std@@YA_NPBD@Z(str) tr2_sys__Remove_dir @ cdecl -arch=win64 ?_Remove_dir@sys@tr2@std@@YA_NPEBD@Z(str) tr2_sys__Remove_dir -@ stub -arch=win32 ?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z -@ stub -arch=win64 ?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z +@ cdecl -arch=win32 ?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z(wstr) tr2_sys__Remove_dir_wchar +@ cdecl -arch=win64 ?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z(wstr) tr2_sys__Remove_dir_wchar @ cdecl -arch=win32 ?_Rename@sys@tr2@std@@YAHPBD0@Z(str str) tr2_sys__Rename @ cdecl -arch=win64 ?_Rename@sys@tr2@std@@YAHPEBD0@Z(str str) tr2_sys__Rename @ stub -arch=win32 ?_Rename@sys@tr2@std@@YAHPB_W0@Z diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec index e990eaf85c7..8a7b6d72777 100644 --- a/dlls/msvcp120/msvcp120.spec +++ b/dlls/msvcp120/msvcp120.spec @@ -1681,8 +1681,8 @@ @ stub -arch=win64 ?_Release@_Pad@std@@QEAAXXZ @ cdecl -arch=win32 ?_Remove_dir@sys@tr2@std@@YA_NPBD@Z(str) tr2_sys__Remove_dir @ cdecl -arch=win64 ?_Remove_dir@sys@tr2@std@@YA_NPEBD@Z(str) tr2_sys__Remove_dir -@ stub -arch=win32 ?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z -@ stub -arch=win64 ?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z +@ cdecl -arch=win32 ?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z(wstr) tr2_sys__Remove_dir_wchar +@ cdecl -arch=win64 ?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z(wstr) tr2_sys__Remove_dir_wchar @ cdecl -arch=win32 ?_Rename@sys@tr2@std@@YAHPBD0@Z(str str) tr2_sys__Rename @ cdecl -arch=win64 ?_Rename@sys@tr2@std@@YAHPEBD0@Z(str str) tr2_sys__Rename @ stub -arch=win32 ?_Rename@sys@tr2@std@@YAHPB_W0@Z diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index 85e9354f1a7..6bbe11e1f48 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -83,6 +83,7 @@ static MSVCP_bool (__cdecl *p_tr2_sys__Current_set_wchar)(WCHAR const*); static int (__cdecl *p_tr2_sys__Make_dir)(char const*); static int (__cdecl *p_tr2_sys__Make_dir_wchar)(WCHAR const*); static MSVCP_bool (__cdecl *p_tr2_sys__Remove_dir)(char const*); +static MSVCP_bool (__cdecl *p_tr2_sys__Remove_dir_wchar)(WCHAR const*); static int (__cdecl *p_tr2_sys__Copy_file)(char const*, char const*, MSVCP_bool); static int (__cdecl *p_tr2_sys__Rename)(char const*, char const*); static struct space_info (__cdecl *p_tr2_sys__Statvfs)(char const*); @@ -138,6 +139,8 @@ static BOOL init(void) "?_Make_dir@sys@tr2@std@@YAHPEB_W@Z"); SET(p_tr2_sys__Remove_dir, "?_Remove_dir@sys@tr2@std@@YA_NPEBD@Z"); + SET(p_tr2_sys__Remove_dir_wchar, + "?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z"); SET(p_tr2_sys__Copy_file, "?_Copy_file@sys@tr2@std@@YAHPEBD0_N@Z"); SET(p_tr2_sys__Rename, @@ -171,6 +174,8 @@ static BOOL init(void) "?_Make_dir@sys@tr2@std@@YAHPB_W@Z"); SET(p_tr2_sys__Remove_dir, "?_Remove_dir@sys@tr2@std@@YA_NPBD@Z"); + SET(p_tr2_sys__Remove_dir_wchar, + "?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z"); SET(p_tr2_sys__Copy_file, "?_Copy_file@sys@tr2@std@@YAHPBD0_N@Z"); SET(p_tr2_sys__Rename, @@ -427,7 +432,7 @@ static void test_tr2_sys__File_size(void) ok(DeleteFileA("tr2_test_dir/f1"), "expect tr2_test_dir/f1 to exist\n"); ok(DeleteFileA("tr2_test_dir/f2"), "expect tr2_test_dir/f2 to exist\n"); - ok(RemoveDirectoryA("tr2_test_dir"), "expect tr2_test_dir to exist\n"); + ok(p_tr2_sys__Remove_dir("tr2_test_dir"), "expect tr2_test_dir to exist\n"); } static void test_tr2_sys__Equivalent(void) @@ -586,8 +591,8 @@ static void test_tr2_sys__Make_dir(void) ret = p_tr2_sys__Make_dir_wchar(testW); ok(ret == 1, "tr2_sys__Make_dir(): expect: 1, got %d\n", ret); - ok(RemoveDirectoryA("tr2_test_dir"), "expect tr2_test_dir to exist\n"); - ok(RemoveDirectoryW(testW), "expect wd to exist\n"); + ok(p_tr2_sys__Remove_dir("tr2_test_dir"), "expect tr2_test_dir to exist\n"); + ok(p_tr2_sys__Remove_dir_wchar(testW), "expect wd to exist\n"); } static void test_tr2_sys__Remove_dir(void) diff --git a/dlls/msvcp120_app/msvcp120_app.spec b/dlls/msvcp120_app/msvcp120_app.spec index b20d507827b..d05b3d4f890 100644 --- a/dlls/msvcp120_app/msvcp120_app.spec +++ b/dlls/msvcp120_app/msvcp120_app.spec @@ -1681,8 +1681,8 @@ @ stub -arch=win64 ?_Release@_Pad@std@@QEAAXXZ @ cdecl -arch=win32 ?_Remove_dir@sys@tr2@std@@YA_NPBD@Z(str) msvcp120.?_Remove_dir@sys@tr2@std@@YA_NPBD@Z @ cdecl -arch=win64 ?_Remove_dir@sys@tr2@std@@YA_NPEBD@Z(str) msvcp120.?_Remove_dir@sys@tr2@std@@YA_NPEBD@Z -@ stub -arch=win32 ?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z -@ stub -arch=win64 ?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z +@ cdecl -arch=win32 ?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z(wstr) msvcp120.?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z +@ cdecl -arch=win64 ?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z(wstr) msvcp120.?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z @ cdecl -arch=win32 ?_Rename@sys@tr2@std@@YAHPBD0@Z(str str) msvcp120.?_Rename@sys@tr2@std@@YAHPBD0@Z @ cdecl -arch=win64 ?_Rename@sys@tr2@std@@YAHPEBD0@Z(str str) msvcp120.?_Rename@sys@tr2@std@@YAHPEBD0@Z @ stub -arch=win32 ?_Rename@sys@tr2@std@@YAHPB_W0@Z diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index c01d1875639..88d64539f18 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -14825,6 +14825,14 @@ int __cdecl tr2_sys__Make_dir_wchar(WCHAR const* path) return 1; } +/* ?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z */ +/* ?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z */ +MSVCP_bool __cdecl tr2_sys__Remove_dir_wchar(WCHAR const* path) +{ + TRACE("(%s)\n", debugstr_w(path)); + return RemoveDirectoryW(path) != 0; +} + /* ??1_Winit@std@@QAE@XZ */ /* ??1_Winit@std@@QAE@XZ */ DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)