patches/gcc/4.2.2/140-uclibc-locale-wchar_fix.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:26:53 2011 +0200 (2011-08-02)
changeset 2592 4908eb2b6f17
parent 431 8bde4c6ea47a
permissions -rw-r--r--
scripts/functions: cvs retrieval first tries the mirror for tarballs

The cvs download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via cvs.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard cvs retrieval will kick in.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@313
     1
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
yann@313
     2
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2007-08-03 20:30:53.000000000 +0200
yann@313
     3
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2007-08-03 20:31:24.000000000 +0200
yann@313
     4
@@ -401,7 +401,7 @@
yann@313
     5
 # ifdef __UCLIBC_HAS_XLOCALE__
yann@313
     6
 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
yann@313
     7
 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
yann@313
     8
-# else
yann@313
     9
+# elif defined __UCLIBC_HAS_LOCALE__
yann@313
    10
 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
yann@313
    11
 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
yann@313
    12
 # endif
yann@313
    13
@@ -556,7 +556,7 @@
yann@313
    14
 # ifdef __UCLIBC_HAS_XLOCALE__
yann@313
    15
 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
yann@313
    16
 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
yann@313
    17
-# else
yann@313
    18
+# elif defined __UCLIBC_HAS_LOCALE__
yann@313
    19
 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
yann@313
    20
 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
yann@313
    21
 # endif
yann@313
    22
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
yann@313
    23
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2007-08-03 20:30:53.000000000 +0200
yann@313
    24
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2007-08-03 20:31:24.000000000 +0200
yann@313
    25
@@ -127,12 +127,25 @@
yann@313
    26
 	{
yann@313
    27
 	  // Named locale.
yann@313
    28
 	  // NB: In the GNU model wchar_t is always 32 bit wide.
yann@313
    29
+#ifdef __UCLIBC_MJN3_ONLY__
yann@313
    30
+#warning fix this... should be numeric
yann@313
    31
+#endif
yann@313
    32
+#ifdef __UCLIBC__
yann@313
    33
+# ifdef __UCLIBC_HAS_XLOCALE__
yann@313
    34
+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
yann@313
    35
+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
yann@313
    36
+# elif defined __UCLIBC_HAS_LOCALE__
yann@313
    37
+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
yann@313
    38
+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
yann@313
    39
+# endif
yann@313
    40
+#else
yann@313
    41
 	  union { char *__s; wchar_t __w; } __u;
yann@313
    42
 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
yann@313
    43
 	  _M_data->_M_decimal_point = __u.__w;
yann@313
    44
 
yann@313
    45
 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
yann@313
    46
 	  _M_data->_M_thousands_sep = __u.__w;
yann@313
    47
+#endif
yann@313
    48
 
yann@313
    49
 	  if (_M_data->_M_thousands_sep == L'\0')
yann@313
    50
 	    _M_data->_M_grouping = "";