From 2e7e072f58f4dd47edc4e54d96b79bd9ff92ee7e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 14 Sep 2009 20:22:34 +0100 Subject: gcc-4.3.3: Sync patchset with OE.dev Signed-off-by: Richard Purdie --- meta/packages/gcc/gcc-4.3.3.inc | 45 +- meta/packages/gcc/gcc-4.3.3/100-uclibc-conf.patch | 179 +- .../packages/gcc/gcc-4.3.3/200-uclibc-locale.patch | 423 +- .../gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch | 74 +- .../gcc/gcc-4.3.3/205-uclibc-locale-update.patch | 324 +- meta/packages/gcc/gcc-4.3.3/302-c99-snprintf.patch | 12 +- .../packages/gcc/gcc-4.3.3/307-locale_facets.patch | 19 +- .../packages/gcc/gcc-4.3.3/800-arm-bigendian.patch | 55 +- meta/packages/gcc/gcc-4.3.3/arm-thumb.patch | 43 +- meta/packages/gcc/gcc-4.3.3/cache-amnesia.patch | 28 +- .../gcc/gcc-4.3.3/gcc-4.0.2-e300c2c3.patch | 82 +- .../gcc-4.3.3/gcc-4.2.3-linux-multilib-fix.patch | 23 + .../gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 31 + .../gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 6691 ++++++++++++++++++++ .../gcc/gcc-4.3.3/gcc-flags-for-build.patch | 279 + meta/packages/gcc/gcc-4.3.3/headerpath.patch | 42 + meta/packages/gcc/gcc-4.3.3/sh_unwind.patch | 18 + .../gcc/gcc-4.3.3/zecke-no-host-includes.patch | 8 +- meta/packages/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch | 24 +- 19 files changed, 7764 insertions(+), 636 deletions(-) create mode 100644 meta/packages/gcc/gcc-4.3.3/gcc-4.2.3-linux-multilib-fix.patch create mode 100644 meta/packages/gcc/gcc-4.3.3/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch create mode 100644 meta/packages/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch create mode 100644 meta/packages/gcc/gcc-4.3.3/gcc-flags-for-build.patch create mode 100644 meta/packages/gcc/gcc-4.3.3/headerpath.patch create mode 100644 meta/packages/gcc/gcc-4.3.3/sh_unwind.patch (limited to 'meta/packages/gcc') diff --git a/meta/packages/gcc/gcc-4.3.3.inc b/meta/packages/gcc/gcc-4.3.3.inc index 0df0e22ffd..83aac73cfa 100644 --- a/meta/packages/gcc/gcc-4.3.3.inc +++ b/meta/packages/gcc/gcc-4.3.3.inc @@ -1,11 +1,9 @@ -# No uclibc, armeb and thumb patches - really needs checking -DEFAULT_PREFERENCE = "-99" - require gcc-common.inc +LICENSE = "GPLv3" DEPENDS = "mpfr gmp" -SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ +SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \ file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \ file://fedora/gcc43-java-nomulti.patch;patch=1;pnum=0 \ @@ -20,44 +18,39 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ file://fedora/gcc43-libgomp-speedup.patch;patch=1;pnum=0 \ file://fedora/gcc43-i386-libgomp.patch;patch=1;pnum=0 \ file://fedora/gcc43-rh251682.patch;patch=1;pnum=0 \ - file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \ + file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \ file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \ file://debian/gcc-ice-hack.dpatch;patch=1;pnum=0 \ file://debian/pr30961.dpatch;patch=1;pnum=0 \ -# file://100-uclibc-conf.patch;patch=1 \ -# file://103-uclibc-conf-noupstream.patch;patch=1 \ -# file://200-uclibc-locale.patch;patch=1 \ -# file://203-uclibc-locale-no__x.patch;patch=1 \ -# file://204-uclibc-locale-wchar_fix.patch;patch=1 \ -# file://205-uclibc-locale-update.patch;patch=1 \ + file://100-uclibc-conf.patch;patch=1 \ + file://103-uclibc-conf-noupstream.patch;patch=1 \ + file://200-uclibc-locale.patch;patch=1 \ + file://203-uclibc-locale-no__x.patch;patch=1 \ + file://204-uclibc-locale-wchar_fix.patch;patch=1 \ + file://205-uclibc-locale-update.patch;patch=1 \ file://301-missing-execinfo_h.patch;patch=1 \ -# file://302-c99-snprintf.patch;patch=1 \ -# file://303-c99-complex-ugly-hack.patch;patch=1 \ + file://302-c99-snprintf.patch;patch=1 \ + file://303-c99-complex-ugly-hack.patch;patch=1 \ file://304-index_macro.patch;patch=1 \ file://305-libmudflap-susv3-legacy.patch;patch=1 \ -# file://306-libstdc++-namespace.patch;patch=1 \ -# file://307-locale_facets.patch;patch=1 \ -# file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \ + file://306-libstdc++-namespace.patch;patch=1 \ + file://307-locale_facets.patch;patch=1 \ file://602-sdk-libstdc++-includes.patch;patch=1 \ file://740-sh-pr24836.patch;patch=1 \ -# file://800-arm-bigendian.patch;patch=1 \ -# file://801-arm-bigendian-eabi.patch;patch=1 \ + file://800-arm-bigendian.patch;patch=1 \ file://904-flatten-switch-stmt-00.patch;patch=1 \ file://arm-nolibfloat.patch;patch=1 \ file://arm-softfloat.patch;patch=1 \ -# file://gcc41-configure.in.patch;patch=1 \ -# file://arm-thumb.patch;patch=1 \ -# file://arm-thumb-cache.patch;patch=1 \ - file://ldflags.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ file://cache-amnesia.patch;patch=1 \ # file://gfortran.patch;patch=1 \ -# file://gcc-4.0.2-e300c2c3.patch;patch=1 \ + file://gcc-4.0.2-e300c2c3.patch;patch=1 \ # file://pr34130.patch;patch=1 \ # file://fortran-static-linking.patch;patch=1 \ -# file://intermask-bigendian.patch;patch=1 \ file://gcc-arm-frename-registers.patch;patch=1 \ -# file://gcc-release-branch/PR-36500-fix-neon.patch;patch=1 \ + file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch;patch=1 \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ + file://zecke-xgcc-cpp.patch;patch=1 \ + file://gcc-flags-for-build.patch;patch=1 \ " SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " diff --git a/meta/packages/gcc/gcc-4.3.3/100-uclibc-conf.patch b/meta/packages/gcc/gcc-4.3.3/100-uclibc-conf.patch index 4243ff7b91..0b799607e8 100644 --- a/meta/packages/gcc/gcc-4.3.3/100-uclibc-conf.patch +++ b/meta/packages/gcc/gcc-4.3.3/100-uclibc-conf.patch @@ -1,119 +1,7 @@ ---- gcc/libgomp/configure -+++ gcc/libgomp/configure -@@ -3771,7 +3771,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/gcc/config/cris/linux.h -+++ gcc/gcc/config/cris/linux.h -@@ -74,7 +74,11 @@ - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG - - #undef CRIS_SUBTARGET_VERSION --#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" -+#if UCLIBC_DEFAULT -+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" -+#else -+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" -+#endif - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - ---- gcc/libstdc++-v3/configure -+++ gcc/libstdc++-v3/configure -@@ -4276,7 +4276,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/zlib/configure -+++ gcc/zlib/configure -@@ -3422,7 +3422,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libobjc/configure -+++ gcc/libobjc/configure -@@ -3309,7 +3309,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libgfortran/configure -+++ gcc/libgfortran/configure -@@ -3695,7 +3695,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libmudflap/configure -+++ gcc/libmudflap/configure -@@ -5378,7 +5378,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/boehm-gc/configure -+++ gcc/boehm-gc/configure -@@ -4316,7 +4316,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libffi/configure -+++ gcc/libffi/configure -@@ -3453,7 +3453,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libssp/configure -+++ gcc/libssp/configure -@@ -4409,7 +4409,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/contrib/regression/objs-gcc.sh -+++ gcc/contrib/regression/objs-gcc.sh +Index: gcc-4.3.1/contrib/regression/objs-gcc.sh +=================================================================== +--- gcc-4.3.1.orig/contrib/regression/objs-gcc.sh 2007-12-24 15:18:57.000000000 -0800 ++++ gcc-4.3.1/contrib/regression/objs-gcc.sh 2008-08-16 01:15:12.000000000 -0700 @@ -105,6 +105,10 @@ then make all-gdb all-dejagnu all-ld || exit 1 @@ -125,61 +13,10 @@ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then make bootstrap || exit 1 make install || exit 1 ---- gcc/libjava/classpath/ltconfig -+++ gcc/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no ---- gcc/libjava/classpath/configure -+++ gcc/libjava/classpath/configure -@@ -4665,7 +4665,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libjava/configure -+++ gcc/libjava/configure -@@ -5212,7 +5212,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libtool.m4 -+++ gcc/libtool.m4 -@@ -739,7 +739,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/ltconfig -+++ gcc/ltconfig +Index: gcc-4.3.1/libjava/classpath/ltconfig +=================================================================== +--- gcc-4.3.1.orig/libjava/classpath/ltconfig 2007-06-03 16:18:43.000000000 -0700 ++++ gcc-4.3.1/libjava/classpath/ltconfig 2008-08-16 01:15:12.000000000 -0700 @@ -603,7 +603,7 @@ # Transform linux* to *-*-linux-gnu*, to support old configure scripts. diff --git a/meta/packages/gcc/gcc-4.3.3/200-uclibc-locale.patch b/meta/packages/gcc/gcc-4.3.3/200-uclibc-locale.patch index ea21388b75..70ba98eed7 100644 --- a/meta/packages/gcc/gcc-4.3.3/200-uclibc-locale.patch +++ b/meta/packages/gcc/gcc-4.3.3/200-uclibc-locale.patch @@ -1,6 +1,8 @@ ---- gcc/libstdc++-v3/acinclude.m4 -+++ gcc/libstdc++-v3/acinclude.m4 -@@ -1369,7 +1369,7 @@ +Index: gcc-4.3.2/libstdc++-v3/acinclude.m4 +=================================================================== +--- gcc-4.3.2.orig/libstdc++-v3/acinclude.m4 2008-04-25 09:52:57.000000000 -0700 ++++ gcc-4.3.2/libstdc++-v3/acinclude.m4 2008-08-28 17:55:56.000000000 -0700 +@@ -1349,7 +1349,7 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], [use MODEL for target locale package], @@ -9,7 +11,7 @@ # Deal with gettext issues. Default to not using it (=no) until we detect # support for it later. Let the user turn it off via --e/d, but let that -@@ -1385,6 +1385,9 @@ +@@ -1370,6 +1370,9 @@ # Default to "generic". if test $enable_clocale_flag = auto; then case ${target_os} in @@ -17,9 +19,9 @@ + enable_clocale_flag=uclibc + ;; linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - AC_EGREP_CPP([_GLIBCXX_ok], [ - #include -@@ -1528,6 +1531,40 @@ + enable_clocale_flag=gnu + ;; +@@ -1541,6 +1544,40 @@ CTIME_CC=config/locale/generic/time_members.cc CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h ;; @@ -60,8 +62,10 @@ esac # This is where the testsuite looks for locale catalogs, using the ---- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,63 @@ +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- + @@ -102,7 +106,7 @@ +#endif + +#ifdef __UCLIBC_HAS_XLOCALE__ -+ ++ +extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; +extern "C" __typeof(strcoll_l) __strcoll_l; +extern "C" __typeof(strftime_l) __strftime_l; @@ -123,11 +127,13 @@ +extern "C" __typeof(wcsftime_l) __wcsftime_l; +extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; +extern "C" __typeof(wctype_l) __wctype_l; -+#endif ++#endif + +#endif // GLIBC 2.3 and later ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,160 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + @@ -184,11 +190,11 @@ +#define __duplocale(a) __c_locale() +#endif + -+namespace std ++namespace std +{ + template<> + void -+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, ++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, + const __c_locale& __cloc) + { + if (!(__err & ios_base::failbit)) @@ -205,7 +211,7 @@ + + template<> + void -+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, ++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, + const __c_locale& __cloc) + { + if (!(__err & ios_base::failbit)) @@ -238,7 +244,7 @@ + } + + void -+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, ++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale __old) + { + __cloc = __newlocale(1 << LC_ALL, __s, __old); @@ -251,12 +257,12 @@ + } +#endif + } -+ ++ + void + locale::facet::_S_destroy_c_locale(__c_locale& __cloc) + { + if (_S_get_c_locale() != __cloc) -+ __freelocale(__cloc); ++ __freelocale(__cloc); + } + + __c_locale @@ -268,19 +274,19 @@ +{ + const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = + { -+ "LC_CTYPE", ++ "LC_CTYPE", + "LC_NUMERIC", -+ "LC_TIME", -+ "LC_COLLATE", ++ "LC_TIME", ++ "LC_COLLATE", + "LC_MONETARY", -+ "LC_MESSAGES", ++ "LC_MESSAGES", +#if _GLIBCXX_NUM_CATEGORIES != 0 -+ "LC_PAPER", -+ "LC_NAME", ++ "LC_PAPER", ++ "LC_NAME", + "LC_ADDRESS", -+ "LC_TELEPHONE", -+ "LC_MEASUREMENT", -+ "LC_IDENTIFICATION" ++ "LC_TELEPHONE", ++ "LC_MEASUREMENT", ++ "LC_IDENTIFICATION" +#endif + }; +} @@ -289,8 +295,10 @@ +{ + const char* const* const locale::_S_categories = __gnu_cxx::category_names; +} // namespace std ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,117 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + @@ -356,7 +364,7 @@ +#endif +// #define _GLIBCXX_NUM_CATEGORIES 6 +#define _GLIBCXX_NUM_CATEGORIES 0 -+ ++ +#ifdef __UCLIBC_HAS_XLOCALE__ +namespace __gnu_cxx +{ @@ -378,7 +386,7 @@ + // be avoided. + template + int -+ __convert_from_v(char* __out, ++ __convert_from_v(char* __out, + const int __size __attribute__ ((__unused__)), + const char* __fmt, +#ifdef __UCLIBC_HAS_XCLOCALE__ @@ -409,9 +417,11 @@ +} + +#endif ---- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -@@ -0,0 +1,306 @@ +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2008-08-28 17:55:56.000000000 -0700 +@@ -0,0 +1,308 @@ +// std::codecvt implementation details, GNU version -*- C++ -*- + +// Copyright (C) 2002, 2003 Free Software Foundation, Inc. @@ -448,6 +458,8 @@ +// Written by Benjamin Kosnik + +#include ++#include // For MB_CUR_MAX ++#include // For MB_LEN_MAX +#include + +namespace std @@ -456,7 +468,7 @@ +#ifdef _GLIBCXX_USE_WCHAR_T + codecvt_base::result + codecvt:: -+ do_out(state_type& __state, const intern_type* __from, ++ do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const @@ -526,12 +538,12 @@ + __uselocale(__old); +#endif + -+ return __ret; ++ return __ret; + } -+ ++ + codecvt_base::result + codecvt:: -+ do_in(state_type& __state, const extern_type* __from, ++ do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const @@ -575,12 +587,12 @@ + break; + } + __from_next = __from; -+ __state = __tmp_state; ++ __state = __tmp_state; + __ret = error; + } + else if (__from_next && __from_next < __from_chunk_end) + { -+ // It is unclear what to return in this case (see DR 382). ++ // It is unclear what to return in this case (see DR 382). + __to_next += __conv; + __ret = partial; + } @@ -595,7 +607,7 @@ + if (__to_next < __to_end) + { + // XXX Probably wrong for stateful encodings -+ __tmp_state = __state; ++ __tmp_state = __state; + ++__from_next; + *__to_next++ = L'\0'; + } @@ -608,10 +620,10 @@ + __uselocale(__old); +#endif + -+ return __ret; ++ return __ret; + } + -+ int ++ int + codecvt:: + do_encoding() const throw() + { @@ -627,9 +639,9 @@ + __uselocale(__old); +#endif + return __ret; -+ } ++ } + -+ int ++ int + codecvt:: + do_max_length() const throw() + { @@ -643,8 +655,8 @@ +#endif + return __ret; + } -+ -+ int ++ ++ int + codecvt:: + do_length(state_type& __state, const extern_type* __from, + const extern_type* __end, size_t __max) const @@ -659,10 +671,10 @@ + // mbsnrtowcs is *very* fast but stops if encounters NUL characters: + // in case we advance past it and then continue, in a loop. + // NB: mbsnrtowcs is a GNU extension -+ ++ + // A dummy internal buffer is needed in order for mbsnrtocws to consider + // its fourth parameter (it wouldn't with NULL as first parameter). -+ wchar_t* __to = static_cast(__builtin_alloca(sizeof(wchar_t) ++ wchar_t* __to = static_cast(__builtin_alloca(sizeof(wchar_t) + * __max)); + while (__from < __end && __max) + { @@ -696,7 +708,7 @@ + } + if (!__from) + __from = __from_chunk_end; -+ ++ + __ret += __from - __tmp_from; + __max -= __conv; + @@ -714,12 +726,14 @@ + __uselocale(__old); +#endif + -+ return __ret; ++ return __ret; + } +#endif +} ---- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/collate_members.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,80 @@ +// std::collate implementation details, GNU version -*- C++ -*- + @@ -771,29 +785,29 @@ + // These are basically extensions to char_traits, and perhaps should + // be put there instead of here. + template<> -+ int ++ int + collate::_M_compare(const char* __one, const char* __two) const -+ { ++ { + int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); + } -+ ++ + template<> + size_t -+ collate::_M_transform(char* __to, const char* __from, -+ size_t __n) const ++ collate::_M_transform(char* __to, const char* __from, ++ size_t __n) const + { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } + +#ifdef _GLIBCXX_USE_WCHAR_T + template<> -+ int -+ collate::_M_compare(const wchar_t* __one, ++ int ++ collate::_M_compare(const wchar_t* __one, + const wchar_t* __two) const + { + int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); + } -+ ++ + template<> + size_t + collate::_M_transform(wchar_t* __to, const wchar_t* __from, @@ -801,8 +815,10 @@ + { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } +#endif +} ---- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,300 @@ +// std::ctype implementation details, GNU version -*- C++ -*- + @@ -857,12 +873,12 @@ + // various /config/os/* files. + template<> + ctype_byname::ctype_byname(const char* __s, size_t __refs) -+ : ctype(0, false, __refs) -+ { ++ : ctype(0, false, __refs) ++ { + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_ctype); -+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); ++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); +#ifdef __UCLIBC_HAS_XLOCALE__ + this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; + this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; @@ -871,7 +887,7 @@ + } + } + -+#ifdef _GLIBCXX_USE_WCHAR_T ++#ifdef _GLIBCXX_USE_WCHAR_T + ctype::__wmask_type + ctype::_M_convert_to_wmask(const mask __m) const + { @@ -916,7 +932,7 @@ + } + return __ret; + } -+ ++ + wchar_t + ctype::do_toupper(wchar_t __c) const + { return __towupper_l(__c, _M_c_locale_ctype); } @@ -931,11 +947,11 @@ + } + return __hi; + } -+ ++ + wchar_t + ctype::do_tolower(wchar_t __c) const + { return __towlower_l(__c, _M_c_locale_ctype); } -+ ++ + const wchar_t* + ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const + { @@ -950,11 +966,11 @@ + bool + ctype:: + do_is(mask __m, wchar_t __c) const -+ { ++ { + // Highest bitmask in ctype_base == 10, but extra in "C" + // library for blank. + bool __ret = false; -+ const size_t __bitmasksize = 11; ++ const size_t __bitmasksize = 11; + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) + if (__m & _M_bit[__bitcur] + && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) @@ -962,10 +978,10 @@ + __ret = true; + break; + } -+ return __ret; ++ return __ret; + } -+ -+ const wchar_t* ++ ++ const wchar_t* + ctype:: + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const + { @@ -973,7 +989,7 @@ + { + // Highest bitmask in ctype_base == 10, but extra in "C" + // library for blank. -+ const size_t __bitmasksize = 11; ++ const size_t __bitmasksize = 11; + mask __m = 0; + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) + if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) @@ -982,8 +998,8 @@ + } + return __hi; + } -+ -+ const wchar_t* ++ ++ const wchar_t* + ctype:: + do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const + { @@ -1006,7 +1022,7 @@ + do_widen(char __c) const + { return _M_widen[static_cast(__c)]; } + -+ const char* ++ const char* + ctype:: + do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const + { @@ -1032,12 +1048,12 @@ +#ifdef __UCLIBC_HAS_XLOCALE__ + __uselocale(__old); +#endif -+ return (__c == EOF ? __dfault : static_cast(__c)); ++ return (__c == EOF ? __dfault : static_cast(__c)); + } + + const wchar_t* + ctype:: -+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, ++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, + char* __dest) const + { +#ifdef __UCLIBC_HAS_XLOCALE__ @@ -1094,7 +1110,7 @@ + _M_widen[__j] = btowc(__j); + + for (size_t __k = 0; __k <= 11; ++__k) -+ { ++ { + _M_bit[__k] = static_cast(_ISbit(__k)); + _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); + } @@ -1104,8 +1120,10 @@ + } +#endif // _GLIBCXX_USE_WCHAR_T +} ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,100 @@ +// std::messages implementation details, GNU version -*- C++ -*- + @@ -1207,8 +1225,10 @@ + } +#endif +} ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,118 @@ +// std::messages implementation details, GNU version -*- C++ -*- + @@ -1262,13 +1282,13 @@ + // Non-virtual member functions. + template + messages<_CharT>::messages(size_t __refs) -+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), ++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), + _M_name_messages(_S_get_c_name()) + { } + + template -+ messages<_CharT>::messages(__c_locale __cloc, const char* __s, -+ size_t __refs) ++ messages<_CharT>::messages(__c_locale __cloc, const char* __s, ++ size_t __refs) + : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), + _M_name_messages(__s) + { @@ -1278,28 +1298,28 @@ + } + + template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::open(const basic_string& __s, const locale& __loc, ++ typename messages<_CharT>::catalog ++ messages<_CharT>::open(const basic_string& __s, const locale& __loc, + const char* __dir) const -+ { ++ { + __bindtextdomain(__s.c_str(), __dir); -+ return this->do_open(__s, __loc); ++ return this->do_open(__s, __loc); + } + + // Virtual member functions. + template + messages<_CharT>::~messages() -+ { ++ { + if (_M_name_messages != _S_get_c_name()) + delete [] _M_name_messages; -+ _S_destroy_c_locale(_M_c_locale_messages); ++ _S_destroy_c_locale(_M_c_locale_messages); + } + + template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::do_open(const basic_string& __s, ++ typename messages<_CharT>::catalog ++ messages<_CharT>::do_open(const basic_string& __s, + const locale&) const -+ { ++ { + // No error checking is done, assume the catalog exists and can + // be used. + __textdomain(__s.c_str()); @@ -1307,15 +1327,15 @@ + } + + template -+ void -+ messages<_CharT>::do_close(catalog) const ++ void ++ messages<_CharT>::do_close(catalog) const + { } + + // messages_byname + template + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) -+ : messages<_CharT>(__refs) -+ { ++ : messages<_CharT>(__refs) ++ { + if (this->_M_name_messages != locale::facet::_S_get_c_name()) + delete [] this->_M_name_messages; + char* __tmp = new char[std::strlen(__s) + 1]; @@ -1325,11 +1345,13 @@ + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_messages); -+ this->_S_create_c_locale(this->_M_c_locale_messages, __s); ++ this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } ---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,692 @@ +// std::moneypunct implementation details, GNU version -*- C++ -*- + @@ -1386,7 +1408,7 @@ + // space none symbol sign value + money_base::pattern + money_base::_S_construct_pattern(char __precedes, char __space, char __posn) -+ { ++ { + pattern __ret; + + // This insanely complicated routine attempts to construct a valid @@ -1394,7 +1416,7 @@ + + // if (__precedes) symbol -> value + // else value -> symbol -+ ++ + // if (__space) space + // else none + @@ -1479,7 +1501,7 @@ + if (__precedes) + { + __ret.field[0] = sign; -+ __ret.field[1] = symbol; ++ __ret.field[1] = symbol; + if (__space) + { + __ret.field[2] = space; @@ -1487,7 +1509,7 @@ + } + else + { -+ __ret.field[2] = value; ++ __ret.field[2] = value; + __ret.field[3] = none; + } + } @@ -1548,9 +1570,9 @@ + return __ret; + } + -+ template<> ++ template<> + void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, + const char*) + { + if (!_M_data) @@ -1579,9 +1601,9 @@ + else + { + // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, + __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, + __cloc)); + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); @@ -1592,30 +1614,30 @@ + if (!__nposn) + _M_data->_M_negative_sign = "()"; + else -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, + __cloc); + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); + + // _Intl == true + _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, + __cloc)); + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, + __pposn); + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, + __nposn); + } + } + -+ template<> ++ template<> + void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, + const char*) + { + if (!_M_data) @@ -1644,9 +1666,9 @@ + else + { + // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, + __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, + __cloc)); + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); @@ -1668,27 +1690,27 @@ + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, + __pposn); + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, + __nposn); + } + } + -+ template<> ++ template<> + moneypunct::~moneypunct() + { delete _M_data; } + -+ template<> ++ template<> + moneypunct::~moneypunct() + { delete _M_data; } + +#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> ++ template<> + void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, ++ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, +#ifdef __UCLIBC_HAS_XLOCALE__ + const char*) +#else @@ -1775,12 +1797,12 @@ + else + _M_data->_M_positive_sign = L""; + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ ++ + __len = strlen(__cnegsign); + if (!__nposn) + _M_data->_M_negative_sign = L"()"; + else if (__len) -+ { ++ { + ++__len; + memset(&__state, 0, sizeof(mbstate_t)); + __wcs_ns = new wchar_t[__len]; @@ -1790,7 +1812,7 @@ + else + _M_data->_M_negative_sign = L""; + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); -+ ++ + // _Intl == true. + __len = strlen(__ccurr); + if (__len) @@ -1810,7 +1832,7 @@ + delete _M_data; + _M_data = 0; + delete __wcs_ps; -+ delete __wcs_ns; ++ delete __wcs_ns; +#ifdef __UCLIBC_HAS_XLOCALE__ + __uselocale(__old); +#else @@ -1818,18 +1840,18 @@ + free(__old); +#endif + __throw_exception_again; -+ } -+ -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, + __cloc)); + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, + __pposn); + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, + __nposn); + +#ifdef __UCLIBC_HAS_XLOCALE__ @@ -1841,7 +1863,7 @@ + } + } + -+ template<> ++ template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale __cloc, +#ifdef __UCLIBC_HAS_XLOCALE__ @@ -1931,12 +1953,12 @@ + else + _M_data->_M_positive_sign = L""; + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ ++ + __len = strlen(__cnegsign); + if (!__nposn) + _M_data->_M_negative_sign = L"()"; + else if (__len) -+ { ++ { + ++__len; + memset(&__state, 0, sizeof(mbstate_t)); + __wcs_ns = new wchar_t[__len]; @@ -1966,7 +1988,7 @@ + delete _M_data; + _M_data = 0; + delete __wcs_ps; -+ delete __wcs_ns; ++ delete __wcs_ns; +#ifdef __UCLIBC_HAS_XLOCALE__ + __uselocale(__old); +#else @@ -1980,11 +2002,11 @@ + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, + __pposn); + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, + __nposn); + +#ifdef __UCLIBC_HAS_XLOCALE__ @@ -1996,7 +2018,7 @@ + } + } + -+ template<> ++ template<> + moneypunct::~moneypunct() + { + if (_M_data->_M_positive_sign_size) @@ -2009,7 +2031,7 @@ + delete _M_data; + } + -+ template<> ++ template<> + moneypunct::~moneypunct() + { + if (_M_data->_M_positive_sign_size) @@ -2023,8 +2045,10 @@ + } +#endif +} ---- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,160 @@ +// std::numpunct implementation details, GNU version -*- C++ -*- + @@ -2075,7 +2099,7 @@ + +namespace std +{ -+ template<> ++ template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc) + { @@ -2101,9 +2125,9 @@ + else + { + // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, + __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, + __cloc)); + + // Check for NULL, which implies no grouping. @@ -2122,13 +2146,13 @@ + _M_data->_M_falsename = "false"; + _M_data->_M_falsename_size = 5; + } -+ -+ template<> ++ ++ template<> + numpunct::~numpunct() + { delete _M_data; } -+ ++ +#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> ++ template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc) + { @@ -2181,13 +2205,15 @@ + _M_data->_M_falsename_size = 5; + } + -+ template<> ++ template<> + numpunct::~numpunct() + { delete _M_data; } + #endif +} ---- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,406 @@ +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- + @@ -2240,7 +2266,7 @@ + template<> + void + __timepunct:: -+ _M_put(char* __s, size_t __maxlen, const char* __format, ++ _M_put(char* __s, size_t __maxlen, const char* __format, + const tm* __tm) const + { +#ifdef __UCLIBC_HAS_XLOCALE__ @@ -2258,7 +2284,7 @@ + __s[0] = '\0'; + } + -+ template<> ++ template<> + void + __timepunct::_M_initialize_timepunct(__c_locale __cloc) + { @@ -2328,7 +2354,7 @@ + } + else + { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); + + _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); + _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); @@ -2393,7 +2419,7 @@ + template<> + void + __timepunct:: -+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, ++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, + const tm* __tm) const + { +#ifdef __UCLIBC_HAS_XLOCALE__ @@ -2412,7 +2438,7 @@ + __s[0] = L'\0'; + } + -+ template<> ++ template<> + void + __timepunct::_M_initialize_timepunct(__c_locale __cloc) + { @@ -2484,7 +2510,7 @@ +#if 0 + else + { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); + + union { char *__s; wchar_t *__w; } __u; + @@ -2595,8 +2621,10 @@ + } +#endif +} ---- gcc/libstdc++-v3/config/locale/uclibc/time_members.h -+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 2008-08-28 17:55:56.000000000 -0700 @@ -0,0 +1,68 @@ +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- + @@ -2635,40 +2663,42 @@ +// Written by Benjamin Kosnik + + template -+ __timepunct<_CharT>::__timepunct(size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ __timepunct<_CharT>::__timepunct(size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), + _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + + template -+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) -+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), ++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) ++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), + _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + + template + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, -+ size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), + _M_name_timepunct(__s) -+ { ++ { + char* __tmp = new char[std::strlen(__s) + 1]; + std::strcpy(__tmp, __s); + _M_name_timepunct = __tmp; -+ _M_initialize_timepunct(__cloc); ++ _M_initialize_timepunct(__cloc); + } + + template + __timepunct<_CharT>::~__timepunct() -+ { ++ { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; -+ delete _M_data; -+ _S_destroy_c_locale(_M_c_locale_timepunct); ++ delete _M_data; ++ _S_destroy_c_locale(_M_c_locale_timepunct); + } ---- gcc/libstdc++-v3/configure -+++ gcc/libstdc++-v3/configure -@@ -5764,7 +5764,7 @@ +Index: gcc-4.3.2/libstdc++-v3/configure +=================================================================== +--- gcc-4.3.2.orig/libstdc++-v3/configure 2008-07-07 12:49:54.000000000 -0700 ++++ gcc-4.3.2/libstdc++-v3/configure 2008-08-28 18:02:13.000000000 -0700 +@@ -14003,7 +14003,7 @@ enableval="$enable_clocale" case "$enableval" in @@ -2677,17 +2707,17 @@ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5 echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;} { (exit 1); exit 1; }; } ;; -@@ -5789,6 +5789,9 @@ +@@ -14036,6 +14036,9 @@ # Default to "generic". if test $enable_clocale_flag = auto; then case ${target_os} in -+ linux-uclibc*) ++ *-uclibc*) + enable_clocale_flag=uclibc -+ ;; ++ ;; linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ -@@ -6019,6 +6022,76 @@ + enable_clocale_flag=gnu + ;; +@@ -14424,6 +14427,76 @@ CTIME_CC=config/locale/generic/time_members.cc CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h ;; @@ -2764,9 +2794,20 @@ esac # This is where the testsuite looks for locale catalogs, using the ---- gcc/libstdc++-v3/include/c_compatibility/wchar.h -+++ gcc/libstdc++-v3/include/c_compatibility/wchar.h -@@ -101,7 +101,9 @@ +@@ -17016,7 +17089,7 @@ + + # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. + cat > conftest.$ac_ext << EOF +-#line 17019 "configure" ++#line 17092 "configure" + int main() + { + // NB: _Atomic_word not necessarily int. +Index: gcc-4.3.2/libstdc++-v3/include/c_compatibility/wchar.h +=================================================================== +--- gcc-4.3.2.orig/libstdc++-v3/include/c_compatibility/wchar.h 2007-03-04 14:59:49.000000000 -0800 ++++ gcc-4.3.2/libstdc++-v3/include/c_compatibility/wchar.h 2008-08-28 17:55:56.000000000 -0700 +@@ -106,7 +106,9 @@ using std::wmemcpy; using std::wmemmove; using std::wmemset; @@ -2776,8 +2817,10 @@ #if _GLIBCXX_USE_C99 using std::wcstold; ---- gcc/libstdc++-v3/include/c_std/std_cwchar.h -+++ gcc/libstdc++-v3/include/c_std/std_cwchar.h +Index: gcc-4.3.2/libstdc++-v3/include/c_std/cwchar +=================================================================== +--- gcc-4.3.2.orig/libstdc++-v3/include/c_std/cwchar 2007-05-27 07:50:21.000000000 -0700 ++++ gcc-4.3.2/libstdc++-v3/include/c_std/cwchar 2008-08-28 17:55:56.000000000 -0700 @@ -182,7 +182,9 @@ using ::wcscoll; using ::wcscpy; diff --git a/meta/packages/gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch b/meta/packages/gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch index 6ba47003b3..f39e65220c 100644 --- a/meta/packages/gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch +++ b/meta/packages/gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch @@ -1,8 +1,10 @@ ---- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:29:20.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:33:23.000000000 -0700 @@ -60,4 +60,49 @@ extern "C" __typeof(wctype_l) __wctype_l; - #endif + #endif +# define __nl_langinfo_l nl_langinfo_l +# define __strcoll_l strcoll_l @@ -44,14 +46,16 @@ +# define __towlower_l(C, L) towlower((C)) +# define __towupper_l(C, L) towupper((C)) +# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) -+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T)) ++//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T)) +# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) +# define __wctype_l(S, L) wctype((S)) +# endif + #endif // GLIBC 2.3 and later ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:29:20.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:33:00.000000000 -0700 @@ -39,20 +39,6 @@ #include #include @@ -70,11 +74,13 @@ -#define __duplocale(a) __c_locale() -#endif - - namespace std + namespace std { template<> ---- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:29:20.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:30:31.000000000 -0700 @@ -36,13 +36,6 @@ #include #include @@ -89,8 +95,10 @@ namespace std { // These are basically extensions to char_traits, and perhaps should ---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:29:20.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:30:31.000000000 -0700 @@ -43,10 +43,6 @@ #warning tailor for stub locale support #endif @@ -102,8 +110,10 @@ namespace std { // Construct and return valid pattern consisting of some combination of: ---- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:29:20.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:30:31.000000000 -0700 @@ -41,9 +41,6 @@ #ifdef __UCLIBC_MJN3_ONLY__ #warning tailor for stub locale support @@ -114,8 +124,10 @@ namespace std { ---- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:29:20.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:30:31.000000000 -0700 @@ -40,9 +40,6 @@ #ifdef __UCLIBC_MJN3_ONLY__ #warning tailor for stub locale support @@ -126,8 +138,10 @@ namespace std { ---- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:29:20.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:30:31.000000000 -0700 @@ -38,13 +38,6 @@ #undef _LIBC #include @@ -142,8 +156,10 @@ namespace std { // NB: The other ctype specializations are in src/locale.cc and ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:27:18.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:30:31.000000000 -0700 @@ -39,13 +39,10 @@ #ifdef __UCLIBC_MJN3_ONLY__ #warning fix gettext stuff @@ -160,8 +176,10 @@ #define gettext(msgid) (msgid) #endif ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:29:20.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:31:43.000000000 -0700 @@ -36,15 +36,11 @@ #ifdef __UCLIBC_MJN3_ONLY__ #warning fix prototypes for *textdomain funcs @@ -184,16 +202,16 @@ // Non-virtual member functions. @@ -70,7 +66,7 @@ - messages<_CharT>::open(const basic_string& __s, const locale& __loc, + messages<_CharT>::open(const basic_string& __s, const locale& __loc, const char* __dir) const - { + { - __bindtextdomain(__s.c_str(), __dir); + bindtextdomain(__s.c_str(), __dir); - return this->do_open(__s, __loc); + return this->do_open(__s, __loc); } @@ -90,7 +86,7 @@ - { + { // No error checking is done, assume the catalog exists and can // be used. - __textdomain(__s.c_str()); @@ -201,8 +219,10 @@ return 0; } ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100 +Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h +=================================================================== +--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:29:20.000000000 -0700 ++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:30:31.000000000 -0700 @@ -68,6 +68,7 @@ { extern "C" __typeof(uselocale) __uselocale; diff --git a/meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch b/meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch index 86b2844554..48eaa1d442 100644 --- a/meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch +++ b/meta/packages/gcc/gcc-4.3.3/205-uclibc-locale-update.patch @@ -1,7 +1,18 @@ ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100 -@@ -46,16 +47,13 @@ - __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc +=================================================================== +--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:28.000000000 -0700 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:29.000000000 -0700 +@@ -39,23 +39,20 @@ + #include + #include + +-namespace std +-{ ++_GLIBCXX_BEGIN_NAMESPACE(std) ++ + template<> + void + __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, const __c_locale& __cloc) { - if (!(__err & ios_base::failbit)) @@ -24,8 +35,8 @@ } template<> -@@ -63,16 +61,13 @@ - __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, +@@ -63,16 +60,13 @@ + __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, const __c_locale& __cloc) { - if (!(__err & ios_base::failbit)) @@ -48,7 +59,7 @@ } template<> -@@ -80,16 +75,13 @@ +@@ -80,16 +74,13 @@ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, const __c_locale& __cloc) { @@ -72,18 +83,50 @@ } void -@@ -110,7 +102,7 @@ +@@ -110,17 +101,18 @@ void locale::facet::_S_destroy_c_locale(__c_locale& __cloc) { - if (_S_get_c_locale() != __cloc) + if (__cloc && _S_get_c_locale() != __cloc) - __freelocale(__cloc); + __freelocale(__cloc); } ---- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100 -@@ -33,9 +33,14 @@ + __c_locale + locale::facet::_S_clone_c_locale(__c_locale& __cloc) + { return __duplocale(__cloc); } +-} // namespace std + +-namespace __gnu_cxx +-{ ++_GLIBCXX_END_NAMESPACE ++ ++_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ++ + const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = + { + "LC_CTYPE", +@@ -138,9 +130,11 @@ + "LC_IDENTIFICATION" + #endif + }; +-} + +-namespace std +-{ ++_GLIBCXX_END_NAMESPACE ++ ++_GLIBCXX_BEGIN_NAMESPACE(std) ++ + const char* const* const locale::_S_categories = __gnu_cxx::category_names; +-} // namespace std ++ ++_GLIBCXX_END_NAMESPACE +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc +=================================================================== +--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 22:35:28.000000000 -0700 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 23:09:49.000000000 -0700 +@@ -33,16 +33,20 @@ // Written by Benjamin Kosnik @@ -97,11 +140,29 @@ +#endif #include - namespace std -@@ -138,20 +143,34 @@ +-namespace std +-{ ++_GLIBCXX_BEGIN_NAMESPACE(std) ++ + // NB: The other ctype specializations are in src/locale.cc and + // various /config/os/* files. +- template<> + ctype_byname::ctype_byname(const char* __s, size_t __refs) + : ctype(0, false, __refs) + { +@@ -57,6 +61,8 @@ + #endif + } + } ++ ctype_byname::~ctype_byname() ++ { } + + #ifdef _GLIBCXX_USE_WCHAR_T + ctype::__wmask_type +@@ -138,17 +144,33 @@ ctype:: do_is(mask __m, wchar_t __c) const - { + { - // Highest bitmask in ctype_base == 10, but extra in "C" - // library for blank. + // The case of __m == ctype_base::space is particularly important, @@ -109,8 +170,9 @@ + // it first, exploiting the knowledge that on GNU systems _M_bit[5] + // is the mask corresponding to ctype_base::space. NB: an encoding + // change would not affect correctness! ++ bool __ret = false; -- const size_t __bitmasksize = 11; +- const size_t __bitmasksize = 11; - for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) - if (__m & _M_bit[__bitcur] - && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) @@ -137,29 +199,29 @@ + break; + } + } - return __ret; - } -- + - const wchar_t* - ctype:: - do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100 -@@ -47,18 +47,21 @@ - template - messages<_CharT>::messages(size_t __refs) - : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), -- _M_name_messages(_S_get_c_name()) -+ _M_name_messages(_S_get_c_name()) - { } + return __ret; + } +@@ -290,4 +312,5 @@ + #endif + } + #endif // _GLIBCXX_USE_WCHAR_T +-} ++ ++_GLIBCXX_END_NAMESPACE +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h +=================================================================== +--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 22:35:28.000000000 -0700 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 23:13:34.000000000 -0700 +@@ -53,12 +53,16 @@ template - messages<_CharT>::messages(__c_locale __cloc, const char* __s, - size_t __refs) + messages<_CharT>::messages(__c_locale __cloc, const char* __s, + size_t __refs) - : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), - _M_name_messages(__s) -+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL) ++ : facet(__refs), _M_c_locale_messages(NULL), ++ _M_name_messages(NULL) { - char* __tmp = new char[std::strlen(__s) + 1]; - std::strcpy(__tmp, __s); @@ -173,8 +235,10 @@ } template ---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100 +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc +=================================================================== +--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:28.000000000 -0700 ++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:29.000000000 -0700 @@ -33,9 +33,14 @@ // Written by Benjamin Kosnik @@ -199,8 +263,79 @@ } return __ret; } ---- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100 +@@ -390,7 +395,9 @@ + __c_locale __old = __uselocale(__cloc); + #else + // Switch to named locale so that mbsrtowcs will work. +- char* __old = strdup(setlocale(LC_ALL, NULL)); ++ char* __old = setlocale(LC_ALL, NULL); ++ const size_t __llen = strlen(__old) + 1; ++ char* __sav = new char[__llen]; + setlocale(LC_ALL, __name); + #endif + +@@ -477,8 +484,8 @@ + #ifdef __UCLIBC_HAS_XLOCALE__ + __uselocale(__old); + #else +- setlocale(LC_ALL, __old); +- free(__old); ++ setlocale(LC_ALL, __sav); ++ delete [] __sav; + #endif + __throw_exception_again; + } +@@ -498,8 +505,8 @@ + #ifdef __UCLIBC_HAS_XLOCALE__ + __uselocale(__old); + #else +- setlocale(LC_ALL, __old); +- free(__old); ++ setlocale(LC_ALL, __sav); ++ delete [] __sav; + #endif + } + } +@@ -545,8 +552,11 @@ + __c_locale __old = __uselocale(__cloc); + #else + // Switch to named locale so that mbsrtowcs will work. +- char* __old = strdup(setlocale(LC_ALL, NULL)); +- setlocale(LC_ALL, __name); ++ char* __old = setlocale(LC_ALL, NULL); ++ const size_t __llen = strlen(__old) + 1; ++ char* __sav = new char[__llen]; ++ memcpy(__sav, __old, __llen); ++ setlocale(LC_ALL, __name); + #endif + + #ifdef __UCLIBC_MJN3_ONLY__ +@@ -633,8 +643,8 @@ + #ifdef __UCLIBC_HAS_XLOCALE__ + __uselocale(__old); + #else +- setlocale(LC_ALL, __old); +- free(__old); ++ setlocale(LC_ALL, __sav); ++ delete [] __sav; + #endif + __throw_exception_again; + } +@@ -653,8 +663,8 @@ + #ifdef __UCLIBC_HAS_XLOCALE__ + __uselocale(__old); + #else +- setlocale(LC_ALL, __old); +- free(__old); ++ setlocale(LC_ALL, __sav); ++ delete [] __sav; + #endif + } + } +Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc +========================================