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.
This commit is contained in:
Corinna Vinschen
2000-07-22 16:43:54 +00:00
parent 2ff6d12fa2
commit 9fb628fc57
4 changed files with 38 additions and 17 deletions

View File

@@ -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;