svn commit: trunk/buildroot/toolchain/gcc/4.1.0

Peter S. Mazinger ps.m at gmx.net
Mon Mar 27 08:14:42 UTC 2006


On Sun, 26 Mar 2006 mjn3 at uclibc.org wrote:

> Author: mjn3
> Date: 2006-03-26 15:18:37 -0800 (Sun, 26 Mar 2006)
> New Revision: 14662
> 
> Log:
> Well... at least this seems to build.  Haven't had time to really test it yet, but checking it in for sjhill to test.
> 
> Modified:
>    trunk/buildroot/toolchain/gcc/4.1.0/200-uclibc-locale.patch
> 
> 
> -diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/monetary_members.cc
> ---- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc	1969-12-31 18:00:00.000000000 -0600
> -+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2005-04-30 19:36:16.927897479 -0500
> -@@ -0,0 +1,704 @@
> +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
> +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc	1969-12-31 17:00:00.000000000 -0700
> ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2006-03-25 22:18:37.000000000 -0700
> +@@ -0,0 +1,692 @@
>  +// std::moneypunct implementation details, GNU version -*- C++ -*-
>  +
>  +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
> @@ -1358,7 +1367,7 @@
>  +
>  +// You should have received a copy of the GNU General Public License along
>  +// with this library; see the file COPYING.  If not, write to the Free
> -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
>  +// USA.
>  +
>  +// As a special exception, you may use this file as part of a free software
> @@ -1553,7 +1562,7 @@
>  +	  }
>  +	break;
>  +      default:
> -+	;
> ++	__ret = pattern();
>  +      }
>  +    return __ret;
>  +  }
> @@ -1746,17 +1755,11 @@
>  +#endif
>  +#ifdef __UCLIBC__
>  +# ifdef __UCLIBC_HAS_XLOCALE__
> -+	  union { char *__s; wchar_t __w; } __u;
> -+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
> -+	  _M_data->_M_decimal_point = __u.__w;
> -+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
> -+	  _M_data->_M_thousands_sep = __u.__w;
> ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
> ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
>  +# else

the above should be # elif __UCLIBC_HAS_LOCALE__ /* __global_locale */

> -+	  union { char *__s; wchar_t __w; } __u;
> -+	  __u.__s = 0;
> -+	  _M_data->_M_decimal_point = __u.__w;
> -+	  __u.__s = 0;
> -+	  _M_data->_M_thousands_sep = __u.__w;
> ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
> ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
>  +# endif

do we need a non-LOCALE case as well?

>  +#else
>  +	  union { char *__s; wchar_t __w; } __u;
> @@ -1907,17 +1910,11 @@
>  +#endif
>  +#ifdef __UCLIBC__
>  +# ifdef __UCLIBC_HAS_XLOCALE__
> -+          union { char *__s; wchar_t __w; } __u;
> -+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
> -+	  _M_data->_M_decimal_point = __u.__w;
> -+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
> -+	  _M_data->_M_thousands_sep = __u.__w;
> ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
> ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
>  +# else
> -+          union { char *__s; wchar_t __w; } __u;
> -+	  __u.__s = 0;
> -+	  _M_data->_M_decimal_point = __u.__w;
> -+	  __u.__s = 0;
> -+	  _M_data->_M_thousands_sep = __u.__w;
> ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
> ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
>  +# endif

same as above

>  +#else
>  +          union { char *__s; wchar_t __w; } __u;
> @@ -2045,10 +2042,10 @@
>  +    }
>  +#endif
>  +}
> -diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/numeric_members.cc
> ---- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc	1969-12-31 18:00:00.000000000 -0600
> -+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2005-04-30 19:36:38.467261324 -0500
> -@@ -0,0 +1,168 @@
> +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
> +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc	1969-12-31 17:00:00.000000000 -0700
> ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2006-03-25 22:18:37.000000000 -0700
> +@@ -0,0 +1,173 @@
>  +// std::numpunct implementation details, GNU version -*- C++ -*-
>  +
>  +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
> @@ -2066,7 +2063,7 @@
>  +
>  +// You should have received a copy of the GNU General Public License along
>  +// with this library; see the file COPYING.  If not, write to the Free
> -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
>  +// USA.
>  +
>  +// As a special exception, you may use this file as part of a free software
> @@ -2181,20 +2178,25 @@
>  +	{
>  +	  // Named locale.
>  +	  // NB: In the GNU model wchar_t is always 32 bit wide.
> ++#ifdef __UCLIBC_MJN3_ONLY__
> ++#warning fix this
> ++#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;
> ++# else
> ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
> ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
> ++# endif
> ++#else

same as above

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list