From eea0f37a1a8cda59ebcec698356af0cc46f2107b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 10 Oct 2017 17:09:43 +0200 Subject: [PATCH] msvcp: Implement the WCHAR version of _Unlink. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Dösinger Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcp120/msvcp120.spec | 4 ++-- dlls/msvcp120_app/msvcp120_app.spec | 4 ++-- dlls/msvcp140/msvcp140.spec | 2 +- dlls/msvcp90/ios.c | 12 ++++++++++++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec index b3f2223af09..4d46be44bdd 100644 --- a/dlls/msvcp120/msvcp120.spec +++ b/dlls/msvcp120/msvcp120.spec @@ -1768,8 +1768,8 @@ @ cdecl -arch=win64 ?_Tidy@ios_base@std@@AEAAXXZ(ptr) ios_base_Tidy @ cdecl -arch=win32 ?_Unlink@sys@tr2@std@@YAHPBD@Z(str) tr2_sys__Unlink @ cdecl -arch=win64 ?_Unlink@sys@tr2@std@@YAHPEBD@Z(str) tr2_sys__Unlink -@ stub -arch=win32 ?_Unlink@sys@tr2@std@@YAHPB_W@Z -@ stub -arch=win64 ?_Unlink@sys@tr2@std@@YAHPEB_W@Z +@ cdecl -arch=win32 ?_Unlink@sys@tr2@std@@YAHPB_W@Z(wstr) tr2_sys__Unlink_wchar +@ cdecl -arch=win64 ?_Unlink@sys@tr2@std@@YAHPEB_W@Z(wstr) tr2_sys__Unlink_wchar @ cdecl -arch=arm ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAAXXZ(ptr) basic_streambuf_char__Unlock @ thiscall -arch=i386 ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAEXXZ(ptr) basic_streambuf_char__Unlock @ cdecl -arch=win64 ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAAXXZ(ptr) basic_streambuf_char__Unlock diff --git a/dlls/msvcp120_app/msvcp120_app.spec b/dlls/msvcp120_app/msvcp120_app.spec index 4d4c88ea20f..fd990588631 100644 --- a/dlls/msvcp120_app/msvcp120_app.spec +++ b/dlls/msvcp120_app/msvcp120_app.spec @@ -1768,8 +1768,8 @@ @ cdecl -arch=win64 ?_Tidy@ios_base@std@@AEAAXXZ(ptr) msvcp120.?_Tidy@ios_base@std@@AEAAXXZ @ cdecl -arch=win32 ?_Unlink@sys@tr2@std@@YAHPBD@Z(str) msvcp120.?_Unlink@sys@tr2@std@@YAHPBD@Z @ cdecl -arch=win64 ?_Unlink@sys@tr2@std@@YAHPEBD@Z(str) msvcp120.?_Unlink@sys@tr2@std@@YAHPEBD@Z -@ stub -arch=win32 ?_Unlink@sys@tr2@std@@YAHPB_W@Z -@ stub -arch=win64 ?_Unlink@sys@tr2@std@@YAHPEB_W@Z +@ cdecl -arch=win32 ?_Unlink@sys@tr2@std@@YAHPB_W@Z(wstr) msvcp120.?_Unlink@sys@tr2@std@@YAHPB_W@Z +@ cdecl -arch=win64 ?_Unlink@sys@tr2@std@@YAHPEB_W@Z(wstr) msvcp120.?_Unlink@sys@tr2@std@@YAHPEB_W@Z @ cdecl -arch=arm ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAAXXZ(ptr) msvcp120.?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAAXXZ @ thiscall -arch=i386 ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAEXXZ(ptr) msvcp120.?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAEXXZ @ cdecl -arch=win64 ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAAXXZ(ptr) msvcp120.?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAAXXZ diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec index 80840db4590..74ff3051660 100644 --- a/dlls/msvcp140/msvcp140.spec +++ b/dlls/msvcp140/msvcp140.spec @@ -3737,7 +3737,7 @@ @ cdecl _Toupper(long ptr) _Toupper @ cdecl _Towlower(long ptr) _Towlower @ cdecl _Towupper(long ptr) _Towupper -@ stub _Unlink +@ cdecl _Unlink(wstr) tr2_sys__Unlink_wchar @ cdecl _Unlock_shared_ptr_spin_lock() @ stub _WStod @ stub _WStodx diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 28deae081d8..36e5067e1f8 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -15060,6 +15060,18 @@ int __cdecl tr2_sys__Unlink(char const* path) return GetLastError(); } +/* ?_Unlink@sys@tr2@std@@YAHPB_W@Z */ +/* ?_Unlink@sys@tr2@std@@YAHPEB_W@Z */ +/* _Unlink */ +int __cdecl tr2_sys__Unlink_wchar(WCHAR const* path) +{ + TRACE("(%s)\n", debugstr_w(path)); + + if(DeleteFileW(path)) + return ERROR_SUCCESS; + return GetLastError(); +} + /* ??0strstream@std@@QAE@PADHH@Z */ /* ??0strstream@std@@QEAA@PEAD_JH@Z */ #if STREAMSIZE_BITS == 64