[PATCH 3/5] msvcp: Implement the WCHAR version of _Symlink.
Stefan Dösinger
stefan at codeweavers.com
Tue Oct 10 10:09:44 CDT 2017
Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
---
dlls/msvcp120/msvcp120.spec | 4 ++--
dlls/msvcp140/msvcp140.spec | 2 +-
dlls/msvcp90/ios.c | 14 ++++++++++++++
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec
index 4d46be44bd..3b29e739c9 100644
--- a/dlls/msvcp120/msvcp120.spec
+++ b/dlls/msvcp120/msvcp120.spec
@@ -1734,8 +1734,8 @@
@ cdecl -arch=win64 ?_Swap_all at _Container_base12@std@@QEAAXAEAU12@@Z(ptr ptr) _Container_base12__Swap_all
@ cdecl -arch=win32 ?_Symlink at sys@tr2 at std@@YAHPBD0 at Z(str str) tr2_sys__Symlink
@ cdecl -arch=win64 ?_Symlink at sys@tr2 at std@@YAHPEBD0 at Z(str str) tr2_sys__Symlink
-@ stub -arch=win32 ?_Symlink at sys@tr2 at std@@YAHPB_W0 at Z
-@ stub -arch=win64 ?_Symlink at sys@tr2 at std@@YAHPEB_W0 at Z
+@ cdecl -arch=win32 ?_Symlink at sys@tr2 at std@@YAHPB_W0 at Z(wstr wstr) tr2_sys__Symlink_wchar
+@ cdecl -arch=win64 ?_Symlink at sys@tr2 at std@@YAHPEB_W0 at Z(wstr wstr) tr2_sys__Symlink_wchar
@ extern ?_Sync at ios_base@std@@0_NA ios_base_Sync
@ stub -arch=win32 ?_Syserror_map at std@@YAPBDH at Z
@ stub -arch=win64 ?_Syserror_map at std@@YAPEBDH at Z
diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec
index 74ff305166..54098534b4 100644
--- a/dlls/msvcp140/msvcp140.spec
+++ b/dlls/msvcp140/msvcp140.spec
@@ -3716,7 +3716,7 @@
@ cdecl _Stoulx(ptr ptr long ptr) _Stoulx
@ cdecl _Strcoll(ptr ptr ptr ptr ptr) _Strcoll
@ stub _Strxfrm
-@ stub _Symlink
+@ cdecl _Symlink(wstr wstr) tr2_sys__Symlink_wchar
@ stub _Symlink_get
@ stub _Temp_get
@ stub _Thrd_abort
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c
index 36e5067e1f..c6f06ff92e 100644
--- a/dlls/msvcp90/ios.c
+++ b/dlls/msvcp90/ios.c
@@ -15049,6 +15049,20 @@ int __cdecl tr2_sys__Symlink(char const* existing_file_name, char const* file_na
return GetLastError();
}
+/* ?_Symlink at sys@tr2 at std@@YAHPB_W0 at Z */
+/* ?_Symlink at sys@tr2 at std@@YAHPEB_W0 at Z */
+/* _Symlink */
+int __cdecl tr2_sys__Symlink_wchar(WCHAR const* existing_file_name, WCHAR const* file_name)
+{
+ TRACE("(%s %s)\n", debugstr_w(existing_file_name), debugstr_w(file_name));
+ if(!existing_file_name || !file_name)
+ return ERROR_INVALID_PARAMETER;
+
+ if(CreateSymbolicLinkW(file_name, existing_file_name, 0))
+ return ERROR_SUCCESS;
+ return GetLastError();
+}
+
/* ?_Unlink at sys@tr2 at std@@YAHPBD at Z */
/* ?_Unlink at sys@tr2 at std@@YAHPEBD at Z */
int __cdecl tr2_sys__Unlink(char const* path)
--
2.13.6
More information about the wine-patches
mailing list