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