patches/gcc/4.2.0/140-uclibc-locale-wchar_fix.patch
changeset 747 d3e603e7c17c
parent 111 2e16b9fc302d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gcc/4.2.0/140-uclibc-locale-wchar_fix.patch	Mon Jul 28 21:32:33 2008 +0000
     1.3 @@ -0,0 +1,48 @@
     1.4 +--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~	2006-03-10 15:32:37 +0100
     1.5 ++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2006-03-10 15:37:27 +0100
     1.6 +@@ -401,7 +401,7 @@
     1.7 + # ifdef __UCLIBC_HAS_XLOCALE__
     1.8 + 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
     1.9 + 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
    1.10 +-# else
    1.11 ++# elif defined __UCLIBC_HAS_LOCALE__
    1.12 + 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
    1.13 + 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
    1.14 + # endif
    1.15 +@@ -556,7 +556,7 @@
    1.16 + # ifdef __UCLIBC_HAS_XLOCALE__
    1.17 + 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
    1.18 + 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
    1.19 +-# else
    1.20 ++# elif defined __UCLIBC_HAS_LOCALE__
    1.21 + 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
    1.22 + 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
    1.23 + # endif
    1.24 +--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~	2006-03-10 15:32:37 +0100
    1.25 ++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2006-03-10 15:37:27 +0100
    1.26 +@@ -127,12 +127,25 @@
    1.27 + 	{
    1.28 + 	  // Named locale.
    1.29 + 	  // NB: In the GNU model wchar_t is always 32 bit wide.
    1.30 ++#ifdef __UCLIBC_MJN3_ONLY__
    1.31 ++#warning fix this... should be numeric
    1.32 ++#endif
    1.33 ++#ifdef __UCLIBC__
    1.34 ++# ifdef __UCLIBC_HAS_XLOCALE__
    1.35 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
    1.36 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
    1.37 ++# elif defined __UCLIBC_HAS_LOCALE__
    1.38 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
    1.39 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
    1.40 ++# endif
    1.41 ++#else
    1.42 + 	  union { char *__s; wchar_t __w; } __u;
    1.43 + 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
    1.44 + 	  _M_data->_M_decimal_point = __u.__w;
    1.45 + 
    1.46 + 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
    1.47 + 	  _M_data->_M_thousands_sep = __u.__w;
    1.48 ++#endif
    1.49 + 
    1.50 + 	  if (_M_data->_M_thousands_sep == L'\0')
    1.51 + 	    _M_data->_M_grouping = "";