Module: wine Branch: master Commit: 96fcf4cc037c8e8fd204591c009517b55d244092 URL: http://source.winehq.org/git/wine.git/?a=commit;h=96fcf4cc037c8e8fd204591c00...
Author: Stefan Dösinger stefan@codeweavers.com Date: Tue Oct 10 17:09:45 2017 +0200
msvcp: Implement the WCHAR version of _Link.
Signed-off-by: Stefan Dösinger stefan@codeweavers.com Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 3b29e73..ae1ac57 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 7a6dc58..56bed79 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 5409853..08f1ff4 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 c6f06ff..5d2f0ca 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)