From: <ped...@us...> - 2007-12-25 23:25:17
|
Revision: 1117 http://cegcc.svn.sourceforge.net/cegcc/?rev=1117&view=rev Author: pedroalves Date: 2007-12-25 15:25:15 -0800 (Tue, 25 Dec 2007) Log Message: ----------- * libgcov.c (gcov_exit) [UNDER_CE]: Fix mbstowcs/wcstombs confusion. Always null terminate strings. Fix formatting. Modified Paths: -------------- trunk/cegcc/src/gcc/gcc/ChangeLog.ce trunk/cegcc/src/gcc/gcc/libgcov.c Modified: trunk/cegcc/src/gcc/gcc/ChangeLog.ce =================================================================== --- trunk/cegcc/src/gcc/gcc/ChangeLog.ce 2007-12-25 23:12:07 UTC (rev 1116) +++ trunk/cegcc/src/gcc/gcc/ChangeLog.ce 2007-12-25 23:25:15 UTC (rev 1117) @@ -1,5 +1,10 @@ 2007-12-25 Pedro Alves <ped...@po...> + * libgcov.c (gcov_exit) [UNDER_CE]: Fix mbstowcs/wcstombs + confusion. Always null terminate strings. Fix formatting. + +2007-12-25 Pedro Alves <ped...@po...> + * config.gcc: Remove redundant arm-wince-mingw32ce,arm-*-mingw32ce and arm-wince-cegcc,arm-*-cegcc copies. Modified: trunk/cegcc/src/gcc/gcc/libgcov.c =================================================================== --- trunk/cegcc/src/gcc/gcc/libgcov.c 2007-12-25 23:12:07 UTC (rev 1116) +++ trunk/cegcc/src/gcc/gcc/libgcov.c 2007-12-25 23:25:15 UTC (rev 1117) @@ -319,11 +319,14 @@ #endif #ifdef UNDER_CE { - wchar_t x[256]; - int l = strlen(gi_filename); + wchar_t x[256]; + int l = strlen (gi_filename); l = (l < 256) ? l : 255; - wcstombs(x, gi_filename, l); - MessageBoxW(0, L"gcov_open", x, 0); + mbstowcs (x, gi_filename, l); + x[l] = '\0'; + extern int MessageBoxW (void *, const wchar_t *, + const wchar_t *, unsigned); + MessageBoxW (0, L"gcov_open", x, 0); } #endif if (!gcov_open (gi_filename)) @@ -333,10 +336,13 @@ #else { wchar_t x[256]; - int l = strlen(gi_filename); + int l = strlen (gi_filename); l = (l < 256) ? l : 255; - mbstowcs(x, gi_filename, l); - MessageBoxW(0, x, L"gcov_open couldn't open file", 0); + mbstowcs (x, gi_filename, l); + x[l] = '\0'; + extern int MessageBoxW (void *, const wchar_t *, + const wchar_t *, unsigned); + MessageBoxW (0, x, L"gcov_open couldn't open file", 0); } #endif continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |