From 9939b5f564a4059b03e0b2b0cd887a52c80a5d38 Mon Sep 17 00:00:00 2001 From: YongHao Hu Date: Sat, 13 Jun 2015 00:31:30 +0800 Subject: [PATCH] msvcp110: Add tr2_sys__Make_dir implementation and test. --- dlls/msvcp110/msvcp110.spec | 4 ++-- dlls/msvcp120/msvcp120.spec | 4 ++-- dlls/msvcp120/tests/msvcp120.c | 29 +++++++++++++++++++++++++++++ dlls/msvcp120_app/msvcp120_app.spec | 4 ++-- dlls/msvcp90/ios.c | 16 ++++++++++++++++ 5 files changed, 51 insertions(+), 6 deletions(-) diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index a06d260bda9..dcf47db2836 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -1617,8 +1617,8 @@ @ stub -arch=win64 ?_MP_Mul@std@@YAXQEA_K_K1@Z @ stub -arch=win32 ?_MP_Rem@std@@YAXQA_K_K@Z @ stub -arch=win64 ?_MP_Rem@std@@YAXQEA_K_K@Z -@ stub -arch=win32 ?_Make_dir@sys@tr2@std@@YAHPBD@Z -@ stub -arch=win64 ?_Make_dir@sys@tr2@std@@YAHPEBD@Z +@ cdecl -arch=win32 ?_Make_dir@sys@tr2@std@@YAHPBD@Z(str) tr2_sys__Make_dir +@ cdecl -arch=win64 ?_Make_dir@sys@tr2@std@@YAHPEBD@Z(str) tr2_sys__Make_dir @ stub -arch=win32 ?_Make_dir@sys@tr2@std@@YAHPB_W@Z @ stub -arch=win64 ?_Make_dir@sys@tr2@std@@YAHPEB_W@Z @ cdecl -arch=win32 ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z(ptr long ptr ptr) locale__Locimp__Makeloc diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec index 275d7ab1fc6..acfd380bf2a 100644 --- a/dlls/msvcp120/msvcp120.spec +++ b/dlls/msvcp120/msvcp120.spec @@ -1578,8 +1578,8 @@ @ stub -arch=win64 ?_MP_Mul@std@@YAXQEA_K_K1@Z @ stub -arch=win32 ?_MP_Rem@std@@YAXQA_K_K@Z @ stub -arch=win64 ?_MP_Rem@std@@YAXQEA_K_K@Z -@ stub -arch=win32 ?_Make_dir@sys@tr2@std@@YAHPBD@Z -@ stub -arch=win64 ?_Make_dir@sys@tr2@std@@YAHPEBD@Z +@ cdecl -arch=win32 ?_Make_dir@sys@tr2@std@@YAHPBD@Z(str) tr2_sys__Make_dir +@ cdecl -arch=win64 ?_Make_dir@sys@tr2@std@@YAHPEBD@Z(str) tr2_sys__Make_dir @ stub -arch=win32 ?_Make_dir@sys@tr2@std@@YAHPB_W@Z @ stub -arch=win64 ?_Make_dir@sys@tr2@std@@YAHPEB_W@Z @ cdecl -arch=win32 ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z(ptr long ptr ptr) locale__Locimp__Makeloc diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index 5953fbe403e..90c317b0018 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -64,6 +64,7 @@ static ULONGLONG(__cdecl *p_tr2_sys__File_size)(char const*); static int (__cdecl *p_tr2_sys__Equivalent)(char const*, char const*); static char* (__cdecl *p_tr2_sys__Current_get)(char *); static MSVCP_bool (__cdecl *p_tr2_sys__Current_set)(char const*); +static int (__cdecl *p_tr2_sys__Make_dir)(char const*); static HMODULE msvcp; #define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y) @@ -100,6 +101,8 @@ static BOOL init(void) "?_Current_get@sys@tr2@std@@YAPEADAEAY0BAE@D@Z"); SET(p_tr2_sys__Current_set, "?_Current_set@sys@tr2@std@@YA_NPEBD@Z"); + SET(p_tr2_sys__Make_dir, + "?_Make_dir@sys@tr2@std@@YAHPEBD@Z"); } else { SET(p_tr2_sys__File_size, "?_File_size@sys@tr2@std@@YA_KPBD@Z"); @@ -109,6 +112,8 @@ static BOOL init(void) "?_Current_get@sys@tr2@std@@YAPADAAY0BAE@D@Z"); SET(p_tr2_sys__Current_set, "?_Current_set@sys@tr2@std@@YA_NPBD@Z"); + SET(p_tr2_sys__Make_dir, + "?_Make_dir@sys@tr2@std@@YAHPBD@Z"); } msvcr = GetModuleHandleA("msvcr120.dll"); @@ -469,6 +474,29 @@ static void test_tr2_sys__Current_set(void) ok(!strcmp(origin_path, current_path), "test_tr2_sys__Current_get(): expect: %s, got %s\n", origin_path, current_path); } +static void test_tr2_sys__Make_dir(void) +{ + int ret, i; + struct { + char const *path; + int val; + } tests[] = { + { "tr2_test_dir", 1 }, + { "tr2_test_dir", 0 }, + { NULL, -1 }, + { "??invalid_name>>", -1 } + }; + + for(i=0; i