From 347f41f1c6caef14cd1a30315a6ce8dd2692da76 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 20 Aug 2008 23:12:27 +0000 Subject: Enable gcc 4.3.1 to build for uclibc. Revive the uclibc locale support. Fix gcc native breakage for 4.3.1. --- packages/gcc/gcc-4.3.1/307-locale_facets.patch | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'packages/gcc/gcc-4.3.1/307-locale_facets.patch') 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 ---- 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(__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::max_exponent10 + 3; - char* __cs = static_cast(__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()); -- cgit v1.2.3