diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-07-22 20:43:54 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-07-22 20:43:54 +0400 |
commit | 9fb628fc5720d1014192a97538ba92d33c9c36ca (patch) | |
tree | a8dc304ff3c43b4f0fb4e6036f478e85761f06c1 /winsup/cygwin/winsup.h | |
parent | 2ff6d12fa29f788a2e27d59ab4ecb5a098ec5ca2 (diff) |
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/winsup.h')
-rw-r--r-- | winsup/cygwin/winsup.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 4141aa74c..cb4f5b806 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -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 |