diff options
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.patch | 52 |
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 @@ | |||
1 | Index: 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 | ||
23 | Index: 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 = ""; | ||