From c1af7c27eb9be58b7c43b4af927579b0514908dc Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 28 Nov 2011 17:58:48 +0000 Subject: [PATCH] * locale.cc (print_locale_with_codeset): Fetch Windows path as UNICODE path and convert that to POSIX. --- winsup/utils/ChangeLog | 5 +++++ winsup/utils/locale.cc | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index b56af5aee..fdcf07800 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2011-11-28 Corinna Vinschen + + * locale.cc (print_locale_with_codeset): Fetch Windows path as UNICODE + path and convert that to POSIX. + 2011-11-28 Corinna Vinschen * ps.cc: Remove all Win 9x considerations. Use psapi functions diff --git a/winsup/utils/locale.cc b/winsup/utils/locale.cc index 8ce7a5253..572ed4bcf 100644 --- a/winsup/utils/locale.cc +++ b/winsup/utils/locale.cc @@ -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"; -- 2.43.5