1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gcc/4.2.3/140-uclibc-locale-wchar_fix.patch Sun Jan 11 18:05:25 2009 +0000
1.3 @@ -0,0 +1,50 @@
1.4 +diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
1.5 +--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:30:53.000000000 +0200
1.6 ++++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:31:24.000000000 +0200
1.7 +@@ -401,7 +401,7 @@
1.8 + # ifdef __UCLIBC_HAS_XLOCALE__
1.9 + _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1.10 + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1.11 +-# else
1.12 ++# elif defined __UCLIBC_HAS_LOCALE__
1.13 + _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1.14 + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1.15 + # endif
1.16 +@@ -556,7 +556,7 @@
1.17 + # ifdef __UCLIBC_HAS_XLOCALE__
1.18 + _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1.19 + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1.20 +-# else
1.21 ++# elif defined __UCLIBC_HAS_LOCALE__
1.22 + _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1.23 + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1.24 + # endif
1.25 +diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
1.26 +--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:30:53.000000000 +0200
1.27 ++++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:31:24.000000000 +0200
1.28 +@@ -127,12 +127,25 @@
1.29 + {
1.30 + // Named locale.
1.31 + // NB: In the GNU model wchar_t is always 32 bit wide.
1.32 ++#ifdef __UCLIBC_MJN3_ONLY__
1.33 ++#warning fix this... should be numeric
1.34 ++#endif
1.35 ++#ifdef __UCLIBC__
1.36 ++# ifdef __UCLIBC_HAS_XLOCALE__
1.37 ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1.38 ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1.39 ++# elif defined __UCLIBC_HAS_LOCALE__
1.40 ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1.41 ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1.42 ++# endif
1.43 ++#else
1.44 + union { char *__s; wchar_t __w; } __u;
1.45 + __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
1.46 + _M_data->_M_decimal_point = __u.__w;
1.47 +
1.48 + __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
1.49 + _M_data->_M_thousands_sep = __u.__w;
1.50 ++#endif
1.51 +
1.52 + if (_M_data->_M_thousands_sep == L'\0')
1.53 + _M_data->_M_grouping = "";