diff options
Diffstat (limited to 'packages/gcc/gcc-4.3.1/307-locale_facets.patch')
-rw-r--r-- | packages/gcc/gcc-4.3.1/307-locale_facets.patch | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/packages/gcc/gcc-4.3.1/307-locale_facets.patch b/packages/gcc/gcc-4.3.1/307-locale_facets.patch index 412f8657dc..774fcfa2ca 100644 --- a/packages/gcc/gcc-4.3.1/307-locale_facets.patch +++ b/packages/gcc/gcc-4.3.1/307-locale_facets.patch @@ -4,23 +4,16 @@ std::snprintf function, that, on uClibc, doens't handle sized 0 buffer. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> ---- gcc-4.2.1/libstdc++-v3/include/bits/locale_facets.tcc 2006-10-17 18:43:47.000000000 +0200 -+++ gcc-4.2.1-st/libstdc++-v3/include/bits/locale_facets.tcc 2007-08-22 18:54:23.000000000 +0200 -@@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE +Index: gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/include/bits/locale_facets.tcc 2007-11-26 17:59:41.000000000 -0800 ++++ gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc 2008-08-16 02:14:48.000000000 -0700 +@@ -1004,7 +1004,7 @@ const int __cs_size = __fixed ? __max_exp + __prec + 4 : __max_digits * 2 + __prec; char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); - __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf, -+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, ++ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); #endif -@@ -1777,7 +1777,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE - // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'. - const int __cs_size = numeric_limits<long double>::max_exponent10 + 3; - char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); -- int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf", -+ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf", - 0, __units); - #endif - string_type __digits(__len, char_type()); |