From: <dan...@us...> - 2010-01-02 06:04:10
|
Revision: 1430 http://cegcc.svn.sourceforge.net/cegcc/?rev=1430&view=rev Author: dannybackx Date: 2010-01-02 06:04:04 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Fix bug 2912803 Modified Paths: -------------- trunk/cegcc/src/newlib/ChangeLog.cegcc trunk/cegcc/src/newlib/newlib/libc/sys/wince/cefixpath.c Modified: trunk/cegcc/src/newlib/ChangeLog.cegcc =================================================================== --- trunk/cegcc/src/newlib/ChangeLog.cegcc 2010-01-02 01:20:33 UTC (rev 1429) +++ trunk/cegcc/src/newlib/ChangeLog.cegcc 2010-01-02 06:04:04 UTC (rev 1430) @@ -1,3 +1,7 @@ +2010-01-02 Danny Backx <dan...@us...> + + * libc/sys/wince/cefixpath.c(XCEFixPathA): Fix for bug 2912803. + 2009-04-28 Danny Backx <dan...@us...> * configure, configure.in : recognize more targets. Modified: trunk/cegcc/src/newlib/newlib/libc/sys/wince/cefixpath.c =================================================================== --- trunk/cegcc/src/newlib/newlib/libc/sys/wince/cefixpath.c 2010-01-02 01:20:33 UTC (rev 1429) +++ trunk/cegcc/src/newlib/newlib/libc/sys/wince/cefixpath.c 2010-01-02 06:04:04 UTC (rev 1430) @@ -4,6 +4,7 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> +#include <locale.h> char *XCEFixPathA(const char *pathin, char *pathout); wchar_t *XCEFixPathW(const wchar_t *wpathin, wchar_t *wpathout); @@ -14,17 +15,18 @@ { wchar_t wpathin[MAX_PATH]; wchar_t wpathout[MAX_PATH]; + int old_locale; //printf("FixPathA: %s\n", pathin); - MultiByteToWideChar(CP_ACP, 0, pathin, -1, wpathin, MAX_PATH); + old_locale = setlocale(LC_ALL, "C"); + (void) setlocale(LC_ALL, old_locale); + MultiByteToWideChar(old_locale, 0, pathin, -1, wpathin, MAX_PATH); + XCEFixPathW(wpathin, wpathout); - WideCharToMultiByte(CP_ACP, 0, - wpathout, -1, - pathout, MAX_PATH, - NULL, NULL); + WideCharToMultiByte(old_locale, 0, wpathout, -1, pathout, MAX_PATH, NULL, NULL); return pathout; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |