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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user