summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-4.3.2/307-locale_facets.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-09-19 17:29:23 +0000
committerRichard Purdie <richard@openedhand.com>2008-09-19 17:29:23 +0000
commitb7b275518b11fa4ad468dfe07721200c0b20a9ce (patch)
tree994890c22bf842448781d4118740642d4d6297e5 /meta/packages/gcc/gcc-4.3.2/307-locale_facets.patch
parent571ddc976b38b38a93adb418e79ddae80f527c15 (diff)
downloadpoky-b7b275518b11fa4ad468dfe07721200c0b20a9ce.tar.gz
gcc: Add 4.3.2 recipes
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5202 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gcc/gcc-4.3.2/307-locale_facets.patch')
-rw-r--r--meta/packages/gcc/gcc-4.3.2/307-locale_facets.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-4.3.2/307-locale_facets.patch b/meta/packages/gcc/gcc-4.3.2/307-locale_facets.patch
new file mode 100644
index 0000000000..412f8657dc
--- /dev/null
+++ b/meta/packages/gcc/gcc-4.3.2/307-locale_facets.patch
@@ -0,0 +1,26 @@
1This patch fixes a bug into ostream::operator<<(double) due to the wrong size
2passed into the __convert_from_v method. The wrong size is then passed to
3std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
4
5Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
6
7--- gcc-4.2.1/libstdc++-v3/include/bits/locale_facets.tcc 2006-10-17 18:43:47.000000000 +0200
8+++ gcc-4.2.1-st/libstdc++-v3/include/bits/locale_facets.tcc 2007-08-22 18:54:23.000000000 +0200
9@@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
10 const int __cs_size = __fixed ? __max_exp + __prec + 4
11 : __max_digits * 2 + __prec;
12 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
13- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
14+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
15 __prec, __v);
16 #endif
17
18@@ -1777,7 +1777,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
19 // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'.
20 const int __cs_size = numeric_limits<long double>::max_exponent10 + 3;
21 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
22- int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf",
23+ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf",
24 0, __units);
25 #endif
26 string_type __digits(__len, char_type());