* locale.cc (print_locale_with_codeset): Fetch Windows path as UNICODE

path and convert that to POSIX.
This commit is contained in:
Corinna Vinschen 2011-11-28 17:58:48 +00:00
parent 8ae61a8d6c
commit c1af7c27eb
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2011-11-28 Corinna Vinschen <corinna@vinschen.de>
* locale.cc (print_locale_with_codeset): Fetch Windows path as UNICODE
path and convert that to POSIX.
2011-11-28 Corinna Vinschen <corinna@vinschen.de>
* ps.cc: Remove all Win 9x considerations. Use psapi functions

View File

@ -154,10 +154,10 @@ print_locale_with_codeset (int verbose, loc_t *locale, bool utf8,
return;
if (!sysroot)
{
char sysbuf[PATH_MAX];
WCHAR sysbuf[PATH_MAX];
HMODULE k32 = GetModuleHandleW (L"kernel32.dll");
if (GetModuleFileName (k32, sysbuf, PATH_MAX))
sysroot = (const char *) cygwin_create_path (CCP_WIN_A_TO_POSIX,
if (GetModuleFileNameW (k32, sysbuf, PATH_MAX))
sysroot = (const char *) cygwin_create_path (CCP_WIN_W_TO_POSIX,
sysbuf);
if (!sysroot)
sysroot = "kernel32.dll";