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

@@ -60,6 +60,11 @@ extern os_type os_being_run;
/* Used to check if Cygwin DLL is dynamically loaded. */
extern int dynamically_loaded;
#define sys_wcstombs(tgt,src,len) \
WideCharToMultiByte(CP_ACP,0,(src),-1,(tgt),(len),NULL,NULL)
#define sys_mbstowcs(tgt,src,len) \
MultiByteToWideChar(CP_ACP,0,(src),-1,(tgt),(len))
#include <cygwin/version.h>
#define TITLESIZE 1024