From 96fcf4cc037c8e8fd204591c009517b55d244092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 10 Oct 2017 17:09:45 +0200 Subject: [PATCH] msvcp: Implement the WCHAR version of _Link. 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 | 14 ++++++++++++++ 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec index 3b29e739c9c..ae1ac5792d2 100644 --- a/dlls/msvcp120/msvcp120.spec +++ b/dlls/msvcp120/msvcp120.spec @@ -1533,8 +1533,8 @@ @ cdecl -arch=win64 ?_Launch@_Pad@std@@QEAAXPEAU_Thrd_imp_t@@@Z(ptr ptr) _Pad__Launch @ cdecl -arch=win32 ?_Link@sys@tr2@std@@YAHPBD0@Z(str str) tr2_sys__Link @ cdecl -arch=win64 ?_Link@sys@tr2@std@@YAHPEBD0@Z(str str) tr2_sys__Link -@ stub -arch=win32 ?_Link@sys@tr2@std@@YAHPB_W0@Z -@ stub -arch=win64 ?_Link@sys@tr2@std@@YAHPEB_W0@Z +@ cdecl -arch=win32 ?_Link@sys@tr2@std@@YAHPB_W0@Z(wstr wstr) tr2_sys__Link_wchar +@ cdecl -arch=win64 ?_Link@sys@tr2@std@@YAHPEB_W0@Z(wstr wstr) tr2_sys__Link_wchar @ cdecl -arch=win32 ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z(ptr ptr long) locale__Locimp__Locimp_Addfac @ cdecl -arch=win64 ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z(ptr ptr long) locale__Locimp__Locimp_Addfac @ cdecl -arch=win32 ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z(ptr ptr) locale__Locimp__Locimp_ctor diff --git a/dlls/msvcp120_app/msvcp120_app.spec b/dlls/msvcp120_app/msvcp120_app.spec index 7a6dc5895c8..56bed796607 100644 --- a/dlls/msvcp120_app/msvcp120_app.spec +++ b/dlls/msvcp120_app/msvcp120_app.spec @@ -1533,8 +1533,8 @@ @ cdecl -arch=win64 ?_Launch@_Pad@std@@QEAAXPEAU_Thrd_imp_t@@@Z(ptr ptr) msvcp120.?_Launch@_Pad@std@@QEAAXPEAU_Thrd_imp_t@@@Z @ cdecl -arch=win32 ?_Link@sys@tr2@std@@YAHPBD0@Z(str str) msvcp120.?_Link@sys@tr2@std@@YAHPBD0@Z @ cdecl -arch=win64 ?_Link@sys@tr2@std@@YAHPEBD0@Z(str str) msvcp120.?_Link@sys@tr2@std@@YAHPEBD0@Z -@ stub -arch=win32 ?_Link@sys@tr2@std@@YAHPB_W0@Z -@ stub -arch=win64 ?_Link@sys@tr2@std@@YAHPEB_W0@Z +@ cdecl -arch=win32 ?_Link@sys@tr2@std@@YAHPB_W0@Z(wstr wstr) msvcp120.?_Link@sys@tr2@std@@YAHPB_W0@Z +@ cdecl -arch=win64 ?_Link@sys@tr2@std@@YAHPEB_W0@Z(wstr wstr) msvcp120.?_Link@sys@tr2@std@@YAHPEB_W0@Z @ cdecl -arch=win32 ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z(ptr ptr long) msvcp120.?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z @ cdecl -arch=win64 ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z(ptr ptr long) msvcp120.?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z @ cdecl -arch=win32 ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z(ptr ptr) msvcp120.?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec index 54098534b48..08f1ff479fd 100644 --- a/dlls/msvcp140/msvcp140.spec +++ b/dlls/msvcp140/msvcp140.spec @@ -3667,7 +3667,7 @@ @ stub _LSinh @ extern _LSnan _LSnan @ stub _Last_write_time -@ stub _Link +@ cdecl _Link(wstr wstr) tr2_sys__Link_wchar @ cdecl _Lock_shared_ptr_spin_lock() @ cdecl _Lstat(wstr ptr) @ cdecl _Make_dir(wstr) tr2_sys__Make_dir_wchar diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index c6f06ff92e4..5d2f0ca9c6c 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -15036,6 +15036,20 @@ int __cdecl tr2_sys__Link(char const* existing_path, char const* new_path) return GetLastError(); } +/* ?_Link@sys@tr2@std@@YAHPB_W0@Z */ +/* ?_Link@sys@tr2@std@@YAHPEB_W0@Z */ +/* _Link */ +int __cdecl tr2_sys__Link_wchar(WCHAR const* existing_path, WCHAR const* new_path) +{ + TRACE("(%s %s)\n", debugstr_w(existing_path), debugstr_w(new_path)); + if(!existing_path || !new_path) + return ERROR_INVALID_PARAMETER; + + if(CreateHardLinkW(new_path, existing_path, NULL)) + return ERROR_SUCCESS; + return GetLastError(); +} + /* ?_Symlink@sys@tr2@std@@YAHPBD0@Z */ /* ?_Symlink@sys@tr2@std@@YAHPEBD0@Z */ int __cdecl tr2_sys__Symlink(char const* existing_file_name, char const* file_name)