summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/204-uclibc-locale-wchar_fix.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-04-19 21:27:09 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-28 10:44:21 +0100
commit3669de7f96100a5d4fbfc9b4e2ebc16851ba98ea (patch)
tree66743557d4203b019988970a6fa3ac603c06c991 /meta/recipes-devtools/gcc/gcc-4.6.0/204-uclibc-locale-wchar_fix.patch
parent07a6bec75c59fec06d0947ada708482900bf067a (diff)
downloadpoky-3669de7f96100a5d4fbfc9b4e2ebc16851ba98ea.tar.gz
gcc: Add recipes for 4.6.0
This is initial set of patches for testing them out The patches need documentation is pending Some patches especially uclibc related are not needed they must be dropped. (From OE-Core rev: 26858099bc104efc3b3d15d9298018285c551b9a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/204-uclibc-locale-wchar_fix.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/204-uclibc-locale-wchar_fix.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/204-uclibc-locale-wchar_fix.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/204-uclibc-locale-wchar_fix.patch
new file mode 100644
index 0000000000..2d8d70ae59
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/204-uclibc-locale-wchar_fix.patch
@@ -0,0 +1,52 @@
1Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
2===================================================================
3--- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc
4+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
5@@ -401,7 +401,7 @@ namespace std
6 # ifdef __UCLIBC_HAS_XLOCALE__
7 _M_data->_M_decimal_point = __cloc->decimal_point_wc;
8 _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
9-# else
10+# elif defined __UCLIBC_HAS_LOCALE__
11 _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
12 _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
13 # endif
14@@ -556,7 +556,7 @@ namespace std
15 # ifdef __UCLIBC_HAS_XLOCALE__
16 _M_data->_M_decimal_point = __cloc->decimal_point_wc;
17 _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
18-# else
19+# elif defined __UCLIBC_HAS_LOCALE__
20 _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
21 _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
22 # endif
23Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
24===================================================================
25--- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc
26+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
27@@ -127,12 +127,25 @@ namespace std
28 {
29 // Named locale.
30 // NB: In the GNU model wchar_t is always 32 bit wide.
31+#ifdef __UCLIBC_MJN3_ONLY__
32+#warning fix this... should be numeric
33+#endif
34+#ifdef __UCLIBC__
35+# ifdef __UCLIBC_HAS_XLOCALE__
36+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
37+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
38+# elif defined __UCLIBC_HAS_LOCALE__
39+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
40+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
41+# endif
42+#else
43 union { char *__s; wchar_t __w; } __u;
44 __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
45 _M_data->_M_decimal_point = __u.__w;
46
47 __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
48 _M_data->_M_thousands_sep = __u.__w;
49+#endif
50
51 if (_M_data->_M_thousands_sep == L'\0')
52 _M_data->_M_grouping = "";