YongHao Hu : msvcp110: Add tr2_sys__Remove_dir_wchar implementation and test.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 17 09:01:13 CDT 2015


Module: wine
Branch: master
Commit: 5b07326368816581c4adf478569f398366fc270a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5b07326368816581c4adf478569f398366fc270a

Author: YongHao Hu <christopherwuy at gmail.com>
Date:   Mon Aug 10 14:46:32 2015 +0800

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 c1c6212..fb22ca1 100644
--- a/dlls/msvcp110/msvcp110.spec
+++ b/dlls/msvcp110/msvcp110.spec
@@ -1720,8 +1720,8 @@
 @ stub -arch=win64 ?_Release at _Pad@std@@QEAAXXZ
 @ cdecl -arch=win32 ?_Remove_dir at sys@tr2 at std@@YA_NPBD at Z(str) tr2_sys__Remove_dir
 @ cdecl -arch=win64 ?_Remove_dir at sys@tr2 at std@@YA_NPEBD at Z(str) tr2_sys__Remove_dir
-@ stub -arch=win32 ?_Remove_dir at sys@tr2 at std@@YA_NPB_W at Z
-@ stub -arch=win64 ?_Remove_dir at sys@tr2 at std@@YA_NPEB_W at Z
+@ cdecl -arch=win32 ?_Remove_dir at sys@tr2 at std@@YA_NPB_W at Z(wstr) tr2_sys__Remove_dir_wchar
+@ cdecl -arch=win64 ?_Remove_dir at sys@tr2 at std@@YA_NPEB_W at Z(wstr) tr2_sys__Remove_dir_wchar
 @ cdecl -arch=win32 ?_Rename at sys@tr2 at std@@YAHPBD0 at Z(str str) tr2_sys__Rename
 @ cdecl -arch=win64 ?_Rename at sys@tr2 at std@@YAHPEBD0 at Z(str str) tr2_sys__Rename
 @ stub -arch=win32 ?_Rename at sys@tr2 at std@@YAHPB_W0 at Z
diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec
index e990eaf..8a7b6d7 100644
--- a/dlls/msvcp120/msvcp120.spec
+++ b/dlls/msvcp120/msvcp120.spec
@@ -1681,8 +1681,8 @@
 @ stub -arch=win64 ?_Release at _Pad@std@@QEAAXXZ
 @ cdecl -arch=win32 ?_Remove_dir at sys@tr2 at std@@YA_NPBD at Z(str) tr2_sys__Remove_dir
 @ cdecl -arch=win64 ?_Remove_dir at sys@tr2 at std@@YA_NPEBD at Z(str) tr2_sys__Remove_dir
-@ stub -arch=win32 ?_Remove_dir at sys@tr2 at std@@YA_NPB_W at Z
-@ stub -arch=win64 ?_Remove_dir at sys@tr2 at std@@YA_NPEB_W at Z
+@ cdecl -arch=win32 ?_Remove_dir at sys@tr2 at std@@YA_NPB_W at Z(wstr) tr2_sys__Remove_dir_wchar
+@ cdecl -arch=win64 ?_Remove_dir at sys@tr2 at std@@YA_NPEB_W at Z(wstr) tr2_sys__Remove_dir_wchar
 @ cdecl -arch=win32 ?_Rename at sys@tr2 at std@@YAHPBD0 at Z(str str) tr2_sys__Rename
 @ cdecl -arch=win64 ?_Rename at sys@tr2 at std@@YAHPEBD0 at Z(str str) tr2_sys__Rename
 @ stub -arch=win32 ?_Rename at sys@tr2 at std@@YAHPB_W0 at Z
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
index 85e9354..6bbe11e 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 at sys@tr2 at std@@YAHPEB_W at Z");
         SET(p_tr2_sys__Remove_dir,
                 "?_Remove_dir at sys@tr2 at std@@YA_NPEBD at Z");
+        SET(p_tr2_sys__Remove_dir_wchar,
+                "?_Remove_dir at sys@tr2 at std@@YA_NPEB_W at Z");
         SET(p_tr2_sys__Copy_file,
                 "?_Copy_file at sys@tr2 at std@@YAHPEBD0_N at Z");
         SET(p_tr2_sys__Rename,
@@ -171,6 +174,8 @@ static BOOL init(void)
                 "?_Make_dir at sys@tr2 at std@@YAHPB_W at Z");
         SET(p_tr2_sys__Remove_dir,
                 "?_Remove_dir at sys@tr2 at std@@YA_NPBD at Z");
+        SET(p_tr2_sys__Remove_dir_wchar,
+                "?_Remove_dir at sys@tr2 at std@@YA_NPB_W at Z");
         SET(p_tr2_sys__Copy_file,
                 "?_Copy_file at sys@tr2 at std@@YAHPBD0_N at 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 b20d507..d05b3d4 100644
--- a/dlls/msvcp120_app/msvcp120_app.spec
+++ b/dlls/msvcp120_app/msvcp120_app.spec
@@ -1681,8 +1681,8 @@
 @ stub -arch=win64 ?_Release at _Pad@std@@QEAAXXZ
 @ cdecl -arch=win32 ?_Remove_dir at sys@tr2 at std@@YA_NPBD at Z(str) msvcp120.?_Remove_dir at sys@tr2 at std@@YA_NPBD at Z
 @ cdecl -arch=win64 ?_Remove_dir at sys@tr2 at std@@YA_NPEBD at Z(str) msvcp120.?_Remove_dir at sys@tr2 at std@@YA_NPEBD at Z
-@ stub -arch=win32 ?_Remove_dir at sys@tr2 at std@@YA_NPB_W at Z
-@ stub -arch=win64 ?_Remove_dir at sys@tr2 at std@@YA_NPEB_W at Z
+@ cdecl -arch=win32 ?_Remove_dir at sys@tr2 at std@@YA_NPB_W at Z(wstr) msvcp120.?_Remove_dir at sys@tr2 at std@@YA_NPB_W at Z
+@ cdecl -arch=win64 ?_Remove_dir at sys@tr2 at std@@YA_NPEB_W at Z(wstr) msvcp120.?_Remove_dir at sys@tr2 at std@@YA_NPEB_W at Z
 @ cdecl -arch=win32 ?_Rename at sys@tr2 at std@@YAHPBD0 at Z(str str) msvcp120.?_Rename at sys@tr2 at std@@YAHPBD0 at Z
 @ cdecl -arch=win64 ?_Rename at sys@tr2 at std@@YAHPEBD0 at Z(str str) msvcp120.?_Rename at sys@tr2 at std@@YAHPEBD0 at Z
 @ stub -arch=win32 ?_Rename at sys@tr2 at std@@YAHPB_W0 at Z
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c
index c01d187..88d6453 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 at sys@tr2 at std@@YA_NPB_W at Z */
+/* ?_Remove_dir at sys@tr2 at std@@YA_NPEB_W at Z */
+MSVCP_bool __cdecl tr2_sys__Remove_dir_wchar(WCHAR const* path)
+{
+    TRACE("(%s)\n", debugstr_w(path));
+    return RemoveDirectoryW(path) != 0;
+}
+
 /* ??1_Winit at std@@QAE at XZ */
 /* ??1_Winit at std@@QAE at XZ */
 DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)




More information about the wine-cvs mailing list