diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-07-19 12:17:26 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-07-19 12:17:26 (GMT) |
commit | 907141d9534f43018c5288d20dea785b2cc299ff (patch) | |
tree | e6954b3a11d8379d8d49546125a57e993572415e /patches/gcc/4.2.4/204-uclibc-locale-wchar_fix.patch | |
parent | 709299f2912bfb796b42497f6037a9c9a89f0a8f (diff) |
Add gcc-4.2.4, with patches propagated from 4.2.3.
/trunk/config/cc/gcc.in | 5 5 0 0 +++++
1 file changed, 5 insertions(+)
Diffstat (limited to 'patches/gcc/4.2.4/204-uclibc-locale-wchar_fix.patch')
-rw-r--r-- | patches/gcc/4.2.4/204-uclibc-locale-wchar_fix.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/patches/gcc/4.2.4/204-uclibc-locale-wchar_fix.patch b/patches/gcc/4.2.4/204-uclibc-locale-wchar_fix.patch new file mode 100644 index 0000000..077bb56 --- /dev/null +++ b/patches/gcc/4.2.4/204-uclibc-locale-wchar_fix.patch @@ -0,0 +1,50 @@ +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 +--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:30:53.000000000 +0200 ++++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:31:24.000000000 +0200 +@@ -401,7 +401,7 @@ + # ifdef __UCLIBC_HAS_XLOCALE__ + _M_data->_M_decimal_point = __cloc->decimal_point_wc; + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; +-# else ++# elif defined __UCLIBC_HAS_LOCALE__ + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; + # endif +@@ -556,7 +556,7 @@ + # ifdef __UCLIBC_HAS_XLOCALE__ + _M_data->_M_decimal_point = __cloc->decimal_point_wc; + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; +-# else ++# elif defined __UCLIBC_HAS_LOCALE__ + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; + # endif +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 +--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:30:53.000000000 +0200 ++++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:31:24.000000000 +0200 +@@ -127,12 +127,25 @@ + { + // Named locale. + // NB: In the GNU model wchar_t is always 32 bit wide. ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be numeric ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# elif defined __UCLIBC_HAS_LOCALE__ ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else + union { char *__s; wchar_t __w; } __u; + __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); + _M_data->_M_decimal_point = __u.__w; + + __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); + _M_data->_M_thousands_sep = __u.__w; ++#endif + + if (_M_data->_M_thousands_sep == L'\0') + _M_data->_M_grouping = ""; |