This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix more libstdc++ test failures for MinGW vswprintf


This patch fixes further libstdc++ failures on MinGW arising from the
nonstandard Windows swprintf functions.  Some functions in
ext/vstring.h (included in various testcases by various paths) use
vswprintf and need disabling for _GLIBCXX_HAVE_BROKEN_VSWPRINTF, when
vswprintf may not be declared.  This fixes 38 test failures in a cross
to i686-mingw32 (none of the tests actually need the disabled
functionality).  OK to commit?

2009-09-17  Joseph Myers  <joseph@codesourcery.com>

	* include/ext/vstring.h (to_wstring(long long),
	to_wstring(unsigned long long), to_wstring(long double)): Disable
	for _GLIBCXX_HAVE_BROKEN_VSWPRINTF.

Index: include/ext/vstring.h
===================================================================
--- include/ext/vstring.h	(revision 151770)
+++ include/ext/vstring.h	(working copy)
@@ -2523,6 +2523,7 @@
   stold(const __wvstring& __str, std::size_t* __idx = 0)
   { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
 
+#ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
   inline __wvstring
   to_wstring(long long __val)
   { return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf,
@@ -2543,6 +2544,7 @@
 					       L"%Lf", __val);
   }
 #endif
+#endif
 
 _GLIBCXX_END_NAMESPACE
 

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]