[tools] disable mpfr tests compilation, slightly speeds up the build process
[openwrt.git] / toolchain / gcc / patches / 4.2.4 / 204-uclibc-locale-wchar_fix.patch
1 Index: gcc-4.2.3/libstdc++-v3/config/locale/uclibc/monetary_members.cc
2 ===================================================================
3 --- gcc-4.2.3.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-05-21 13:45:45.257288137 +0200
4 +++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-05-21 13:45:46.105290284 +0200
5 @@ -401,7 +401,7 @@
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 @@
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.2.3/libstdc++-v3/config/locale/uclibc/numeric_members.cc
24 ===================================================================
25 --- gcc-4.2.3.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-05-21 13:45:45.257288137 +0200
26 +++ gcc-4.2.3/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-05-21 13:45:46.105290284 +0200
27 @@ -127,12 +127,25 @@
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 = "";
This page took 0.041929 seconds and 5 git commands to generate.