aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/syscalls.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2000-07-22 16:43:54 +0000
committerCorinna Vinschen <corinna@vinschen.de>2000-07-22 16:43:54 +0000
commit9fb628fc5720d1014192a97538ba92d33c9c36ca (patch)
treea8dc304ff3c43b4f0fb4e6036f478e85761f06c1 /winsup/cygwin/syscalls.cc
parent2ff6d12fa29f788a2e27d59ab4ecb5a098ec5ca2 (diff)
downloadnewlib-9fb628fc5720d1014192a97538ba92d33c9c36ca.zip
newlib-9fb628fc5720d1014192a97538ba92d33c9c36ca.tar.gz
newlib-9fb628fc5720d1014192a97538ba92d33c9c36ca.tar.bz2
Patch suggested by Kazuhiro Fujieda <fujieda@jaist.ac.jp>.
* winsup.h: Add new macros sys_wcstombs and sys_mbstowcs. * syscalls.cc (_link): Replace calls to mbstowcs by call to sys_mbstowcs. * uinfo.cc (internal_getlogin): Replace calls to wcstombs and mbstowcs by calls to sys_wcstombs and sys_mbstowcs. Replace usage of constants by meaningful defines. Use result of GetSystemDirectory for HOMEPATH and HOMEDRIVE as a last resort.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 5935bdb..3e67c09 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -547,7 +547,7 @@ _link (const char *a, const char *b)
lpContext = NULL;
cygwin_conv_to_full_win32_path (real_b.get_win32 (), buf);
- cbPathLen = MultiByteToWideChar (CP_ACP, 0, buf, -1, wbuf, MAX_PATH) * sizeof (WCHAR);
+ cbPathLen = sys_mbstowcs (wbuf, buf, MAX_PATH);
StreamId.dwStreamId = BACKUP_LINK;
StreamId.dwStreamAttributes = 0;