patches/gcc/3.4.4/200-uclibc-locale.patch
changeset 330 447b203edc2e
parent 329 419d959441ed
child 331 0c05f9ea3254
     1.1 --- a/patches/gcc/3.4.4/200-uclibc-locale.patch	Tue Aug 14 19:32:22 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,3255 +0,0 @@
     1.4 -diff -urN gcc-3.4.2-dist/libstdc++-v3/acinclude.m4 gcc-3.4.2/libstdc++-v3/acinclude.m4
     1.5 ---- gcc-3.4.2-dist/libstdc++-v3/acinclude.m4	2004-07-15 12:42:45.000000000 -0500
     1.6 -+++ gcc-3.4.2/libstdc++-v3/acinclude.m4	2004-09-10 10:47:40.000000000 -0500
     1.7 -@@ -996,7 +996,7 @@
     1.8 -   AC_MSG_CHECKING([for C locale to use])
     1.9 -   GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
    1.10 -     [use MODEL for target locale package],
    1.11 --    [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
    1.12 -+    [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
    1.13 -   
    1.14 -   # If they didn't use this option switch, or if they specified --enable
    1.15 -   # with no specific model, we'll have to look for one.  If they
    1.16 -@@ -1012,6 +1012,9 @@
    1.17 -   # Default to "generic".
    1.18 -   if test $enable_clocale_flag = auto; then
    1.19 -     case x${target_os} in
    1.20 -+      x*-uclibc*)
    1.21 -+        enable_clocale_flag=uclibc
    1.22 -+        ;;
    1.23 -       xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
    1.24 -         AC_EGREP_CPP([_GLIBCXX_ok], [
    1.25 -         #include <features.h>
    1.26 -@@ -1138,6 +1141,41 @@
    1.27 -       CTIME_CC=config/locale/generic/time_members.cc
    1.28 -       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
    1.29 -       ;;
    1.30 -+    uclibc)
    1.31 -+      AC_MSG_RESULT(uclibc)
    1.32 -+
    1.33 -+      # Declare intention to use gettext, and add support for specific
    1.34 -+      # languages.
    1.35 -+      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
    1.36 -+      ALL_LINGUAS="de fr"
    1.37 -+
    1.38 -+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
    1.39 -+      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
    1.40 -+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
    1.41 -+        USE_NLS=yes
    1.42 -+      fi
    1.43 -+      # Export the build objects.
    1.44 -+      for ling in $ALL_LINGUAS; do \
    1.45 -+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
    1.46 -+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
    1.47 -+      done
    1.48 -+      AC_SUBST(glibcxx_MOFILES)
    1.49 -+      AC_SUBST(glibcxx_POFILES)
    1.50 -+
    1.51 -+      CLOCALE_H=config/locale/uclibc/c_locale.h
    1.52 -+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
    1.53 -+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
    1.54 -+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
    1.55 -+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
    1.56 -+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
    1.57 -+      CMESSAGES_H=config/locale/uclibc/messages_members.h
    1.58 -+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
    1.59 -+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
    1.60 -+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
    1.61 -+      CTIME_H=config/locale/uclibc/time_members.h
    1.62 -+      CTIME_CC=config/locale/uclibc/time_members.cc
    1.63 -+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
    1.64 -+      ;;
    1.65 -   esac
    1.66 - 
    1.67 -   # This is where the testsuite looks for locale catalogs, using the
    1.68 -diff -urN gcc-3.4.2-dist/libstdc++-v3/aclocal.m4 gcc-3.4.2/libstdc++-v3/aclocal.m4
    1.69 ---- gcc-3.4.2-dist/libstdc++-v3/aclocal.m4	2004-08-13 15:44:03.000000000 -0500
    1.70 -+++ gcc-3.4.2/libstdc++-v3/aclocal.m4	2004-09-10 10:47:40.000000000 -0500
    1.71 -@@ -1025,6 +1025,9 @@
    1.72 -   # Default to "generic".
    1.73 -   if test $enable_clocale_flag = auto; then
    1.74 -     case x${target_os} in
    1.75 -+      x*-uclibc*)
    1.76 -+	enable_clocale_flag=uclibc
    1.77 -+	;;
    1.78 -       xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
    1.79 -         AC_EGREP_CPP([_GLIBCXX_ok], [
    1.80 -         #include <features.h>
    1.81 -@@ -1151,6 +1154,41 @@
    1.82 -       CTIME_CC=config/locale/generic/time_members.cc
    1.83 -       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
    1.84 -       ;;
    1.85 -+    uclibc)
    1.86 -+      AC_MSG_RESULT(uclibc)
    1.87 -+
    1.88 -+      # Declare intention to use gettext, and add support for specific
    1.89 -+      # languages.
    1.90 -+      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
    1.91 -+      ALL_LINGUAS="de fr"
    1.92 -+
    1.93 -+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
    1.94 -+      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
    1.95 -+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
    1.96 -+        USE_NLS=yes
    1.97 -+      fi
    1.98 -+      # Export the build objects.
    1.99 -+      for ling in $ALL_LINGUAS; do \
   1.100 -+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
   1.101 -+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
   1.102 -+      done
   1.103 -+      AC_SUBST(glibcxx_MOFILES)
   1.104 -+      AC_SUBST(glibcxx_POFILES)
   1.105 -+
   1.106 -+      CLOCALE_H=config/locale/uclibc/c_locale.h
   1.107 -+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
   1.108 -+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
   1.109 -+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
   1.110 -+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
   1.111 -+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
   1.112 -+      CMESSAGES_H=config/locale/uclibc/messages_members.h
   1.113 -+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
   1.114 -+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
   1.115 -+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
   1.116 -+      CTIME_H=config/locale/uclibc/time_members.h
   1.117 -+      CTIME_CC=config/locale/uclibc/time_members.cc
   1.118 -+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
   1.119 -+      ;;
   1.120 -   esac
   1.121 - 
   1.122 -   # This is where the testsuite looks for locale catalogs, using the
   1.123 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
   1.124 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	1969-12-31 18:00:00.000000000 -0600
   1.125 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	2004-09-10 10:47:40.000000000 -0500
   1.126 -@@ -0,0 +1,59 @@
   1.127 -+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
   1.128 -+
   1.129 -+// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
   1.130 -+//
   1.131 -+// This file is part of the GNU ISO C++ Library.  This library is free
   1.132 -+// software; you can redistribute it and/or modify it under the
   1.133 -+// terms of the GNU General Public License as published by the
   1.134 -+// Free Software Foundation; either version 2, or (at your option)
   1.135 -+// any later version.
   1.136 -+
   1.137 -+// This library is distributed in the hope that it will be useful,
   1.138 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
   1.139 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   1.140 -+// GNU General Public License for more details.
   1.141 -+
   1.142 -+// You should have received a copy of the GNU General Public License along
   1.143 -+// with this library; see the file COPYING.  If not, write to the Free
   1.144 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
   1.145 -+// USA.
   1.146 -+
   1.147 -+// As a special exception, you may use this file as part of a free software
   1.148 -+// library without restriction.  Specifically, if other files instantiate
   1.149 -+// templates or use macros or inline functions from this file, or you compile
   1.150 -+// this file and link it with other files to produce an executable, this
   1.151 -+// file does not by itself cause the resulting executable to be covered by
   1.152 -+// the GNU General Public License.  This exception does not however
   1.153 -+// invalidate any other reasons why the executable file might be covered by
   1.154 -+// the GNU General Public License.
   1.155 -+
   1.156 -+// Written by Jakub Jelinek <jakub@redhat.com>
   1.157 -+
   1.158 -+#include <clocale>
   1.159 -+
   1.160 -+#ifdef __UCLIBC_MJN3_ONLY__
   1.161 -+#warning clean this up
   1.162 -+#endif
   1.163 -+
   1.164 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.165 -+                                                  
   1.166 -+extern "C" __typeof(iswctype_l) __iswctype_l;
   1.167 -+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
   1.168 -+extern "C" __typeof(strcoll_l) __strcoll_l;
   1.169 -+extern "C" __typeof(strftime_l) __strftime_l;
   1.170 -+extern "C" __typeof(strtod_l) __strtod_l;
   1.171 -+extern "C" __typeof(strtof_l) __strtof_l;
   1.172 -+extern "C" __typeof(strtold_l) __strtold_l;
   1.173 -+extern "C" __typeof(strxfrm_l) __strxfrm_l;
   1.174 -+extern "C" __typeof(towlower_l) __towlower_l;
   1.175 -+extern "C" __typeof(towupper_l) __towupper_l;
   1.176 -+extern "C" __typeof(wcscoll_l) __wcscoll_l;
   1.177 -+extern "C" __typeof(wcsftime_l) __wcsftime_l;
   1.178 -+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
   1.179 -+extern "C" __typeof(wctype_l) __wctype_l;
   1.180 -+extern "C" __typeof(newlocale) __newlocale;
   1.181 -+extern "C" __typeof(freelocale) __freelocale;
   1.182 -+extern "C" __typeof(duplocale) __duplocale;
   1.183 -+extern "C" __typeof(uselocale) __uselocale;
   1.184 -+
   1.185 -+#endif // GLIBC 2.3 and later
   1.186 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
   1.187 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc	1969-12-31 18:00:00.000000000 -0600
   1.188 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc	2004-09-10 10:47:40.000000000 -0500
   1.189 -@@ -0,0 +1,160 @@
   1.190 -+// Wrapper for underlying C-language localization -*- C++ -*-
   1.191 -+
   1.192 -+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
   1.193 -+//
   1.194 -+// This file is part of the GNU ISO C++ Library.  This library is free
   1.195 -+// software; you can redistribute it and/or modify it under the
   1.196 -+// terms of the GNU General Public License as published by the
   1.197 -+// Free Software Foundation; either version 2, or (at your option)
   1.198 -+// any later version.
   1.199 -+
   1.200 -+// This library is distributed in the hope that it will be useful,
   1.201 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
   1.202 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   1.203 -+// GNU General Public License for more details.
   1.204 -+
   1.205 -+// You should have received a copy of the GNU General Public License along
   1.206 -+// with this library; see the file COPYING.  If not, write to the Free
   1.207 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
   1.208 -+// USA.
   1.209 -+
   1.210 -+// As a special exception, you may use this file as part of a free software
   1.211 -+// library without restriction.  Specifically, if other files instantiate
   1.212 -+// templates or use macros or inline functions from this file, or you compile
   1.213 -+// this file and link it with other files to produce an executable, this
   1.214 -+// file does not by itself cause the resulting executable to be covered by
   1.215 -+// the GNU General Public License.  This exception does not however
   1.216 -+// invalidate any other reasons why the executable file might be covered by
   1.217 -+// the GNU General Public License.
   1.218 -+
   1.219 -+//
   1.220 -+// ISO C++ 14882: 22.8  Standard locale categories.
   1.221 -+//
   1.222 -+
   1.223 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
   1.224 -+
   1.225 -+#include <cerrno>  // For errno
   1.226 -+#include <locale>
   1.227 -+#include <stdexcept>
   1.228 -+#include <langinfo.h>
   1.229 -+#include <bits/c++locale_internal.h>
   1.230 -+
   1.231 -+#ifndef __UCLIBC_HAS_XLOCALE__
   1.232 -+#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
   1.233 -+#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
   1.234 -+#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
   1.235 -+#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
   1.236 -+#define __strtof_l(S, E, L)         strtof((S), (E))
   1.237 -+#define __strtod_l(S, E, L)         strtod((S), (E))
   1.238 -+#define __strtold_l(S, E, L)        strtold((S), (E))
   1.239 -+#warning should dummy __newlocale check for C|POSIX ?
   1.240 -+#define __newlocale(a, b, c)        NULL
   1.241 -+#define __freelocale(a)             ((void)0)
   1.242 -+#define __duplocale(a)              __c_locale()
   1.243 -+#endif
   1.244 -+
   1.245 -+namespace std 
   1.246 -+{
   1.247 -+  template<>
   1.248 -+    void
   1.249 -+    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
   1.250 -+		   const __c_locale& __cloc)
   1.251 -+    {
   1.252 -+      if (!(__err & ios_base::failbit))
   1.253 -+	{
   1.254 -+	  char* __sanity;
   1.255 -+	  errno = 0;
   1.256 -+	  float __f = __strtof_l(__s, &__sanity, __cloc);
   1.257 -+          if (__sanity != __s && errno != ERANGE)
   1.258 -+	    __v = __f;
   1.259 -+	  else
   1.260 -+	    __err |= ios_base::failbit;
   1.261 -+	}
   1.262 -+    }
   1.263 -+
   1.264 -+  template<>
   1.265 -+    void
   1.266 -+    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
   1.267 -+		   const __c_locale& __cloc)
   1.268 -+    {
   1.269 -+      if (!(__err & ios_base::failbit))
   1.270 -+	{
   1.271 -+	  char* __sanity;
   1.272 -+	  errno = 0;
   1.273 -+	  double __d = __strtod_l(__s, &__sanity, __cloc);
   1.274 -+          if (__sanity != __s && errno != ERANGE)
   1.275 -+	    __v = __d;
   1.276 -+	  else
   1.277 -+	    __err |= ios_base::failbit;
   1.278 -+	}
   1.279 -+    }
   1.280 -+
   1.281 -+  template<>
   1.282 -+    void
   1.283 -+    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
   1.284 -+		   const __c_locale& __cloc)
   1.285 -+    {
   1.286 -+      if (!(__err & ios_base::failbit))
   1.287 -+	{
   1.288 -+	  char* __sanity;
   1.289 -+	  errno = 0;
   1.290 -+	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
   1.291 -+          if (__sanity != __s && errno != ERANGE)
   1.292 -+	    __v = __ld;
   1.293 -+	  else
   1.294 -+	    __err |= ios_base::failbit;
   1.295 -+	}
   1.296 -+    }
   1.297 -+
   1.298 -+  void
   1.299 -+  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, 
   1.300 -+				    __c_locale __old)
   1.301 -+  {
   1.302 -+    __cloc = __newlocale(1 << LC_ALL, __s, __old);
   1.303 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.304 -+    if (!__cloc)
   1.305 -+      {
   1.306 -+	// This named locale is not supported by the underlying OS.
   1.307 -+	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
   1.308 -+			      "name not valid"));
   1.309 -+      }
   1.310 -+#endif
   1.311 -+  }
   1.312 -+  
   1.313 -+  void
   1.314 -+  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
   1.315 -+  {
   1.316 -+    if (_S_get_c_locale() != __cloc)
   1.317 -+      __freelocale(__cloc); 
   1.318 -+  }
   1.319 -+
   1.320 -+  __c_locale
   1.321 -+  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
   1.322 -+  { return __duplocale(__cloc); }
   1.323 -+} // namespace std
   1.324 -+
   1.325 -+namespace __gnu_cxx
   1.326 -+{
   1.327 -+  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
   1.328 -+    {
   1.329 -+      "LC_CTYPE", 
   1.330 -+      "LC_NUMERIC",
   1.331 -+      "LC_TIME", 
   1.332 -+      "LC_COLLATE", 
   1.333 -+      "LC_MONETARY",
   1.334 -+      "LC_MESSAGES", 
   1.335 -+#if _GLIBCXX_NUM_CATEGORIES != 0
   1.336 -+      "LC_PAPER", 
   1.337 -+      "LC_NAME", 
   1.338 -+      "LC_ADDRESS",
   1.339 -+      "LC_TELEPHONE", 
   1.340 -+      "LC_MEASUREMENT", 
   1.341 -+      "LC_IDENTIFICATION" 
   1.342 -+#endif
   1.343 -+    };
   1.344 -+}
   1.345 -+
   1.346 -+namespace std
   1.347 -+{
   1.348 -+  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
   1.349 -+}  // namespace std
   1.350 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h
   1.351 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h	1969-12-31 18:00:00.000000000 -0600
   1.352 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h	2004-09-10 10:48:08.000000000 -0500
   1.353 -@@ -0,0 +1,115 @@
   1.354 -+// Wrapper for underlying C-language localization -*- C++ -*-
   1.355 -+
   1.356 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
   1.357 -+//
   1.358 -+// This file is part of the GNU ISO C++ Library.  This library is free
   1.359 -+// software; you can redistribute it and/or modify it under the
   1.360 -+// terms of the GNU General Public License as published by the
   1.361 -+// Free Software Foundation; either version 2, or (at your option)
   1.362 -+// any later version.
   1.363 -+
   1.364 -+// This library is distributed in the hope that it will be useful,
   1.365 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
   1.366 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   1.367 -+// GNU General Public License for more details.
   1.368 -+
   1.369 -+// You should have received a copy of the GNU General Public License along
   1.370 -+// with this library; see the file COPYING.  If not, write to the Free
   1.371 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
   1.372 -+// USA.
   1.373 -+
   1.374 -+// As a special exception, you may use this file as part of a free software
   1.375 -+// library without restriction.  Specifically, if other files instantiate
   1.376 -+// templates or use macros or inline functions from this file, or you compile
   1.377 -+// this file and link it with other files to produce an executable, this
   1.378 -+// file does not by itself cause the resulting executable to be covered by
   1.379 -+// the GNU General Public License.  This exception does not however
   1.380 -+// invalidate any other reasons why the executable file might be covered by
   1.381 -+// the GNU General Public License.
   1.382 -+
   1.383 -+//
   1.384 -+// ISO C++ 14882: 22.8  Standard locale categories.
   1.385 -+//
   1.386 -+
   1.387 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
   1.388 -+
   1.389 -+#ifndef _C_LOCALE_H
   1.390 -+#define _C_LOCALE_H 1
   1.391 -+
   1.392 -+#pragma GCC system_header
   1.393 -+
   1.394 -+#include <cstring>              // get std::strlen
   1.395 -+#include <cstdio>               // get std::snprintf or std::sprintf
   1.396 -+#include <clocale>
   1.397 -+#include <langinfo.h>		// For codecvt
   1.398 -+#ifdef __UCLIBC_MJN3_ONLY__
   1.399 -+#warning fix this
   1.400 -+#endif
   1.401 -+#ifdef __UCLIBC_HAS_LOCALE__
   1.402 -+#include <iconv.h>		// For codecvt using iconv, iconv_t
   1.403 -+#endif
   1.404 -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
   1.405 -+#include <libintl.h> 		// For messages
   1.406 -+#endif
   1.407 -+
   1.408 -+#ifdef __UCLIBC_MJN3_ONLY__
   1.409 -+#warning what is _GLIBCXX_C_LOCALE_GNU for
   1.410 -+#endif
   1.411 -+#define _GLIBCXX_C_LOCALE_GNU 1
   1.412 -+
   1.413 -+#ifdef __UCLIBC_MJN3_ONLY__
   1.414 -+#warning fix categories
   1.415 -+#endif
   1.416 -+// #define _GLIBCXX_NUM_CATEGORIES 6
   1.417 -+#define _GLIBCXX_NUM_CATEGORIES 0
   1.418 -+ 
   1.419 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.420 -+namespace __gnu_cxx
   1.421 -+{
   1.422 -+  extern "C" __typeof(uselocale) __uselocale;
   1.423 -+}
   1.424 -+#endif
   1.425 -+
   1.426 -+namespace std
   1.427 -+{
   1.428 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.429 -+  typedef __locale_t		__c_locale;
   1.430 -+#else
   1.431 -+  typedef int*			__c_locale;
   1.432 -+#endif
   1.433 -+
   1.434 -+  // Convert numeric value of type _Tv to string and return length of
   1.435 -+  // string.  If snprintf is available use it, otherwise fall back to
   1.436 -+  // the unsafe sprintf which, in general, can be dangerous and should
   1.437 -+  // be avoided.
   1.438 -+  template<typename _Tv>
   1.439 -+    int
   1.440 -+    __convert_from_v(char* __out, const int __size, const char* __fmt,
   1.441 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.442 -+		     _Tv __v, const __c_locale& __cloc, int __prec)
   1.443 -+    {
   1.444 -+      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
   1.445 -+#else
   1.446 -+		     _Tv __v, const __c_locale&, int __prec)
   1.447 -+    {
   1.448 -+# ifdef __UCLIBC_HAS_LOCALE__
   1.449 -+      char* __old = std::setlocale(LC_ALL, NULL);
   1.450 -+      char* __sav = new char[std::strlen(__old) + 1];
   1.451 -+      std::strcpy(__sav, __old);
   1.452 -+      std::setlocale(LC_ALL, "C");
   1.453 -+# endif
   1.454 -+#endif
   1.455 -+
   1.456 -+      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
   1.457 -+
   1.458 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.459 -+      __gnu_cxx::__uselocale(__old);
   1.460 -+#elif defined __UCLIBC_HAS_LOCALE__
   1.461 -+      std::setlocale(LC_ALL, __sav);
   1.462 -+      delete [] __sav;
   1.463 -+#endif
   1.464 -+      return __ret;
   1.465 -+    }
   1.466 -+}
   1.467 -+
   1.468 -+#endif
   1.469 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
   1.470 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	1969-12-31 18:00:00.000000000 -0600
   1.471 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	2004-09-10 10:47:40.000000000 -0500
   1.472 -@@ -0,0 +1,306 @@
   1.473 -+// std::codecvt implementation details, GNU version -*- C++ -*-
   1.474 -+
   1.475 -+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
   1.476 -+//
   1.477 -+// This file is part of the GNU ISO C++ Library.  This library is free
   1.478 -+// software; you can redistribute it and/or modify it under the
   1.479 -+// terms of the GNU General Public License as published by the
   1.480 -+// Free Software Foundation; either version 2, or (at your option)
   1.481 -+// any later version.
   1.482 -+
   1.483 -+// This library is distributed in the hope that it will be useful,
   1.484 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
   1.485 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   1.486 -+// GNU General Public License for more details.
   1.487 -+
   1.488 -+// You should have received a copy of the GNU General Public License along
   1.489 -+// with this library; see the file COPYING.  If not, write to the Free
   1.490 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
   1.491 -+// USA.
   1.492 -+
   1.493 -+// As a special exception, you may use this file as part of a free software
   1.494 -+// library without restriction.  Specifically, if other files instantiate
   1.495 -+// templates or use macros or inline functions from this file, or you compile
   1.496 -+// this file and link it with other files to produce an executable, this
   1.497 -+// file does not by itself cause the resulting executable to be covered by
   1.498 -+// the GNU General Public License.  This exception does not however
   1.499 -+// invalidate any other reasons why the executable file might be covered by
   1.500 -+// the GNU General Public License.
   1.501 -+
   1.502 -+//
   1.503 -+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
   1.504 -+//
   1.505 -+
   1.506 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
   1.507 -+
   1.508 -+#include <locale>
   1.509 -+#include <bits/c++locale_internal.h>
   1.510 -+
   1.511 -+namespace std
   1.512 -+{
   1.513 -+  // Specializations.
   1.514 -+#ifdef _GLIBCXX_USE_WCHAR_T
   1.515 -+  codecvt_base::result
   1.516 -+  codecvt<wchar_t, char, mbstate_t>::
   1.517 -+  do_out(state_type& __state, const intern_type* __from, 
   1.518 -+	 const intern_type* __from_end, const intern_type*& __from_next,
   1.519 -+	 extern_type* __to, extern_type* __to_end,
   1.520 -+	 extern_type*& __to_next) const
   1.521 -+  {
   1.522 -+    result __ret = ok;
   1.523 -+    state_type __tmp_state(__state);
   1.524 -+
   1.525 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.526 -+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
   1.527 -+#endif
   1.528 -+
   1.529 -+    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
   1.530 -+    // in case we fall back to wcrtomb and then continue, in a loop.
   1.531 -+    // NB: wcsnrtombs is a GNU extension
   1.532 -+    for (__from_next = __from, __to_next = __to;
   1.533 -+	 __from_next < __from_end && __to_next < __to_end
   1.534 -+	 && __ret == ok;)
   1.535 -+      {
   1.536 -+	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
   1.537 -+						      __from_end - __from_next);
   1.538 -+	if (!__from_chunk_end)
   1.539 -+	  __from_chunk_end = __from_end;
   1.540 -+
   1.541 -+	__from = __from_next;
   1.542 -+	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
   1.543 -+					 __from_chunk_end - __from_next,
   1.544 -+					 __to_end - __to_next, &__state);
   1.545 -+	if (__conv == static_cast<size_t>(-1))
   1.546 -+	  {
   1.547 -+	    // In case of error, in order to stop at the exact place we
   1.548 -+	    // have to start again from the beginning with a series of
   1.549 -+	    // wcrtomb.
   1.550 -+	    for (; __from < __from_next; ++__from)
   1.551 -+	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
   1.552 -+	    __state = __tmp_state;
   1.553 -+	    __ret = error;
   1.554 -+	  }
   1.555 -+	else if (__from_next && __from_next < __from_chunk_end)
   1.556 -+	  {
   1.557 -+	    __to_next += __conv;
   1.558 -+	    __ret = partial;
   1.559 -+	  }
   1.560 -+	else
   1.561 -+	  {
   1.562 -+	    __from_next = __from_chunk_end;
   1.563 -+	    __to_next += __conv;
   1.564 -+	  }
   1.565 -+
   1.566 -+	if (__from_next < __from_end && __ret == ok)
   1.567 -+	  {
   1.568 -+	    extern_type __buf[MB_LEN_MAX];
   1.569 -+	    __tmp_state = __state;
   1.570 -+	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
   1.571 -+	    if (__conv > static_cast<size_t>(__to_end - __to_next))
   1.572 -+	      __ret = partial;
   1.573 -+	    else
   1.574 -+	      {
   1.575 -+		memcpy(__to_next, __buf, __conv);
   1.576 -+		__state = __tmp_state;
   1.577 -+		__to_next += __conv;
   1.578 -+		++__from_next;
   1.579 -+	      }
   1.580 -+	  }
   1.581 -+      }
   1.582 -+
   1.583 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.584 -+    __uselocale(__old);
   1.585 -+#endif
   1.586 -+
   1.587 -+    return __ret; 
   1.588 -+  }
   1.589 -+  
   1.590 -+  codecvt_base::result
   1.591 -+  codecvt<wchar_t, char, mbstate_t>::
   1.592 -+  do_in(state_type& __state, const extern_type* __from, 
   1.593 -+	const extern_type* __from_end, const extern_type*& __from_next,
   1.594 -+	intern_type* __to, intern_type* __to_end,
   1.595 -+	intern_type*& __to_next) const
   1.596 -+  {
   1.597 -+    result __ret = ok;
   1.598 -+    state_type __tmp_state(__state);
   1.599 -+
   1.600 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.601 -+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
   1.602 -+#endif
   1.603 -+
   1.604 -+    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
   1.605 -+    // in case we store a L'\0' and then continue, in a loop.
   1.606 -+    // NB: mbsnrtowcs is a GNU extension
   1.607 -+    for (__from_next = __from, __to_next = __to;
   1.608 -+	 __from_next < __from_end && __to_next < __to_end
   1.609 -+	 && __ret == ok;)
   1.610 -+      {
   1.611 -+	const extern_type* __from_chunk_end;
   1.612 -+	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
   1.613 -+								  __from_end
   1.614 -+								  - __from_next));
   1.615 -+	if (!__from_chunk_end)
   1.616 -+	  __from_chunk_end = __from_end;
   1.617 -+
   1.618 -+	__from = __from_next;
   1.619 -+	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
   1.620 -+				   __from_chunk_end - __from_next,
   1.621 -+				   __to_end - __to_next, &__state);
   1.622 -+	if (__conv == static_cast<size_t>(-1))
   1.623 -+	  {
   1.624 -+	    // In case of error, in order to stop at the exact place we
   1.625 -+	    // have to start again from the beginning with a series of
   1.626 -+	    // mbrtowc.
   1.627 -+	    for (;; ++__to_next, __from += __conv)
   1.628 -+	      {
   1.629 -+		__conv = mbrtowc(__to_next, __from, __from_end - __from,
   1.630 -+				 &__tmp_state);
   1.631 -+		if (__conv == static_cast<size_t>(-1)
   1.632 -+		    || __conv == static_cast<size_t>(-2))
   1.633 -+		  break;
   1.634 -+	      }
   1.635 -+	    __from_next = __from;
   1.636 -+	    __state = __tmp_state;	    
   1.637 -+	    __ret = error;
   1.638 -+	  }
   1.639 -+	else if (__from_next && __from_next < __from_chunk_end)
   1.640 -+	  {
   1.641 -+	    // It is unclear what to return in this case (see DR 382). 
   1.642 -+	    __to_next += __conv;
   1.643 -+	    __ret = partial;
   1.644 -+	  }
   1.645 -+	else
   1.646 -+	  {
   1.647 -+	    __from_next = __from_chunk_end;
   1.648 -+	    __to_next += __conv;
   1.649 -+	  }
   1.650 -+
   1.651 -+	if (__from_next < __from_end && __ret == ok)
   1.652 -+	  {
   1.653 -+	    if (__to_next < __to_end)
   1.654 -+	      {
   1.655 -+		// XXX Probably wrong for stateful encodings
   1.656 -+		__tmp_state = __state;		
   1.657 -+		++__from_next;
   1.658 -+		*__to_next++ = L'\0';
   1.659 -+	      }
   1.660 -+	    else
   1.661 -+	      __ret = partial;
   1.662 -+	  }
   1.663 -+      }
   1.664 -+
   1.665 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.666 -+    __uselocale(__old);
   1.667 -+#endif
   1.668 -+
   1.669 -+    return __ret; 
   1.670 -+  }
   1.671 -+
   1.672 -+  int 
   1.673 -+  codecvt<wchar_t, char, mbstate_t>::
   1.674 -+  do_encoding() const throw()
   1.675 -+  {
   1.676 -+    // XXX This implementation assumes that the encoding is
   1.677 -+    // stateless and is either single-byte or variable-width.
   1.678 -+    int __ret = 0;
   1.679 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.680 -+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
   1.681 -+#endif
   1.682 -+    if (MB_CUR_MAX == 1)
   1.683 -+      __ret = 1;
   1.684 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.685 -+    __uselocale(__old);
   1.686 -+#endif
   1.687 -+    return __ret;
   1.688 -+  }  
   1.689 -+
   1.690 -+  int 
   1.691 -+  codecvt<wchar_t, char, mbstate_t>::
   1.692 -+  do_max_length() const throw()
   1.693 -+  {
   1.694 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.695 -+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
   1.696 -+#endif
   1.697 -+    // XXX Probably wrong for stateful encodings.
   1.698 -+    int __ret = MB_CUR_MAX;
   1.699 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.700 -+    __uselocale(__old);
   1.701 -+#endif
   1.702 -+    return __ret;
   1.703 -+  }
   1.704 -+  
   1.705 -+  int 
   1.706 -+  codecvt<wchar_t, char, mbstate_t>::
   1.707 -+  do_length(state_type& __state, const extern_type* __from,
   1.708 -+	    const extern_type* __end, size_t __max) const
   1.709 -+  {
   1.710 -+    int __ret = 0;
   1.711 -+    state_type __tmp_state(__state);
   1.712 -+
   1.713 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.714 -+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
   1.715 -+#endif
   1.716 -+
   1.717 -+    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
   1.718 -+    // in case we advance past it and then continue, in a loop.
   1.719 -+    // NB: mbsnrtowcs is a GNU extension
   1.720 -+  
   1.721 -+    // A dummy internal buffer is needed in order for mbsnrtocws to consider
   1.722 -+    // its fourth parameter (it wouldn't with NULL as first parameter).
   1.723 -+    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) 
   1.724 -+							   * __max));
   1.725 -+    while (__from < __end && __max)
   1.726 -+      {
   1.727 -+	const extern_type* __from_chunk_end;
   1.728 -+	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
   1.729 -+								  __end
   1.730 -+								  - __from));
   1.731 -+	if (!__from_chunk_end)
   1.732 -+	  __from_chunk_end = __end;
   1.733 -+
   1.734 -+	const extern_type* __tmp_from = __from;
   1.735 -+	size_t __conv = mbsnrtowcs(__to, &__from,
   1.736 -+				   __from_chunk_end - __from,
   1.737 -+				   __max, &__state);
   1.738 -+	if (__conv == static_cast<size_t>(-1))
   1.739 -+	  {
   1.740 -+	    // In case of error, in order to stop at the exact place we
   1.741 -+	    // have to start again from the beginning with a series of
   1.742 -+	    // mbrtowc.
   1.743 -+	    for (__from = __tmp_from;; __from += __conv)
   1.744 -+	      {
   1.745 -+		__conv = mbrtowc(NULL, __from, __end - __from,
   1.746 -+				 &__tmp_state);
   1.747 -+		if (__conv == static_cast<size_t>(-1)
   1.748 -+		    || __conv == static_cast<size_t>(-2))
   1.749 -+		  break;
   1.750 -+	      }
   1.751 -+	    __state = __tmp_state;
   1.752 -+	    __ret += __from - __tmp_from;
   1.753 -+	    break;
   1.754 -+	  }
   1.755 -+	if (!__from)
   1.756 -+	  __from = __from_chunk_end;
   1.757 -+	
   1.758 -+	__ret += __from - __tmp_from;
   1.759 -+	__max -= __conv;
   1.760 -+
   1.761 -+	if (__from < __end && __max)
   1.762 -+	  {
   1.763 -+	    // XXX Probably wrong for stateful encodings
   1.764 -+	    __tmp_state = __state;
   1.765 -+	    ++__from;
   1.766 -+	    ++__ret;
   1.767 -+	    --__max;
   1.768 -+	  }
   1.769 -+      }
   1.770 -+
   1.771 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.772 -+    __uselocale(__old);
   1.773 -+#endif
   1.774 -+
   1.775 -+    return __ret; 
   1.776 -+  }
   1.777 -+#endif
   1.778 -+}
   1.779 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc
   1.780 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc	1969-12-31 18:00:00.000000000 -0600
   1.781 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc	2004-09-10 10:47:40.000000000 -0500
   1.782 -@@ -0,0 +1,80 @@
   1.783 -+// std::collate implementation details, GNU version -*- C++ -*-
   1.784 -+
   1.785 -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
   1.786 -+//
   1.787 -+// This file is part of the GNU ISO C++ Library.  This library is free
   1.788 -+// software; you can redistribute it and/or modify it under the
   1.789 -+// terms of the GNU General Public License as published by the
   1.790 -+// Free Software Foundation; either version 2, or (at your option)
   1.791 -+// any later version.
   1.792 -+
   1.793 -+// This library is distributed in the hope that it will be useful,
   1.794 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
   1.795 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   1.796 -+// GNU General Public License for more details.
   1.797 -+
   1.798 -+// You should have received a copy of the GNU General Public License along
   1.799 -+// with this library; see the file COPYING.  If not, write to the Free
   1.800 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
   1.801 -+// USA.
   1.802 -+
   1.803 -+// As a special exception, you may use this file as part of a free software
   1.804 -+// library without restriction.  Specifically, if other files instantiate
   1.805 -+// templates or use macros or inline functions from this file, or you compile
   1.806 -+// this file and link it with other files to produce an executable, this
   1.807 -+// file does not by itself cause the resulting executable to be covered by
   1.808 -+// the GNU General Public License.  This exception does not however
   1.809 -+// invalidate any other reasons why the executable file might be covered by
   1.810 -+// the GNU General Public License.
   1.811 -+
   1.812 -+//
   1.813 -+// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
   1.814 -+//
   1.815 -+
   1.816 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
   1.817 -+
   1.818 -+#include <locale>
   1.819 -+#include <bits/c++locale_internal.h>
   1.820 -+
   1.821 -+#ifndef __UCLIBC_HAS_XLOCALE__
   1.822 -+#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
   1.823 -+#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
   1.824 -+#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
   1.825 -+#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
   1.826 -+#endif
   1.827 -+
   1.828 -+namespace std
   1.829 -+{
   1.830 -+  // These are basically extensions to char_traits, and perhaps should
   1.831 -+  // be put there instead of here.
   1.832 -+  template<>
   1.833 -+    int 
   1.834 -+    collate<char>::_M_compare(const char* __one, const char* __two) const
   1.835 -+    { 
   1.836 -+      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
   1.837 -+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
   1.838 -+    }
   1.839 -+  
   1.840 -+  template<>
   1.841 -+    size_t
   1.842 -+    collate<char>::_M_transform(char* __to, const char* __from, 
   1.843 -+				size_t __n) const 
   1.844 -+    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
   1.845 -+
   1.846 -+#ifdef _GLIBCXX_USE_WCHAR_T
   1.847 -+  template<>
   1.848 -+    int 
   1.849 -+    collate<wchar_t>::_M_compare(const wchar_t* __one, 
   1.850 -+				 const wchar_t* __two) const
   1.851 -+    {
   1.852 -+      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
   1.853 -+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
   1.854 -+    }
   1.855 -+  
   1.856 -+  template<>
   1.857 -+    size_t
   1.858 -+    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
   1.859 -+				   size_t __n) const
   1.860 -+    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
   1.861 -+#endif
   1.862 -+}
   1.863 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
   1.864 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc	1969-12-31 18:00:00.000000000 -0600
   1.865 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc	2004-09-10 10:47:40.000000000 -0500
   1.866 -@@ -0,0 +1,300 @@
   1.867 -+// std::ctype implementation details, GNU version -*- C++ -*-
   1.868 -+
   1.869 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
   1.870 -+//
   1.871 -+// This file is part of the GNU ISO C++ Library.  This library is free
   1.872 -+// software; you can redistribute it and/or modify it under the
   1.873 -+// terms of the GNU General Public License as published by the
   1.874 -+// Free Software Foundation; either version 2, or (at your option)
   1.875 -+// any later version.
   1.876 -+
   1.877 -+// This library is distributed in the hope that it will be useful,
   1.878 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
   1.879 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   1.880 -+// GNU General Public License for more details.
   1.881 -+
   1.882 -+// You should have received a copy of the GNU General Public License along
   1.883 -+// with this library; see the file COPYING.  If not, write to the Free
   1.884 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
   1.885 -+// USA.
   1.886 -+
   1.887 -+// As a special exception, you may use this file as part of a free software
   1.888 -+// library without restriction.  Specifically, if other files instantiate
   1.889 -+// templates or use macros or inline functions from this file, or you compile
   1.890 -+// this file and link it with other files to produce an executable, this
   1.891 -+// file does not by itself cause the resulting executable to be covered by
   1.892 -+// the GNU General Public License.  This exception does not however
   1.893 -+// invalidate any other reasons why the executable file might be covered by
   1.894 -+// the GNU General Public License.
   1.895 -+
   1.896 -+//
   1.897 -+// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
   1.898 -+//
   1.899 -+
   1.900 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
   1.901 -+
   1.902 -+#define _LIBC
   1.903 -+#include <locale>
   1.904 -+#undef _LIBC
   1.905 -+#include <bits/c++locale_internal.h>
   1.906 -+
   1.907 -+#ifndef __UCLIBC_HAS_XLOCALE__
   1.908 -+#define __wctype_l(S, L)           wctype((S))
   1.909 -+#define __towupper_l(C, L)         towupper((C))
   1.910 -+#define __towlower_l(C, L)         towlower((C))
   1.911 -+#define __iswctype_l(C, M, L)      iswctype((C), (M))
   1.912 -+#endif
   1.913 -+
   1.914 -+namespace std
   1.915 -+{
   1.916 -+  // NB: The other ctype<char> specializations are in src/locale.cc and
   1.917 -+  // various /config/os/* files.
   1.918 -+  template<>
   1.919 -+    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
   1.920 -+    : ctype<char>(0, false, __refs) 
   1.921 -+    { 		
   1.922 -+      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
   1.923 -+	{
   1.924 -+	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
   1.925 -+	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s); 
   1.926 -+#ifdef __UCLIBC_HAS_XLOCALE__
   1.927 -+	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
   1.928 -+	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
   1.929 -+	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
   1.930 -+#endif
   1.931 -+	}
   1.932 -+    }
   1.933 -+
   1.934 -+#ifdef _GLIBCXX_USE_WCHAR_T  
   1.935 -+  ctype<wchar_t>::__wmask_type
   1.936 -+  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
   1.937 -+  {
   1.938 -+    __wmask_type __ret;
   1.939 -+    switch (__m)
   1.940 -+      {
   1.941 -+      case space:
   1.942 -+	__ret = __wctype_l("space", _M_c_locale_ctype);
   1.943 -+	break;
   1.944 -+      case print:
   1.945 -+	__ret = __wctype_l("print", _M_c_locale_ctype);
   1.946 -+	break;
   1.947 -+      case cntrl:
   1.948 -+	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
   1.949 -+	break;
   1.950 -+      case upper:
   1.951 -+	__ret = __wctype_l("upper", _M_c_locale_ctype);
   1.952 -+	break;
   1.953 -+      case lower:
   1.954 -+	__ret = __wctype_l("lower", _M_c_locale_ctype);
   1.955 -+	break;
   1.956 -+      case alpha:
   1.957 -+	__ret = __wctype_l("alpha", _M_c_locale_ctype);
   1.958 -+	break;
   1.959 -+      case digit:
   1.960 -+	__ret = __wctype_l("digit", _M_c_locale_ctype);
   1.961 -+	break;
   1.962 -+      case punct:
   1.963 -+	__ret = __wctype_l("punct", _M_c_locale_ctype);
   1.964 -+	break;
   1.965 -+      case xdigit:
   1.966 -+	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
   1.967 -+	break;
   1.968 -+      case alnum:
   1.969 -+	__ret = __wctype_l("alnum", _M_c_locale_ctype);
   1.970 -+	break;
   1.971 -+      case graph:
   1.972 -+	__ret = __wctype_l("graph", _M_c_locale_ctype);
   1.973 -+	break;
   1.974 -+      default:
   1.975 -+	__ret = 0;
   1.976 -+      }
   1.977 -+    return __ret;
   1.978 -+  }
   1.979 -+  
   1.980 -+  wchar_t
   1.981 -+  ctype<wchar_t>::do_toupper(wchar_t __c) const
   1.982 -+  { return __towupper_l(__c, _M_c_locale_ctype); }
   1.983 -+
   1.984 -+  const wchar_t*
   1.985 -+  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
   1.986 -+  {
   1.987 -+    while (__lo < __hi)
   1.988 -+      {
   1.989 -+        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
   1.990 -+        ++__lo;
   1.991 -+      }
   1.992 -+    return __hi;
   1.993 -+  }
   1.994 -+  
   1.995 -+  wchar_t
   1.996 -+  ctype<wchar_t>::do_tolower(wchar_t __c) const
   1.997 -+  { return __towlower_l(__c, _M_c_locale_ctype); }
   1.998 -+  
   1.999 -+  const wchar_t*
  1.1000 -+  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
  1.1001 -+  {
  1.1002 -+    while (__lo < __hi)
  1.1003 -+      {
  1.1004 -+        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
  1.1005 -+        ++__lo;
  1.1006 -+      }
  1.1007 -+    return __hi;
  1.1008 -+  }
  1.1009 -+
  1.1010 -+  bool
  1.1011 -+  ctype<wchar_t>::
  1.1012 -+  do_is(mask __m, wchar_t __c) const
  1.1013 -+  { 
  1.1014 -+    // Highest bitmask in ctype_base == 10, but extra in "C"
  1.1015 -+    // library for blank.
  1.1016 -+    bool __ret = false;
  1.1017 -+    const size_t __bitmasksize = 11; 
  1.1018 -+    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
  1.1019 -+      if (__m & _M_bit[__bitcur]
  1.1020 -+	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
  1.1021 -+	{
  1.1022 -+	  __ret = true;
  1.1023 -+	  break;
  1.1024 -+	}
  1.1025 -+    return __ret;    
  1.1026 -+  }
  1.1027 -+  
  1.1028 -+  const wchar_t* 
  1.1029 -+  ctype<wchar_t>::
  1.1030 -+  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
  1.1031 -+  {
  1.1032 -+    for (; __lo < __hi; ++__vec, ++__lo)
  1.1033 -+      {
  1.1034 -+	// Highest bitmask in ctype_base == 10, but extra in "C"
  1.1035 -+	// library for blank.
  1.1036 -+	const size_t __bitmasksize = 11; 
  1.1037 -+	mask __m = 0;
  1.1038 -+	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
  1.1039 -+	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
  1.1040 -+	    __m |= _M_bit[__bitcur];
  1.1041 -+	*__vec = __m;
  1.1042 -+      }
  1.1043 -+    return __hi;
  1.1044 -+  }
  1.1045 -+  
  1.1046 -+  const wchar_t* 
  1.1047 -+  ctype<wchar_t>::
  1.1048 -+  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
  1.1049 -+  {
  1.1050 -+    while (__lo < __hi && !this->do_is(__m, *__lo))
  1.1051 -+      ++__lo;
  1.1052 -+    return __lo;
  1.1053 -+  }
  1.1054 -+
  1.1055 -+  const wchar_t*
  1.1056 -+  ctype<wchar_t>::
  1.1057 -+  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
  1.1058 -+  {
  1.1059 -+    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
  1.1060 -+      ++__lo;
  1.1061 -+    return __lo;
  1.1062 -+  }
  1.1063 -+
  1.1064 -+  wchar_t
  1.1065 -+  ctype<wchar_t>::
  1.1066 -+  do_widen(char __c) const
  1.1067 -+  { return _M_widen[static_cast<unsigned char>(__c)]; }
  1.1068 -+
  1.1069 -+  const char* 
  1.1070 -+  ctype<wchar_t>::
  1.1071 -+  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
  1.1072 -+  {
  1.1073 -+    while (__lo < __hi)
  1.1074 -+      {
  1.1075 -+	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
  1.1076 -+	++__lo;
  1.1077 -+	++__dest;
  1.1078 -+      }
  1.1079 -+    return __hi;
  1.1080 -+  }
  1.1081 -+
  1.1082 -+  char
  1.1083 -+  ctype<wchar_t>::
  1.1084 -+  do_narrow(wchar_t __wc, char __dfault) const
  1.1085 -+  {
  1.1086 -+    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
  1.1087 -+      return _M_narrow[__wc];
  1.1088 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1089 -+    __c_locale __old = __uselocale(_M_c_locale_ctype);
  1.1090 -+#endif
  1.1091 -+    const int __c = wctob(__wc);
  1.1092 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1093 -+    __uselocale(__old);
  1.1094 -+#endif
  1.1095 -+    return (__c == EOF ? __dfault : static_cast<char>(__c)); 
  1.1096 -+  }
  1.1097 -+
  1.1098 -+  const wchar_t*
  1.1099 -+  ctype<wchar_t>::
  1.1100 -+  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
  1.1101 -+	    char* __dest) const
  1.1102 -+  {
  1.1103 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1104 -+    __c_locale __old = __uselocale(_M_c_locale_ctype);
  1.1105 -+#endif
  1.1106 -+    if (_M_narrow_ok)
  1.1107 -+      while (__lo < __hi)
  1.1108 -+	{
  1.1109 -+	  if (*__lo >= 0 && *__lo < 128)
  1.1110 -+	    *__dest = _M_narrow[*__lo];
  1.1111 -+	  else
  1.1112 -+	    {
  1.1113 -+	      const int __c = wctob(*__lo);
  1.1114 -+	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
  1.1115 -+	    }
  1.1116 -+	  ++__lo;
  1.1117 -+	  ++__dest;
  1.1118 -+	}
  1.1119 -+    else
  1.1120 -+      while (__lo < __hi)
  1.1121 -+	{
  1.1122 -+	  const int __c = wctob(*__lo);
  1.1123 -+	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
  1.1124 -+	  ++__lo;
  1.1125 -+	  ++__dest;
  1.1126 -+	}
  1.1127 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1128 -+    __uselocale(__old);
  1.1129 -+#endif
  1.1130 -+    return __hi;
  1.1131 -+  }
  1.1132 -+
  1.1133 -+  void
  1.1134 -+  ctype<wchar_t>::_M_initialize_ctype()
  1.1135 -+  {
  1.1136 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1137 -+    __c_locale __old = __uselocale(_M_c_locale_ctype);
  1.1138 -+#endif
  1.1139 -+    wint_t __i;
  1.1140 -+    for (__i = 0; __i < 128; ++__i)
  1.1141 -+      {
  1.1142 -+	const int __c = wctob(__i);
  1.1143 -+	if (__c == EOF)
  1.1144 -+	  break;
  1.1145 -+	else
  1.1146 -+	  _M_narrow[__i] = static_cast<char>(__c);
  1.1147 -+      }
  1.1148 -+    if (__i == 128)
  1.1149 -+      _M_narrow_ok = true;
  1.1150 -+    else
  1.1151 -+      _M_narrow_ok = false;
  1.1152 -+    for (size_t __j = 0;
  1.1153 -+	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
  1.1154 -+      _M_widen[__j] = btowc(__j);
  1.1155 -+
  1.1156 -+    for (size_t __k = 0; __k <= 11; ++__k)
  1.1157 -+      { 
  1.1158 -+	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
  1.1159 -+	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
  1.1160 -+      }
  1.1161 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1162 -+    __uselocale(__old);
  1.1163 -+#endif
  1.1164 -+  }
  1.1165 -+#endif //  _GLIBCXX_USE_WCHAR_T
  1.1166 -+}
  1.1167 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc
  1.1168 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc	1969-12-31 18:00:00.000000000 -0600
  1.1169 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc	2004-09-10 10:47:40.000000000 -0500
  1.1170 -@@ -0,0 +1,100 @@
  1.1171 -+// std::messages implementation details, GNU version -*- C++ -*-
  1.1172 -+
  1.1173 -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
  1.1174 -+//
  1.1175 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.1176 -+// software; you can redistribute it and/or modify it under the
  1.1177 -+// terms of the GNU General Public License as published by the
  1.1178 -+// Free Software Foundation; either version 2, or (at your option)
  1.1179 -+// any later version.
  1.1180 -+
  1.1181 -+// This library is distributed in the hope that it will be useful,
  1.1182 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.1183 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.1184 -+// GNU General Public License for more details.
  1.1185 -+
  1.1186 -+// You should have received a copy of the GNU General Public License along
  1.1187 -+// with this library; see the file COPYING.  If not, write to the Free
  1.1188 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.1189 -+// USA.
  1.1190 -+
  1.1191 -+// As a special exception, you may use this file as part of a free software
  1.1192 -+// library without restriction.  Specifically, if other files instantiate
  1.1193 -+// templates or use macros or inline functions from this file, or you compile
  1.1194 -+// this file and link it with other files to produce an executable, this
  1.1195 -+// file does not by itself cause the resulting executable to be covered by
  1.1196 -+// the GNU General Public License.  This exception does not however
  1.1197 -+// invalidate any other reasons why the executable file might be covered by
  1.1198 -+// the GNU General Public License.
  1.1199 -+
  1.1200 -+//
  1.1201 -+// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
  1.1202 -+//
  1.1203 -+
  1.1204 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
  1.1205 -+
  1.1206 -+#include <locale>
  1.1207 -+#include <bits/c++locale_internal.h>
  1.1208 -+
  1.1209 -+#ifdef __UCLIBC_MJN3_ONLY__
  1.1210 -+#warning fix gettext stuff
  1.1211 -+#endif
  1.1212 -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
  1.1213 -+extern "C" char *__dcgettext(const char *domainname,
  1.1214 -+			     const char *msgid, int category);
  1.1215 -+#undef gettext
  1.1216 -+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
  1.1217 -+#else
  1.1218 -+#undef gettext
  1.1219 -+#define gettext(msgid) (msgid)
  1.1220 -+#endif
  1.1221 -+
  1.1222 -+namespace std
  1.1223 -+{
  1.1224 -+  // Specializations.
  1.1225 -+  template<>
  1.1226 -+    string
  1.1227 -+    messages<char>::do_get(catalog, int, int, const string& __dfault) const
  1.1228 -+    {
  1.1229 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1230 -+      __c_locale __old = __uselocale(_M_c_locale_messages);
  1.1231 -+      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
  1.1232 -+      __uselocale(__old);
  1.1233 -+      return string(__msg);
  1.1234 -+#elif defined __UCLIBC_HAS_LOCALE__
  1.1235 -+      char* __old = strdup(setlocale(LC_ALL, NULL));
  1.1236 -+      setlocale(LC_ALL, _M_name_messages);
  1.1237 -+      const char* __msg = gettext(__dfault.c_str());
  1.1238 -+      setlocale(LC_ALL, __old);
  1.1239 -+      free(__old);
  1.1240 -+      return string(__msg);
  1.1241 -+#else
  1.1242 -+      const char* __msg = gettext(__dfault.c_str());
  1.1243 -+      return string(__msg);
  1.1244 -+#endif
  1.1245 -+    }
  1.1246 -+
  1.1247 -+#ifdef _GLIBCXX_USE_WCHAR_T
  1.1248 -+  template<>
  1.1249 -+    wstring
  1.1250 -+    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
  1.1251 -+    {
  1.1252 -+# ifdef __UCLIBC_HAS_XLOCALE__
  1.1253 -+      __c_locale __old = __uselocale(_M_c_locale_messages);
  1.1254 -+      char* __msg = gettext(_M_convert_to_char(__dfault));
  1.1255 -+      __uselocale(__old);
  1.1256 -+      return _M_convert_from_char(__msg);
  1.1257 -+# elif defined __UCLIBC_HAS_LOCALE__
  1.1258 -+      char* __old = strdup(setlocale(LC_ALL, NULL));
  1.1259 -+      setlocale(LC_ALL, _M_name_messages);
  1.1260 -+      char* __msg = gettext(_M_convert_to_char(__dfault));
  1.1261 -+      setlocale(LC_ALL, __old);
  1.1262 -+      free(__old);
  1.1263 -+      return _M_convert_from_char(__msg);
  1.1264 -+# else
  1.1265 -+      char* __msg = gettext(_M_convert_to_char(__dfault));
  1.1266 -+      return _M_convert_from_char(__msg);
  1.1267 -+# endif
  1.1268 -+    }
  1.1269 -+#endif
  1.1270 -+}
  1.1271 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
  1.1272 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h	1969-12-31 18:00:00.000000000 -0600
  1.1273 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h	2004-09-10 10:47:40.000000000 -0500
  1.1274 -@@ -0,0 +1,118 @@
  1.1275 -+// std::messages implementation details, GNU version -*- C++ -*-
  1.1276 -+
  1.1277 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  1.1278 -+//
  1.1279 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.1280 -+// software; you can redistribute it and/or modify it under the
  1.1281 -+// terms of the GNU General Public License as published by the
  1.1282 -+// Free Software Foundation; either version 2, or (at your option)
  1.1283 -+// any later version.
  1.1284 -+
  1.1285 -+// This library is distributed in the hope that it will be useful,
  1.1286 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.1287 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.1288 -+// GNU General Public License for more details.
  1.1289 -+
  1.1290 -+// You should have received a copy of the GNU General Public License along
  1.1291 -+// with this library; see the file COPYING.  If not, write to the Free
  1.1292 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.1293 -+// USA.
  1.1294 -+
  1.1295 -+// As a special exception, you may use this file as part of a free software
  1.1296 -+// library without restriction.  Specifically, if other files instantiate
  1.1297 -+// templates or use macros or inline functions from this file, or you compile
  1.1298 -+// this file and link it with other files to produce an executable, this
  1.1299 -+// file does not by itself cause the resulting executable to be covered by
  1.1300 -+// the GNU General Public License.  This exception does not however
  1.1301 -+// invalidate any other reasons why the executable file might be covered by
  1.1302 -+// the GNU General Public License.
  1.1303 -+
  1.1304 -+//
  1.1305 -+// ISO C++ 14882: 22.2.7.1.2  messages functions
  1.1306 -+//
  1.1307 -+
  1.1308 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
  1.1309 -+
  1.1310 -+#ifdef __UCLIBC_MJN3_ONLY__
  1.1311 -+#warning fix prototypes for *textdomain funcs
  1.1312 -+#endif
  1.1313 -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
  1.1314 -+extern "C" char *__textdomain(const char *domainname);
  1.1315 -+extern "C" char *__bindtextdomain(const char *domainname,
  1.1316 -+				  const char *dirname);
  1.1317 -+#else
  1.1318 -+#undef __textdomain
  1.1319 -+#undef __bindtextdomain
  1.1320 -+#define __textdomain(D)           ((void)0)
  1.1321 -+#define __bindtextdomain(D,P)     ((void)0)
  1.1322 -+#endif
  1.1323 -+
  1.1324 -+  // Non-virtual member functions.
  1.1325 -+  template<typename _CharT>
  1.1326 -+     messages<_CharT>::messages(size_t __refs)
  1.1327 -+     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
  1.1328 -+     _M_name_messages(_S_get_c_name())
  1.1329 -+     { }
  1.1330 -+
  1.1331 -+  template<typename _CharT>
  1.1332 -+     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
  1.1333 -+				size_t __refs) 
  1.1334 -+     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
  1.1335 -+     _M_name_messages(__s)
  1.1336 -+     {
  1.1337 -+       char* __tmp = new char[std::strlen(__s) + 1];
  1.1338 -+       std::strcpy(__tmp, __s);
  1.1339 -+       _M_name_messages = __tmp;
  1.1340 -+     }
  1.1341 -+
  1.1342 -+  template<typename _CharT>
  1.1343 -+    typename messages<_CharT>::catalog 
  1.1344 -+    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
  1.1345 -+			   const char* __dir) const
  1.1346 -+    { 
  1.1347 -+      __bindtextdomain(__s.c_str(), __dir);
  1.1348 -+      return this->do_open(__s, __loc); 
  1.1349 -+    }
  1.1350 -+
  1.1351 -+  // Virtual member functions.
  1.1352 -+  template<typename _CharT>
  1.1353 -+    messages<_CharT>::~messages()
  1.1354 -+    { 
  1.1355 -+      if (_M_name_messages != _S_get_c_name())
  1.1356 -+	delete [] _M_name_messages;
  1.1357 -+      _S_destroy_c_locale(_M_c_locale_messages); 
  1.1358 -+    }
  1.1359 -+
  1.1360 -+  template<typename _CharT>
  1.1361 -+    typename messages<_CharT>::catalog 
  1.1362 -+    messages<_CharT>::do_open(const basic_string<char>& __s, 
  1.1363 -+			      const locale&) const
  1.1364 -+    { 
  1.1365 -+      // No error checking is done, assume the catalog exists and can
  1.1366 -+      // be used.
  1.1367 -+      __textdomain(__s.c_str());
  1.1368 -+      return 0;
  1.1369 -+    }
  1.1370 -+
  1.1371 -+  template<typename _CharT>
  1.1372 -+    void    
  1.1373 -+    messages<_CharT>::do_close(catalog) const 
  1.1374 -+    { }
  1.1375 -+
  1.1376 -+   // messages_byname
  1.1377 -+   template<typename _CharT>
  1.1378 -+     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
  1.1379 -+     : messages<_CharT>(__refs) 
  1.1380 -+     { 
  1.1381 -+       if (this->_M_name_messages != locale::facet::_S_get_c_name())
  1.1382 -+	 delete [] this->_M_name_messages;
  1.1383 -+       char* __tmp = new char[std::strlen(__s) + 1];
  1.1384 -+       std::strcpy(__tmp, __s);
  1.1385 -+       this->_M_name_messages = __tmp;
  1.1386 -+
  1.1387 -+       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
  1.1388 -+	 {
  1.1389 -+	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
  1.1390 -+	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
  1.1391 -+	 }
  1.1392 -+     }
  1.1393 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
  1.1394 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc	1969-12-31 18:00:00.000000000 -0600
  1.1395 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2004-09-10 10:47:40.000000000 -0500
  1.1396 -@@ -0,0 +1,698 @@
  1.1397 -+// std::moneypunct implementation details, GNU version -*- C++ -*-
  1.1398 -+
  1.1399 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  1.1400 -+//
  1.1401 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.1402 -+// software; you can redistribute it and/or modify it under the
  1.1403 -+// terms of the GNU General Public License as published by the
  1.1404 -+// Free Software Foundation; either version 2, or (at your option)
  1.1405 -+// any later version.
  1.1406 -+
  1.1407 -+// This library is distributed in the hope that it will be useful,
  1.1408 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.1409 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.1410 -+// GNU General Public License for more details.
  1.1411 -+
  1.1412 -+// You should have received a copy of the GNU General Public License along
  1.1413 -+// with this library; see the file COPYING.  If not, write to the Free
  1.1414 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.1415 -+// USA.
  1.1416 -+
  1.1417 -+// As a special exception, you may use this file as part of a free software
  1.1418 -+// library without restriction.  Specifically, if other files instantiate
  1.1419 -+// templates or use macros or inline functions from this file, or you compile
  1.1420 -+// this file and link it with other files to produce an executable, this
  1.1421 -+// file does not by itself cause the resulting executable to be covered by
  1.1422 -+// the GNU General Public License.  This exception does not however
  1.1423 -+// invalidate any other reasons why the executable file might be covered by
  1.1424 -+// the GNU General Public License.
  1.1425 -+
  1.1426 -+//
  1.1427 -+// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
  1.1428 -+//
  1.1429 -+
  1.1430 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
  1.1431 -+
  1.1432 -+#define _LIBC
  1.1433 -+#include <locale>
  1.1434 -+#undef _LIBC
  1.1435 -+#include <bits/c++locale_internal.h>
  1.1436 -+
  1.1437 -+#ifdef __UCLIBC_MJN3_ONLY__
  1.1438 -+#warning optimize this for uclibc
  1.1439 -+#warning tailor for stub locale support
  1.1440 -+#endif
  1.1441 -+
  1.1442 -+#ifndef __UCLIBC_HAS_XLOCALE__
  1.1443 -+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
  1.1444 -+#endif
  1.1445 -+
  1.1446 -+namespace std
  1.1447 -+{
  1.1448 -+  // Construct and return valid pattern consisting of some combination of:
  1.1449 -+  // space none symbol sign value
  1.1450 -+  money_base::pattern
  1.1451 -+  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
  1.1452 -+  { 
  1.1453 -+    pattern __ret;
  1.1454 -+
  1.1455 -+    // This insanely complicated routine attempts to construct a valid
  1.1456 -+    // pattern for use with monyepunct. A couple of invariants:
  1.1457 -+
  1.1458 -+    // if (__precedes) symbol -> value
  1.1459 -+    // else value -> symbol
  1.1460 -+    
  1.1461 -+    // if (__space) space
  1.1462 -+    // else none
  1.1463 -+
  1.1464 -+    // none == never first
  1.1465 -+    // space never first or last
  1.1466 -+
  1.1467 -+    // Any elegant implementations of this are welcome.
  1.1468 -+    switch (__posn)
  1.1469 -+      {
  1.1470 -+      case 0:
  1.1471 -+      case 1:
  1.1472 -+	// 1 The sign precedes the value and symbol.
  1.1473 -+	__ret.field[0] = sign;
  1.1474 -+	if (__space)
  1.1475 -+	  {
  1.1476 -+	    // Pattern starts with sign.
  1.1477 -+	    if (__precedes)
  1.1478 -+	      {
  1.1479 -+		__ret.field[1] = symbol;
  1.1480 -+		__ret.field[3] = value;
  1.1481 -+	      }
  1.1482 -+	    else
  1.1483 -+	      {
  1.1484 -+		__ret.field[1] = value;
  1.1485 -+		__ret.field[3] = symbol;
  1.1486 -+	      }
  1.1487 -+	    __ret.field[2] = space;
  1.1488 -+	  }
  1.1489 -+	else
  1.1490 -+	  {
  1.1491 -+	    // Pattern starts with sign and ends with none.
  1.1492 -+	    if (__precedes)
  1.1493 -+	      {
  1.1494 -+		__ret.field[1] = symbol;
  1.1495 -+		__ret.field[2] = value;
  1.1496 -+	      }
  1.1497 -+	    else
  1.1498 -+	      {
  1.1499 -+		__ret.field[1] = value;
  1.1500 -+		__ret.field[2] = symbol;
  1.1501 -+	      }
  1.1502 -+	    __ret.field[3] = none;
  1.1503 -+	  }
  1.1504 -+	break;
  1.1505 -+      case 2:
  1.1506 -+	// 2 The sign follows the value and symbol.
  1.1507 -+	if (__space)
  1.1508 -+	  {
  1.1509 -+	    // Pattern either ends with sign.
  1.1510 -+	    if (__precedes)
  1.1511 -+	      {
  1.1512 -+		__ret.field[0] = symbol;
  1.1513 -+		__ret.field[2] = value;
  1.1514 -+	      }
  1.1515 -+	    else
  1.1516 -+	      {
  1.1517 -+		__ret.field[0] = value;
  1.1518 -+		__ret.field[2] = symbol;
  1.1519 -+	      }
  1.1520 -+	    __ret.field[1] = space;
  1.1521 -+	    __ret.field[3] = sign;
  1.1522 -+	  }
  1.1523 -+	else
  1.1524 -+	  {
  1.1525 -+	    // Pattern ends with sign then none.
  1.1526 -+	    if (__precedes)
  1.1527 -+	      {
  1.1528 -+		__ret.field[0] = symbol;
  1.1529 -+		__ret.field[1] = value;
  1.1530 -+	      }
  1.1531 -+	    else
  1.1532 -+	      {
  1.1533 -+		__ret.field[0] = value;
  1.1534 -+		__ret.field[1] = symbol;
  1.1535 -+	      }
  1.1536 -+	    __ret.field[2] = sign;
  1.1537 -+	    __ret.field[3] = none;
  1.1538 -+	  }
  1.1539 -+	break;
  1.1540 -+      case 3:
  1.1541 -+	// 3 The sign immediately precedes the symbol.
  1.1542 -+	if (__precedes)
  1.1543 -+	  {
  1.1544 -+	    __ret.field[0] = sign;
  1.1545 -+	    __ret.field[1] = symbol;	    
  1.1546 -+	    if (__space)
  1.1547 -+	      {
  1.1548 -+		__ret.field[2] = space;
  1.1549 -+		__ret.field[3] = value;
  1.1550 -+	      }
  1.1551 -+	    else
  1.1552 -+	      {
  1.1553 -+		__ret.field[2] = value;		
  1.1554 -+		__ret.field[3] = none;
  1.1555 -+	      }
  1.1556 -+	  }
  1.1557 -+	else
  1.1558 -+	  {
  1.1559 -+	    __ret.field[0] = value;
  1.1560 -+	    if (__space)
  1.1561 -+	      {
  1.1562 -+		__ret.field[1] = space;
  1.1563 -+		__ret.field[2] = sign;
  1.1564 -+		__ret.field[3] = symbol;
  1.1565 -+	      }
  1.1566 -+	    else
  1.1567 -+	      {
  1.1568 -+		__ret.field[1] = sign;
  1.1569 -+		__ret.field[2] = symbol;
  1.1570 -+		__ret.field[3] = none;
  1.1571 -+	      }
  1.1572 -+	  }
  1.1573 -+	break;
  1.1574 -+      case 4:
  1.1575 -+	// 4 The sign immediately follows the symbol.
  1.1576 -+	if (__precedes)
  1.1577 -+	  {
  1.1578 -+	    __ret.field[0] = symbol;
  1.1579 -+	    __ret.field[1] = sign;
  1.1580 -+	    if (__space)
  1.1581 -+	      {
  1.1582 -+		__ret.field[2] = space;
  1.1583 -+		__ret.field[3] = value;
  1.1584 -+	      }
  1.1585 -+	    else
  1.1586 -+	      {
  1.1587 -+		__ret.field[2] = value;
  1.1588 -+		__ret.field[3] = none;
  1.1589 -+	      }
  1.1590 -+	  }
  1.1591 -+	else
  1.1592 -+	  {
  1.1593 -+	    __ret.field[0] = value;
  1.1594 -+	    if (__space)
  1.1595 -+	      {
  1.1596 -+		__ret.field[1] = space;
  1.1597 -+		__ret.field[2] = symbol;
  1.1598 -+		__ret.field[3] = sign;
  1.1599 -+	      }
  1.1600 -+	    else
  1.1601 -+	      {
  1.1602 -+		__ret.field[1] = symbol;
  1.1603 -+		__ret.field[2] = sign;
  1.1604 -+		__ret.field[3] = none;
  1.1605 -+	      }
  1.1606 -+	  }
  1.1607 -+	break;
  1.1608 -+      default:
  1.1609 -+	;
  1.1610 -+      }
  1.1611 -+    return __ret;
  1.1612 -+  }
  1.1613 -+
  1.1614 -+  template<> 
  1.1615 -+    void
  1.1616 -+    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, 
  1.1617 -+						     const char*)
  1.1618 -+    {
  1.1619 -+      if (!_M_data)
  1.1620 -+	_M_data = new __moneypunct_cache<char, true>;
  1.1621 -+
  1.1622 -+      if (!__cloc)
  1.1623 -+	{
  1.1624 -+	  // "C" locale
  1.1625 -+	  _M_data->_M_decimal_point = '.';
  1.1626 -+	  _M_data->_M_thousands_sep = ',';
  1.1627 -+	  _M_data->_M_grouping = "";
  1.1628 -+	  _M_data->_M_grouping_size = 0;
  1.1629 -+	  _M_data->_M_curr_symbol = "";
  1.1630 -+	  _M_data->_M_curr_symbol_size = 0;
  1.1631 -+	  _M_data->_M_positive_sign = "";
  1.1632 -+	  _M_data->_M_positive_sign_size = 0;
  1.1633 -+	  _M_data->_M_negative_sign = "";
  1.1634 -+	  _M_data->_M_negative_sign_size = 0;
  1.1635 -+	  _M_data->_M_frac_digits = 0;
  1.1636 -+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
  1.1637 -+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
  1.1638 -+
  1.1639 -+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
  1.1640 -+	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
  1.1641 -+	}
  1.1642 -+      else
  1.1643 -+	{
  1.1644 -+	  // Named locale.
  1.1645 -+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
  1.1646 -+							__cloc));
  1.1647 -+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
  1.1648 -+							__cloc));
  1.1649 -+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
  1.1650 -+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
  1.1651 -+	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
  1.1652 -+	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
  1.1653 -+
  1.1654 -+	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
  1.1655 -+	  if (!__nposn)
  1.1656 -+	    _M_data->_M_negative_sign = "()";
  1.1657 -+	  else
  1.1658 -+	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, 
  1.1659 -+							__cloc);
  1.1660 -+	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
  1.1661 -+
  1.1662 -+	  // _Intl == true
  1.1663 -+	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
  1.1664 -+	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
  1.1665 -+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
  1.1666 -+						      __cloc));
  1.1667 -+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
  1.1668 -+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
  1.1669 -+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
  1.1670 -+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
  1.1671 -+							__pposn);
  1.1672 -+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
  1.1673 -+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
  1.1674 -+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
  1.1675 -+							__nposn);
  1.1676 -+	}
  1.1677 -+    }
  1.1678 -+
  1.1679 -+  template<> 
  1.1680 -+    void
  1.1681 -+    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, 
  1.1682 -+						      const char*)
  1.1683 -+    {
  1.1684 -+      if (!_M_data)
  1.1685 -+	_M_data = new __moneypunct_cache<char, false>;
  1.1686 -+
  1.1687 -+      if (!__cloc)
  1.1688 -+	{
  1.1689 -+	  // "C" locale
  1.1690 -+	  _M_data->_M_decimal_point = '.';
  1.1691 -+	  _M_data->_M_thousands_sep = ',';
  1.1692 -+	  _M_data->_M_grouping = "";
  1.1693 -+	  _M_data->_M_grouping_size = 0;
  1.1694 -+	  _M_data->_M_curr_symbol = "";
  1.1695 -+	  _M_data->_M_curr_symbol_size = 0;
  1.1696 -+	  _M_data->_M_positive_sign = "";
  1.1697 -+	  _M_data->_M_positive_sign_size = 0;
  1.1698 -+	  _M_data->_M_negative_sign = "";
  1.1699 -+	  _M_data->_M_negative_sign_size = 0;
  1.1700 -+	  _M_data->_M_frac_digits = 0;
  1.1701 -+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
  1.1702 -+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
  1.1703 -+
  1.1704 -+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
  1.1705 -+	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
  1.1706 -+	}
  1.1707 -+      else
  1.1708 -+	{
  1.1709 -+	  // Named locale.
  1.1710 -+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
  1.1711 -+							__cloc));
  1.1712 -+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
  1.1713 -+							__cloc));
  1.1714 -+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
  1.1715 -+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
  1.1716 -+	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
  1.1717 -+	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
  1.1718 -+
  1.1719 -+	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
  1.1720 -+	  if (!__nposn)
  1.1721 -+	    _M_data->_M_negative_sign = "()";
  1.1722 -+	  else
  1.1723 -+	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
  1.1724 -+							__cloc);
  1.1725 -+	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
  1.1726 -+
  1.1727 -+	  // _Intl == false
  1.1728 -+	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
  1.1729 -+	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
  1.1730 -+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
  1.1731 -+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
  1.1732 -+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
  1.1733 -+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
  1.1734 -+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
  1.1735 -+							__pposn);
  1.1736 -+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
  1.1737 -+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
  1.1738 -+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
  1.1739 -+							__nposn);
  1.1740 -+	}
  1.1741 -+    }
  1.1742 -+
  1.1743 -+  template<> 
  1.1744 -+    moneypunct<char, true>::~moneypunct()
  1.1745 -+    { delete _M_data; }
  1.1746 -+
  1.1747 -+  template<> 
  1.1748 -+    moneypunct<char, false>::~moneypunct()
  1.1749 -+    { delete _M_data; }
  1.1750 -+
  1.1751 -+#ifdef _GLIBCXX_USE_WCHAR_T
  1.1752 -+  template<> 
  1.1753 -+    void
  1.1754 -+    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, 
  1.1755 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1756 -+							const char*)
  1.1757 -+#else
  1.1758 -+							const char* __name)
  1.1759 -+#endif
  1.1760 -+    {
  1.1761 -+      if (!_M_data)
  1.1762 -+	_M_data = new __moneypunct_cache<wchar_t, true>;
  1.1763 -+
  1.1764 -+      if (!__cloc)
  1.1765 -+	{
  1.1766 -+	  // "C" locale
  1.1767 -+	  _M_data->_M_decimal_point = L'.';
  1.1768 -+	  _M_data->_M_thousands_sep = L',';
  1.1769 -+	  _M_data->_M_grouping = "";
  1.1770 -+	  _M_data->_M_grouping_size = 0;
  1.1771 -+	  _M_data->_M_curr_symbol = L"";
  1.1772 -+	  _M_data->_M_curr_symbol_size = 0;
  1.1773 -+	  _M_data->_M_positive_sign = L"";
  1.1774 -+	  _M_data->_M_positive_sign_size = 0;
  1.1775 -+	  _M_data->_M_negative_sign = L"";
  1.1776 -+	  _M_data->_M_negative_sign_size = 0;
  1.1777 -+	  _M_data->_M_frac_digits = 0;
  1.1778 -+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
  1.1779 -+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
  1.1780 -+
  1.1781 -+	  // Use ctype::widen code without the facet...
  1.1782 -+	  unsigned char uc;
  1.1783 -+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
  1.1784 -+	    {
  1.1785 -+	      uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
  1.1786 -+	      _M_data->_M_atoms[__i] = btowc(uc);
  1.1787 -+	    }
  1.1788 -+	}
  1.1789 -+      else
  1.1790 -+	{
  1.1791 -+	  // Named locale.
  1.1792 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1793 -+	  __c_locale __old = __uselocale(__cloc);
  1.1794 -+#else
  1.1795 -+	  // Switch to named locale so that mbsrtowcs will work.
  1.1796 -+	  char* __old = strdup(setlocale(LC_ALL, NULL));
  1.1797 -+	  setlocale(LC_ALL, __name);
  1.1798 -+#endif
  1.1799 -+
  1.1800 -+#ifdef __UCLIBC_MJN3_ONLY__
  1.1801 -+#warning fix this... should be monetary
  1.1802 -+#endif
  1.1803 -+#ifdef __UCLIBC__
  1.1804 -+# ifdef __UCLIBC_HAS_XLOCALE__
  1.1805 -+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
  1.1806 -+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
  1.1807 -+# else
  1.1808 -+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
  1.1809 -+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
  1.1810 -+# endif
  1.1811 -+#else
  1.1812 -+	  union __s_and_w { const char *__s; unsigned int __w; } __u;
  1.1813 -+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
  1.1814 -+	  _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
  1.1815 -+
  1.1816 -+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
  1.1817 -+	  _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
  1.1818 -+#endif
  1.1819 -+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
  1.1820 -+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
  1.1821 -+
  1.1822 -+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
  1.1823 -+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
  1.1824 -+	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
  1.1825 -+
  1.1826 -+	  wchar_t* __wcs_ps = 0;
  1.1827 -+	  wchar_t* __wcs_ns = 0;
  1.1828 -+	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
  1.1829 -+	  try
  1.1830 -+	    {
  1.1831 -+	      mbstate_t __state;
  1.1832 -+	      size_t __len = strlen(__cpossign);
  1.1833 -+	      if (__len)
  1.1834 -+		{
  1.1835 -+		  ++__len;
  1.1836 -+		  memset(&__state, 0, sizeof(mbstate_t));
  1.1837 -+		  __wcs_ps = new wchar_t[__len];
  1.1838 -+		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
  1.1839 -+		  _M_data->_M_positive_sign = __wcs_ps;
  1.1840 -+		}
  1.1841 -+	      else
  1.1842 -+		_M_data->_M_positive_sign = L"";
  1.1843 -+	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
  1.1844 -+	      
  1.1845 -+	      __len = strlen(__cnegsign);
  1.1846 -+	      if (!__nposn)
  1.1847 -+		_M_data->_M_negative_sign = L"()";
  1.1848 -+	      else if (__len)
  1.1849 -+		{ 
  1.1850 -+		  ++__len;
  1.1851 -+		  memset(&__state, 0, sizeof(mbstate_t));
  1.1852 -+		  __wcs_ns = new wchar_t[__len];
  1.1853 -+		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
  1.1854 -+		  _M_data->_M_negative_sign = __wcs_ns;
  1.1855 -+		}
  1.1856 -+	      else
  1.1857 -+		_M_data->_M_negative_sign = L"";
  1.1858 -+	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
  1.1859 -+	      
  1.1860 -+	      // _Intl == true.
  1.1861 -+	      __len = strlen(__ccurr);
  1.1862 -+	      if (__len)
  1.1863 -+		{
  1.1864 -+		  ++__len;
  1.1865 -+		  memset(&__state, 0, sizeof(mbstate_t));
  1.1866 -+		  wchar_t* __wcs = new wchar_t[__len];
  1.1867 -+		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
  1.1868 -+		  _M_data->_M_curr_symbol = __wcs;
  1.1869 -+		}
  1.1870 -+	      else
  1.1871 -+		_M_data->_M_curr_symbol = L"";
  1.1872 -+	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
  1.1873 -+	    }
  1.1874 -+	  catch (...)
  1.1875 -+	    {
  1.1876 -+	      delete _M_data;
  1.1877 -+	      _M_data = 0;
  1.1878 -+	      delete __wcs_ps;
  1.1879 -+	      delete __wcs_ns;	      
  1.1880 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1881 -+	      __uselocale(__old);
  1.1882 -+#else
  1.1883 -+	      setlocale(LC_ALL, __old);
  1.1884 -+	      free(__old);
  1.1885 -+#endif
  1.1886 -+	      __throw_exception_again;
  1.1887 -+	    } 
  1.1888 -+	  
  1.1889 -+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
  1.1890 -+						      __cloc));
  1.1891 -+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
  1.1892 -+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
  1.1893 -+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
  1.1894 -+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
  1.1895 -+							__pposn);
  1.1896 -+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
  1.1897 -+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
  1.1898 -+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
  1.1899 -+							__nposn);
  1.1900 -+
  1.1901 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1902 -+	  __uselocale(__old);
  1.1903 -+#else
  1.1904 -+	  setlocale(LC_ALL, __old);
  1.1905 -+	  free(__old);
  1.1906 -+#endif
  1.1907 -+	}
  1.1908 -+    }
  1.1909 -+
  1.1910 -+  template<> 
  1.1911 -+  void
  1.1912 -+  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
  1.1913 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1914 -+						       const char*)
  1.1915 -+#else
  1.1916 -+                                                       const char* __name)
  1.1917 -+#endif
  1.1918 -+  {
  1.1919 -+    if (!_M_data)
  1.1920 -+      _M_data = new __moneypunct_cache<wchar_t, false>;
  1.1921 -+
  1.1922 -+    if (!__cloc)
  1.1923 -+	{
  1.1924 -+	  // "C" locale
  1.1925 -+	  _M_data->_M_decimal_point = L'.';
  1.1926 -+	  _M_data->_M_thousands_sep = L',';
  1.1927 -+	  _M_data->_M_grouping = "";
  1.1928 -+          _M_data->_M_grouping_size = 0;
  1.1929 -+	  _M_data->_M_curr_symbol = L"";
  1.1930 -+	  _M_data->_M_curr_symbol_size = 0;
  1.1931 -+	  _M_data->_M_positive_sign = L"";
  1.1932 -+	  _M_data->_M_positive_sign_size = 0;
  1.1933 -+	  _M_data->_M_negative_sign = L"";
  1.1934 -+	  _M_data->_M_negative_sign_size = 0;
  1.1935 -+	  _M_data->_M_frac_digits = 0;
  1.1936 -+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
  1.1937 -+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
  1.1938 -+
  1.1939 -+	  // Use ctype::widen code without the facet...
  1.1940 -+	  unsigned char uc;
  1.1941 -+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
  1.1942 -+	    {
  1.1943 -+	      uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
  1.1944 -+	      _M_data->_M_atoms[__i] = btowc(uc);
  1.1945 -+	    }
  1.1946 -+	}
  1.1947 -+      else
  1.1948 -+	{
  1.1949 -+	  // Named locale.
  1.1950 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.1951 -+	  __c_locale __old = __uselocale(__cloc);
  1.1952 -+#else
  1.1953 -+	  // Switch to named locale so that mbsrtowcs will work.
  1.1954 -+	  char* __old = strdup(setlocale(LC_ALL, NULL));
  1.1955 -+	  setlocale(LC_ALL, __name);
  1.1956 -+#endif
  1.1957 -+
  1.1958 -+#ifdef __UCLIBC_MJN3_ONLY__
  1.1959 -+#warning fix this... should be monetary
  1.1960 -+#endif
  1.1961 -+#ifdef __UCLIBC__
  1.1962 -+# ifdef __UCLIBC_HAS_XLOCALE__
  1.1963 -+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
  1.1964 -+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
  1.1965 -+# else
  1.1966 -+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
  1.1967 -+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
  1.1968 -+# endif
  1.1969 -+#else
  1.1970 -+	  union __s_and_w { const char *__s; unsigned int __w; } __u;
  1.1971 -+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
  1.1972 -+	  _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
  1.1973 -+
  1.1974 -+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
  1.1975 -+	  _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
  1.1976 -+#endif
  1.1977 -+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
  1.1978 -+          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
  1.1979 -+
  1.1980 -+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
  1.1981 -+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
  1.1982 -+	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
  1.1983 -+
  1.1984 -+	  wchar_t* __wcs_ps = 0;
  1.1985 -+	  wchar_t* __wcs_ns = 0;
  1.1986 -+	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
  1.1987 -+	  try
  1.1988 -+            {
  1.1989 -+              mbstate_t __state;
  1.1990 -+              size_t __len;
  1.1991 -+              __len = strlen(__cpossign);
  1.1992 -+              if (__len)
  1.1993 -+                {
  1.1994 -+		  ++__len;
  1.1995 -+		  memset(&__state, 0, sizeof(mbstate_t));
  1.1996 -+		  __wcs_ps = new wchar_t[__len];
  1.1997 -+		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
  1.1998 -+		  _M_data->_M_positive_sign = __wcs_ps;
  1.1999 -+		}
  1.2000 -+	      else
  1.2001 -+		_M_data->_M_positive_sign = L"";
  1.2002 -+              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
  1.2003 -+	      
  1.2004 -+	      __len = strlen(__cnegsign);
  1.2005 -+	      if (!__nposn)
  1.2006 -+		_M_data->_M_negative_sign = L"()";
  1.2007 -+	      else if (__len)
  1.2008 -+		{ 
  1.2009 -+		  ++__len;
  1.2010 -+		  memset(&__state, 0, sizeof(mbstate_t));
  1.2011 -+		  __wcs_ns = new wchar_t[__len];
  1.2012 -+		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
  1.2013 -+		  _M_data->_M_negative_sign = __wcs_ns;
  1.2014 -+		}
  1.2015 -+	      else
  1.2016 -+		_M_data->_M_negative_sign = L"";
  1.2017 -+              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
  1.2018 -+
  1.2019 -+	      // _Intl == true.
  1.2020 -+	      __len = strlen(__ccurr);
  1.2021 -+	      if (__len)
  1.2022 -+		{
  1.2023 -+		  ++__len;
  1.2024 -+		  memset(&__state, 0, sizeof(mbstate_t));
  1.2025 -+		  wchar_t* __wcs = new wchar_t[__len];
  1.2026 -+		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
  1.2027 -+		  _M_data->_M_curr_symbol = __wcs;
  1.2028 -+		}
  1.2029 -+	      else
  1.2030 -+		_M_data->_M_curr_symbol = L"";
  1.2031 -+              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
  1.2032 -+	    }
  1.2033 -+          catch (...)
  1.2034 -+	    {
  1.2035 -+	      delete _M_data;
  1.2036 -+              _M_data = 0;
  1.2037 -+	      delete __wcs_ps;
  1.2038 -+	      delete __wcs_ns;	      
  1.2039 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.2040 -+	      __uselocale(__old);
  1.2041 -+#else
  1.2042 -+	      setlocale(LC_ALL, __old);
  1.2043 -+	      free(__old);
  1.2044 -+#endif
  1.2045 -+              __throw_exception_again;
  1.2046 -+	    }
  1.2047 -+
  1.2048 -+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
  1.2049 -+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
  1.2050 -+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
  1.2051 -+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
  1.2052 -+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
  1.2053 -+	                                                __pposn);
  1.2054 -+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
  1.2055 -+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
  1.2056 -+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
  1.2057 -+	                                                __nposn);
  1.2058 -+
  1.2059 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.2060 -+	  __uselocale(__old);
  1.2061 -+#else
  1.2062 -+	  setlocale(LC_ALL, __old);
  1.2063 -+	  free(__old);
  1.2064 -+#endif
  1.2065 -+	}
  1.2066 -+    }
  1.2067 -+
  1.2068 -+  template<> 
  1.2069 -+    moneypunct<wchar_t, true>::~moneypunct()
  1.2070 -+    {
  1.2071 -+      if (_M_data->_M_positive_sign_size)
  1.2072 -+	delete [] _M_data->_M_positive_sign;
  1.2073 -+      if (_M_data->_M_negative_sign_size
  1.2074 -+          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
  1.2075 -+	delete [] _M_data->_M_negative_sign;
  1.2076 -+      if (_M_data->_M_curr_symbol_size)
  1.2077 -+	delete [] _M_data->_M_curr_symbol;
  1.2078 -+      delete _M_data;
  1.2079 -+    }
  1.2080 -+
  1.2081 -+  template<> 
  1.2082 -+    moneypunct<wchar_t, false>::~moneypunct()
  1.2083 -+    {
  1.2084 -+      if (_M_data->_M_positive_sign_size)
  1.2085 -+	delete [] _M_data->_M_positive_sign;
  1.2086 -+      if (_M_data->_M_negative_sign_size
  1.2087 -+          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
  1.2088 -+	delete [] _M_data->_M_negative_sign;
  1.2089 -+      if (_M_data->_M_curr_symbol_size)
  1.2090 -+	delete [] _M_data->_M_curr_symbol;
  1.2091 -+      delete _M_data;
  1.2092 -+    }
  1.2093 -+#endif
  1.2094 -+}
  1.2095 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
  1.2096 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc	1969-12-31 18:00:00.000000000 -0600
  1.2097 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2004-09-10 10:47:40.000000000 -0500
  1.2098 -@@ -0,0 +1,183 @@
  1.2099 -+// std::numpunct implementation details, GNU version -*- C++ -*-
  1.2100 -+
  1.2101 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  1.2102 -+//
  1.2103 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.2104 -+// software; you can redistribute it and/or modify it under the
  1.2105 -+// terms of the GNU General Public License as published by the
  1.2106 -+// Free Software Foundation; either version 2, or (at your option)
  1.2107 -+// any later version.
  1.2108 -+
  1.2109 -+// This library is distributed in the hope that it will be useful,
  1.2110 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.2111 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.2112 -+// GNU General Public License for more details.
  1.2113 -+
  1.2114 -+// You should have received a copy of the GNU General Public License along
  1.2115 -+// with this library; see the file COPYING.  If not, write to the Free
  1.2116 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.2117 -+// USA.
  1.2118 -+
  1.2119 -+// As a special exception, you may use this file as part of a free software
  1.2120 -+// library without restriction.  Specifically, if other files instantiate
  1.2121 -+// templates or use macros or inline functions from this file, or you compile
  1.2122 -+// this file and link it with other files to produce an executable, this
  1.2123 -+// file does not by itself cause the resulting executable to be covered by
  1.2124 -+// the GNU General Public License.  This exception does not however
  1.2125 -+// invalidate any other reasons why the executable file might be covered by
  1.2126 -+// the GNU General Public License.
  1.2127 -+
  1.2128 -+//
  1.2129 -+// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
  1.2130 -+//
  1.2131 -+
  1.2132 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
  1.2133 -+
  1.2134 -+#define _LIBC
  1.2135 -+#include <locale>
  1.2136 -+#undef _LIBC
  1.2137 -+#include <bits/c++locale_internal.h>
  1.2138 -+
  1.2139 -+#ifdef __UCLIBC_MJN3_ONLY__
  1.2140 -+#warning tailor for stub locale support
  1.2141 -+#endif
  1.2142 -+#ifndef __UCLIBC_HAS_XLOCALE__
  1.2143 -+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
  1.2144 -+#endif
  1.2145 -+
  1.2146 -+namespace std
  1.2147 -+{
  1.2148 -+  template<> 
  1.2149 -+    void
  1.2150 -+    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
  1.2151 -+    {
  1.2152 -+      if (!_M_data)
  1.2153 -+	_M_data = new __numpunct_cache<char>;
  1.2154 -+
  1.2155 -+      if (!__cloc)
  1.2156 -+	{
  1.2157 -+	  // "C" locale
  1.2158 -+	  _M_data->_M_grouping = "";
  1.2159 -+	  _M_data->_M_grouping_size = 0;
  1.2160 -+	  _M_data->_M_use_grouping = false;
  1.2161 -+
  1.2162 -+	  _M_data->_M_decimal_point = '.';
  1.2163 -+	  _M_data->_M_thousands_sep = ',';
  1.2164 -+
  1.2165 -+	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
  1.2166 -+	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
  1.2167 -+
  1.2168 -+	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
  1.2169 -+	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
  1.2170 -+	}
  1.2171 -+      else
  1.2172 -+	{
  1.2173 -+	  // Named locale.
  1.2174 -+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, 
  1.2175 -+							__cloc));
  1.2176 -+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, 
  1.2177 -+							__cloc));
  1.2178 -+
  1.2179 -+	  // Check for NULL, which implies no grouping.
  1.2180 -+	  if (_M_data->_M_thousands_sep == '\0')
  1.2181 -+	    _M_data->_M_grouping = "";
  1.2182 -+	  else
  1.2183 -+	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
  1.2184 -+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
  1.2185 -+	}
  1.2186 -+
  1.2187 -+      // NB: There is no way to extact this info from posix locales.
  1.2188 -+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
  1.2189 -+      _M_data->_M_truename = "true";
  1.2190 -+      _M_data->_M_truename_size = strlen(_M_data->_M_truename);
  1.2191 -+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
  1.2192 -+      _M_data->_M_falsename = "false";
  1.2193 -+      _M_data->_M_falsename_size = strlen(_M_data->_M_falsename);
  1.2194 -+    }
  1.2195 -+ 
  1.2196 -+  template<> 
  1.2197 -+    numpunct<char>::~numpunct()
  1.2198 -+    { delete _M_data; }
  1.2199 -+   
  1.2200 -+#ifdef _GLIBCXX_USE_WCHAR_T
  1.2201 -+  template<> 
  1.2202 -+    void
  1.2203 -+    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
  1.2204 -+    {
  1.2205 -+      if (!_M_data)
  1.2206 -+	_M_data = new __numpunct_cache<wchar_t>;
  1.2207 -+
  1.2208 -+      if (!__cloc)
  1.2209 -+	{
  1.2210 -+	  // "C" locale
  1.2211 -+	  _M_data->_M_grouping = "";
  1.2212 -+	  _M_data->_M_grouping_size = 0;
  1.2213 -+	  _M_data->_M_use_grouping = false;
  1.2214 -+
  1.2215 -+	  _M_data->_M_decimal_point = L'.';
  1.2216 -+	  _M_data->_M_thousands_sep = L',';
  1.2217 -+
  1.2218 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.2219 -+	  __c_locale __old = __uselocale(_S_get_c_locale());
  1.2220 -+#endif
  1.2221 -+	  // Use ctype::widen code without the facet...
  1.2222 -+	  unsigned char uc;
  1.2223 -+	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
  1.2224 -+	    {
  1.2225 -+	      uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]);
  1.2226 -+	      _M_data->_M_atoms_out[__i] = btowc(uc);
  1.2227 -+	    }
  1.2228 -+
  1.2229 -+	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
  1.2230 -+	    {
  1.2231 -+	      uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__j]);
  1.2232 -+	      _M_data->_M_atoms_in[__j] = btowc(uc);
  1.2233 -+	    }
  1.2234 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.2235 -+	  __uselocale(__old);
  1.2236 -+#endif
  1.2237 -+	}
  1.2238 -+      else
  1.2239 -+	{
  1.2240 -+	  // Named locale.
  1.2241 -+#ifdef __UCLIBC_MJN3_ONLY__
  1.2242 -+#warning fix this
  1.2243 -+#endif
  1.2244 -+#ifdef __UCLIBC__
  1.2245 -+# ifdef __UCLIBC_HAS_XLOCALE__
  1.2246 -+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
  1.2247 -+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
  1.2248 -+# else
  1.2249 -+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
  1.2250 -+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
  1.2251 -+# endif
  1.2252 -+#else
  1.2253 -+	  union __s_and_w { const char *__s; unsigned int __w; } __u;
  1.2254 -+	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
  1.2255 -+	  _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
  1.2256 -+
  1.2257 -+	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
  1.2258 -+	  _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
  1.2259 -+#endif
  1.2260 -+
  1.2261 -+	  if (_M_data->_M_thousands_sep == L'\0')
  1.2262 -+	    _M_data->_M_grouping = "";
  1.2263 -+	  else
  1.2264 -+	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
  1.2265 -+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
  1.2266 -+	}
  1.2267 -+
  1.2268 -+      // NB: There is no way to extact this info from posix locales.
  1.2269 -+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
  1.2270 -+      _M_data->_M_truename = L"true";
  1.2271 -+      _M_data->_M_truename_size = wcslen(_M_data->_M_truename);
  1.2272 -+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
  1.2273 -+      _M_data->_M_falsename = L"false";
  1.2274 -+      _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename);
  1.2275 -+    }
  1.2276 -+
  1.2277 -+  template<> 
  1.2278 -+    numpunct<wchar_t>::~numpunct()
  1.2279 -+    { delete _M_data; }
  1.2280 -+ #endif
  1.2281 -+}
  1.2282 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc
  1.2283 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc	1969-12-31 18:00:00.000000000 -0600
  1.2284 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc	2004-09-10 10:48:00.000000000 -0500
  1.2285 -@@ -0,0 +1,356 @@
  1.2286 -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
  1.2287 -+
  1.2288 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  1.2289 -+//
  1.2290 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.2291 -+// software; you can redistribute it and/or modify it under the
  1.2292 -+// terms of the GNU General Public License as published by the
  1.2293 -+// Free Software Foundation; either version 2, or (at your option)
  1.2294 -+// any later version.
  1.2295 -+
  1.2296 -+// This library is distributed in the hope that it will be useful,
  1.2297 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.2298 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.2299 -+// GNU General Public License for more details.
  1.2300 -+
  1.2301 -+// You should have received a copy of the GNU General Public License along
  1.2302 -+// with this library; see the file COPYING.  If not, write to the Free
  1.2303 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.2304 -+// USA.
  1.2305 -+
  1.2306 -+// As a special exception, you may use this file as part of a free software
  1.2307 -+// library without restriction.  Specifically, if other files instantiate
  1.2308 -+// templates or use macros or inline functions from this file, or you compile
  1.2309 -+// this file and link it with other files to produce an executable, this
  1.2310 -+// file does not by itself cause the resulting executable to be covered by
  1.2311 -+// the GNU General Public License.  This exception does not however
  1.2312 -+// invalidate any other reasons why the executable file might be covered by
  1.2313 -+// the GNU General Public License.
  1.2314 -+
  1.2315 -+//
  1.2316 -+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
  1.2317 -+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
  1.2318 -+//
  1.2319 -+
  1.2320 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
  1.2321 -+
  1.2322 -+#include <locale>
  1.2323 -+#include <bits/c++locale_internal.h>
  1.2324 -+
  1.2325 -+#ifdef __UCLIBC_MJN3_ONLY__
  1.2326 -+#warning tailor for stub locale support
  1.2327 -+#endif
  1.2328 -+#ifndef __UCLIBC_HAS_XLOCALE__
  1.2329 -+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
  1.2330 -+#endif
  1.2331 -+
  1.2332 -+namespace std
  1.2333 -+{
  1.2334 -+  template<>
  1.2335 -+    void
  1.2336 -+    __timepunct<char>::
  1.2337 -+    _M_put(char* __s, size_t __maxlen, const char* __format, 
  1.2338 -+	   const tm* __tm) const
  1.2339 -+    {
  1.2340 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.2341 -+      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
  1.2342 -+					_M_c_locale_timepunct);
  1.2343 -+#else
  1.2344 -+      char* __old = strdup(setlocale(LC_ALL, NULL));
  1.2345 -+      setlocale(LC_ALL, _M_name_timepunct);
  1.2346 -+      const size_t __len = strftime(__s, __maxlen, __format, __tm);
  1.2347 -+      setlocale(LC_ALL, __old);
  1.2348 -+      free(__old);
  1.2349 -+#endif
  1.2350 -+      // Make sure __s is null terminated.
  1.2351 -+      if (__len == 0)
  1.2352 -+	__s[0] = '\0';
  1.2353 -+    }
  1.2354 -+
  1.2355 -+  template<> 
  1.2356 -+    void
  1.2357 -+    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
  1.2358 -+    {
  1.2359 -+      if (!_M_data)
  1.2360 -+	_M_data = new __timepunct_cache<char>;
  1.2361 -+
  1.2362 -+      if (!__cloc)
  1.2363 -+	{
  1.2364 -+	  // "C" locale
  1.2365 -+	  _M_c_locale_timepunct = _S_get_c_locale();
  1.2366 -+
  1.2367 -+	  _M_data->_M_date_format = "%m/%d/%y";
  1.2368 -+	  _M_data->_M_date_era_format = "%m/%d/%y";
  1.2369 -+	  _M_data->_M_time_format = "%H:%M:%S";
  1.2370 -+	  _M_data->_M_time_era_format = "%H:%M:%S";
  1.2371 -+	  _M_data->_M_date_time_format = "";
  1.2372 -+	  _M_data->_M_date_time_era_format = "";
  1.2373 -+	  _M_data->_M_am = "AM";
  1.2374 -+	  _M_data->_M_pm = "PM";
  1.2375 -+	  _M_data->_M_am_pm_format = "";
  1.2376 -+
  1.2377 -+	  // Day names, starting with "C"'s Sunday.
  1.2378 -+	  _M_data->_M_day1 = "Sunday";
  1.2379 -+	  _M_data->_M_day2 = "Monday";
  1.2380 -+	  _M_data->_M_day3 = "Tuesday";
  1.2381 -+	  _M_data->_M_day4 = "Wednesday";
  1.2382 -+	  _M_data->_M_day5 = "Thursday";
  1.2383 -+	  _M_data->_M_day6 = "Friday";
  1.2384 -+	  _M_data->_M_day7 = "Saturday";
  1.2385 -+
  1.2386 -+	  // Abbreviated day names, starting with "C"'s Sun.
  1.2387 -+	  _M_data->_M_aday1 = "Sun";
  1.2388 -+	  _M_data->_M_aday2 = "Mon";
  1.2389 -+	  _M_data->_M_aday3 = "Tue";
  1.2390 -+	  _M_data->_M_aday4 = "Wed";
  1.2391 -+	  _M_data->_M_aday5 = "Thu";
  1.2392 -+	  _M_data->_M_aday6 = "Fri";
  1.2393 -+	  _M_data->_M_aday7 = "Sat";
  1.2394 -+
  1.2395 -+	  // Month names, starting with "C"'s January.
  1.2396 -+	  _M_data->_M_month01 = "January";
  1.2397 -+	  _M_data->_M_month02 = "February";
  1.2398 -+	  _M_data->_M_month03 = "March";
  1.2399 -+	  _M_data->_M_month04 = "April";
  1.2400 -+	  _M_data->_M_month05 = "May";
  1.2401 -+	  _M_data->_M_month06 = "June";
  1.2402 -+	  _M_data->_M_month07 = "July";
  1.2403 -+	  _M_data->_M_month08 = "August";
  1.2404 -+	  _M_data->_M_month09 = "September";
  1.2405 -+	  _M_data->_M_month10 = "October";
  1.2406 -+	  _M_data->_M_month11 = "November";
  1.2407 -+	  _M_data->_M_month12 = "December";
  1.2408 -+
  1.2409 -+	  // Abbreviated month names, starting with "C"'s Jan.
  1.2410 -+	  _M_data->_M_amonth01 = "Jan";
  1.2411 -+	  _M_data->_M_amonth02 = "Feb";
  1.2412 -+	  _M_data->_M_amonth03 = "Mar";
  1.2413 -+	  _M_data->_M_amonth04 = "Apr";
  1.2414 -+	  _M_data->_M_amonth05 = "May";
  1.2415 -+	  _M_data->_M_amonth06 = "Jun";
  1.2416 -+	  _M_data->_M_amonth07 = "Jul";
  1.2417 -+	  _M_data->_M_amonth08 = "Aug";
  1.2418 -+	  _M_data->_M_amonth09 = "Sep";
  1.2419 -+	  _M_data->_M_amonth10 = "Oct";
  1.2420 -+	  _M_data->_M_amonth11 = "Nov";
  1.2421 -+	  _M_data->_M_amonth12 = "Dec";
  1.2422 -+	}
  1.2423 -+      else
  1.2424 -+	{
  1.2425 -+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
  1.2426 -+
  1.2427 -+	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
  1.2428 -+	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
  1.2429 -+	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
  1.2430 -+	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
  1.2431 -+	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
  1.2432 -+	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc);
  1.2433 -+	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
  1.2434 -+	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
  1.2435 -+	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
  1.2436 -+
  1.2437 -+	  // Day names, starting with "C"'s Sunday.
  1.2438 -+	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
  1.2439 -+	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
  1.2440 -+	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
  1.2441 -+	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
  1.2442 -+	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
  1.2443 -+	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
  1.2444 -+	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
  1.2445 -+
  1.2446 -+	  // Abbreviated day names, starting with "C"'s Sun.
  1.2447 -+	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
  1.2448 -+	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
  1.2449 -+	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
  1.2450 -+	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
  1.2451 -+	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
  1.2452 -+	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
  1.2453 -+	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
  1.2454 -+
  1.2455 -+	  // Month names, starting with "C"'s January.
  1.2456 -+	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
  1.2457 -+	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
  1.2458 -+	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
  1.2459 -+	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
  1.2460 -+	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
  1.2461 -+	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
  1.2462 -+	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
  1.2463 -+	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
  1.2464 -+	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
  1.2465 -+	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
  1.2466 -+	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
  1.2467 -+	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
  1.2468 -+
  1.2469 -+	  // Abbreviated month names, starting with "C"'s Jan.
  1.2470 -+	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
  1.2471 -+	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
  1.2472 -+	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
  1.2473 -+	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
  1.2474 -+	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
  1.2475 -+	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
  1.2476 -+	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
  1.2477 -+	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
  1.2478 -+	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
  1.2479 -+	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
  1.2480 -+	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
  1.2481 -+	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
  1.2482 -+	}
  1.2483 -+    }
  1.2484 -+
  1.2485 -+#ifdef _GLIBCXX_USE_WCHAR_T
  1.2486 -+  template<>
  1.2487 -+    void
  1.2488 -+    __timepunct<wchar_t>::
  1.2489 -+    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
  1.2490 -+	   const tm* __tm) const
  1.2491 -+    {
  1.2492 -+#ifdef __UCLIBC_HAS_XLOCALE__
  1.2493 -+      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
  1.2494 -+      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
  1.2495 -+					_M_c_locale_timepunct);
  1.2496 -+#else
  1.2497 -+      char* __old = strdup(setlocale(LC_ALL, NULL));
  1.2498 -+      setlocale(LC_ALL, _M_name_timepunct);
  1.2499 -+      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
  1.2500 -+      setlocale(LC_ALL, __old);
  1.2501 -+      free(__old);
  1.2502 -+#endif
  1.2503 -+      // Make sure __s is null terminated.
  1.2504 -+      if (__len == 0)
  1.2505 -+	__s[0] = L'\0';
  1.2506 -+    }
  1.2507 -+
  1.2508 -+  template<> 
  1.2509 -+    void
  1.2510 -+    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
  1.2511 -+    {
  1.2512 -+      if (!_M_data)
  1.2513 -+	_M_data = new __timepunct_cache<wchar_t>;
  1.2514 -+
  1.2515 -+#warning wide time stuff
  1.2516 -+//       if (!__cloc)
  1.2517 -+	{
  1.2518 -+	  // "C" locale
  1.2519 -+	  _M_c_locale_timepunct = _S_get_c_locale();
  1.2520 -+
  1.2521 -+	  _M_data->_M_date_format = L"%m/%d/%y";
  1.2522 -+	  _M_data->_M_date_era_format = L"%m/%d/%y";
  1.2523 -+	  _M_data->_M_time_format = L"%H:%M:%S";
  1.2524 -+	  _M_data->_M_time_era_format = L"%H:%M:%S";
  1.2525 -+	  _M_data->_M_date_time_format = L"";
  1.2526 -+	  _M_data->_M_date_time_era_format = L"";
  1.2527 -+	  _M_data->_M_am = L"AM";
  1.2528 -+	  _M_data->_M_pm = L"PM";
  1.2529 -+	  _M_data->_M_am_pm_format = L"";
  1.2530 -+
  1.2531 -+	  // Day names, starting with "C"'s Sunday.
  1.2532 -+	  _M_data->_M_day1 = L"Sunday";
  1.2533 -+	  _M_data->_M_day2 = L"Monday";
  1.2534 -+	  _M_data->_M_day3 = L"Tuesday";
  1.2535 -+	  _M_data->_M_day4 = L"Wednesday";
  1.2536 -+	  _M_data->_M_day5 = L"Thursday";
  1.2537 -+	  _M_data->_M_day6 = L"Friday";
  1.2538 -+	  _M_data->_M_day7 = L"Saturday";
  1.2539 -+
  1.2540 -+	  // Abbreviated day names, starting with "C"'s Sun.
  1.2541 -+	  _M_data->_M_aday1 = L"Sun";
  1.2542 -+	  _M_data->_M_aday2 = L"Mon";
  1.2543 -+	  _M_data->_M_aday3 = L"Tue";
  1.2544 -+	  _M_data->_M_aday4 = L"Wed";
  1.2545 -+	  _M_data->_M_aday5 = L"Thu";
  1.2546 -+	  _M_data->_M_aday6 = L"Fri";
  1.2547 -+	  _M_data->_M_aday7 = L"Sat";
  1.2548 -+
  1.2549 -+	  // Month names, starting with "C"'s January.
  1.2550 -+	  _M_data->_M_month01 = L"January";
  1.2551 -+	  _M_data->_M_month02 = L"February";
  1.2552 -+	  _M_data->_M_month03 = L"March";
  1.2553 -+	  _M_data->_M_month04 = L"April";
  1.2554 -+	  _M_data->_M_month05 = L"May";
  1.2555 -+	  _M_data->_M_month06 = L"June";
  1.2556 -+	  _M_data->_M_month07 = L"July";
  1.2557 -+	  _M_data->_M_month08 = L"August";
  1.2558 -+	  _M_data->_M_month09 = L"September";
  1.2559 -+	  _M_data->_M_month10 = L"October";
  1.2560 -+	  _M_data->_M_month11 = L"November";
  1.2561 -+	  _M_data->_M_month12 = L"December";
  1.2562 -+
  1.2563 -+	  // Abbreviated month names, starting with "C"'s Jan.
  1.2564 -+	  _M_data->_M_amonth01 = L"Jan";
  1.2565 -+	  _M_data->_M_amonth02 = L"Feb";
  1.2566 -+	  _M_data->_M_amonth03 = L"Mar";
  1.2567 -+	  _M_data->_M_amonth04 = L"Apr";
  1.2568 -+	  _M_data->_M_amonth05 = L"May";
  1.2569 -+	  _M_data->_M_amonth06 = L"Jun";
  1.2570 -+	  _M_data->_M_amonth07 = L"Jul";
  1.2571 -+	  _M_data->_M_amonth08 = L"Aug";
  1.2572 -+	  _M_data->_M_amonth09 = L"Sep";
  1.2573 -+	  _M_data->_M_amonth10 = L"Oct";
  1.2574 -+	  _M_data->_M_amonth11 = L"Nov";
  1.2575 -+	  _M_data->_M_amonth12 = L"Dec";
  1.2576 -+	}
  1.2577 -+#if 0
  1.2578 -+      else
  1.2579 -+	{
  1.2580 -+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
  1.2581 -+
  1.2582 -+	  _M_data->_M_date_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_FMT, __cloc));
  1.2583 -+	  _M_data->_M_date_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc));
  1.2584 -+	  _M_data->_M_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT, __cloc));
  1.2585 -+	  _M_data->_M_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc));
  1.2586 -+	  _M_data->_M_date_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_T_FMT, __cloc));
  1.2587 -+	  _M_data->_M_date_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc));
  1.2588 -+	  _M_data->_M_am = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WAM_STR, __cloc));
  1.2589 -+	  _M_data->_M_pm = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WPM_STR, __cloc));
  1.2590 -+	  _M_data->_M_am_pm_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc));
  1.2591 -+
  1.2592 -+	  // Day names, starting with "C"'s Sunday.
  1.2593 -+	  _M_data->_M_day1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_1, __cloc));
  1.2594 -+	  _M_data->_M_day2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_2, __cloc));
  1.2595 -+	  _M_data->_M_day3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_3, __cloc));
  1.2596 -+	  _M_data->_M_day4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_4, __cloc));
  1.2597 -+	  _M_data->_M_day5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_5, __cloc));
  1.2598 -+	  _M_data->_M_day6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_6, __cloc));
  1.2599 -+	  _M_data->_M_day7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_7, __cloc));
  1.2600 -+
  1.2601 -+	  // Abbreviated day names, starting with "C"'s Sun.
  1.2602 -+	  _M_data->_M_aday1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_1, __cloc));
  1.2603 -+	  _M_data->_M_aday2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_2, __cloc));
  1.2604 -+	  _M_data->_M_aday3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_3, __cloc));
  1.2605 -+	  _M_data->_M_aday4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_4, __cloc));
  1.2606 -+	  _M_data->_M_aday5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_5, __cloc));
  1.2607 -+	  _M_data->_M_aday6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_6, __cloc));
  1.2608 -+	  _M_data->_M_aday7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_7, __cloc));
  1.2609 -+
  1.2610 -+	  // Month names, starting with "C"'s January.
  1.2611 -+	  _M_data->_M_month01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_1, __cloc));
  1.2612 -+	  _M_data->_M_month02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_2, __cloc));
  1.2613 -+	  _M_data->_M_month03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_3, __cloc));
  1.2614 -+	  _M_data->_M_month04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_4, __cloc));
  1.2615 -+	  _M_data->_M_month05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_5, __cloc));
  1.2616 -+	  _M_data->_M_month06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_6, __cloc));
  1.2617 -+	  _M_data->_M_month07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_7, __cloc));
  1.2618 -+	  _M_data->_M_month08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_8, __cloc));
  1.2619 -+	  _M_data->_M_month09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_9, __cloc));
  1.2620 -+	  _M_data->_M_month10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_10, __cloc));
  1.2621 -+	  _M_data->_M_month11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_11, __cloc));
  1.2622 -+	  _M_data->_M_month12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_12, __cloc));
  1.2623 -+
  1.2624 -+	  // Abbreviated month names, starting with "C"'s Jan.
  1.2625 -+	  _M_data->_M_amonth01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_1, __cloc));
  1.2626 -+	  _M_data->_M_amonth02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_2, __cloc));
  1.2627 -+	  _M_data->_M_amonth03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_3, __cloc));
  1.2628 -+	  _M_data->_M_amonth04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_4, __cloc));
  1.2629 -+	  _M_data->_M_amonth05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_5, __cloc));
  1.2630 -+	  _M_data->_M_amonth06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_6, __cloc));
  1.2631 -+	  _M_data->_M_amonth07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_7, __cloc));
  1.2632 -+	  _M_data->_M_amonth08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_8, __cloc));
  1.2633 -+	  _M_data->_M_amonth09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_9, __cloc));
  1.2634 -+	  _M_data->_M_amonth10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_10, __cloc));
  1.2635 -+	  _M_data->_M_amonth11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_11, __cloc));
  1.2636 -+	  _M_data->_M_amonth12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_12, __cloc));
  1.2637 -+	}
  1.2638 -+#endif // 0
  1.2639 -+    }
  1.2640 -+#endif
  1.2641 -+}
  1.2642 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h
  1.2643 ---- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h	1969-12-31 18:00:00.000000000 -0600
  1.2644 -+++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h	2004-09-10 10:47:40.000000000 -0500
  1.2645 -@@ -0,0 +1,68 @@
  1.2646 -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
  1.2647 -+
  1.2648 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  1.2649 -+//
  1.2650 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.2651 -+// software; you can redistribute it and/or modify it under the
  1.2652 -+// terms of the GNU General Public License as published by the
  1.2653 -+// Free Software Foundation; either version 2, or (at your option)
  1.2654 -+// any later version.
  1.2655 -+
  1.2656 -+// This library is distributed in the hope that it will be useful,
  1.2657 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.2658 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.2659 -+// GNU General Public License for more details.
  1.2660 -+
  1.2661 -+// You should have received a copy of the GNU General Public License along
  1.2662 -+// with this library; see the file COPYING.  If not, write to the Free
  1.2663 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.2664 -+// USA.
  1.2665 -+
  1.2666 -+// As a special exception, you may use this file as part of a free software
  1.2667 -+// library without restriction.  Specifically, if other files instantiate
  1.2668 -+// templates or use macros or inline functions from this file, or you compile
  1.2669 -+// this file and link it with other files to produce an executable, this
  1.2670 -+// file does not by itself cause the resulting executable to be covered by
  1.2671 -+// the GNU General Public License.  This exception does not however
  1.2672 -+// invalidate any other reasons why the executable file might be covered by
  1.2673 -+// the GNU General Public License.
  1.2674 -+
  1.2675 -+//
  1.2676 -+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
  1.2677 -+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
  1.2678 -+//
  1.2679 -+
  1.2680 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
  1.2681 -+
  1.2682 -+  template<typename _CharT>
  1.2683 -+    __timepunct<_CharT>::__timepunct(size_t __refs) 
  1.2684 -+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
  1.2685 -+    _M_name_timepunct(_S_get_c_name())
  1.2686 -+    { _M_initialize_timepunct(); }
  1.2687 -+
  1.2688 -+  template<typename _CharT>
  1.2689 -+    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
  1.2690 -+    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
  1.2691 -+    _M_name_timepunct(_S_get_c_name())
  1.2692 -+    { _M_initialize_timepunct(); }
  1.2693 -+
  1.2694 -+  template<typename _CharT>
  1.2695 -+    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
  1.2696 -+				     size_t __refs) 
  1.2697 -+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
  1.2698 -+    _M_name_timepunct(__s)
  1.2699 -+    { 
  1.2700 -+      char* __tmp = new char[std::strlen(__s) + 1];
  1.2701 -+      std::strcpy(__tmp, __s);
  1.2702 -+      _M_name_timepunct = __tmp;
  1.2703 -+      _M_initialize_timepunct(__cloc); 
  1.2704 -+    }
  1.2705 -+
  1.2706 -+  template<typename _CharT>
  1.2707 -+    __timepunct<_CharT>::~__timepunct()
  1.2708 -+    { 
  1.2709 -+      if (_M_name_timepunct != _S_get_c_name())
  1.2710 -+	delete [] _M_name_timepunct;
  1.2711 -+      delete _M_data; 
  1.2712 -+      _S_destroy_c_locale(_M_c_locale_timepunct); 
  1.2713 -+    }
  1.2714 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h
  1.2715 ---- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h	1969-12-31 18:00:00.000000000 -0600
  1.2716 -+++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h	2004-09-10 10:47:40.000000000 -0500
  1.2717 -@@ -0,0 +1,58 @@
  1.2718 -+// Locale support -*- C++ -*-
  1.2719 -+
  1.2720 -+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
  1.2721 -+// Free Software Foundation, Inc.
  1.2722 -+//
  1.2723 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.2724 -+// software; you can redistribute it and/or modify it under the
  1.2725 -+// terms of the GNU General Public License as published by the
  1.2726 -+// Free Software Foundation; either version 2, or (at your option)
  1.2727 -+// any later version.
  1.2728 -+
  1.2729 -+// This library is distributed in the hope that it will be useful,
  1.2730 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.2731 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.2732 -+// GNU General Public License for more details.
  1.2733 -+
  1.2734 -+// You should have received a copy of the GNU General Public License along
  1.2735 -+// with this library; see the file COPYING.  If not, write to the Free
  1.2736 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.2737 -+// USA.
  1.2738 -+
  1.2739 -+// As a special exception, you may use this file as part of a free software
  1.2740 -+// library without restriction.  Specifically, if other files instantiate
  1.2741 -+// templates or use macros or inline functions from this file, or you compile
  1.2742 -+// this file and link it with other files to produce an executable, this
  1.2743 -+// file does not by itself cause the resulting executable to be covered by
  1.2744 -+// the GNU General Public License.  This exception does not however
  1.2745 -+// invalidate any other reasons why the executable file might be covered by
  1.2746 -+// the GNU General Public License.
  1.2747 -+
  1.2748 -+//
  1.2749 -+// ISO C++ 14882: 22.1  Locales
  1.2750 -+//
  1.2751 -+  
  1.2752 -+// Information as gleaned from /usr/include/ctype.h
  1.2753 -+  
  1.2754 -+  struct ctype_base
  1.2755 -+  {
  1.2756 -+    // Note: In uClibc, the following two types depend on configuration.
  1.2757 -+ 
  1.2758 -+    // Non-standard typedefs.
  1.2759 -+    typedef const __ctype_touplow_t* __to_type;
  1.2760 -+
  1.2761 -+    // NB: Offsets into ctype<char>::_M_table force a particular size
  1.2762 -+    // on the mask type. Because of this, we don't use an enum.
  1.2763 -+    typedef __ctype_mask_t	mask;   
  1.2764 -+    static const mask upper    	= _ISupper;
  1.2765 -+    static const mask lower 	= _ISlower;
  1.2766 -+    static const mask alpha 	= _ISalpha;
  1.2767 -+    static const mask digit 	= _ISdigit;
  1.2768 -+    static const mask xdigit 	= _ISxdigit;
  1.2769 -+    static const mask space 	= _ISspace;
  1.2770 -+    static const mask print 	= _ISprint;
  1.2771 -+    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
  1.2772 -+    static const mask cntrl 	= _IScntrl;
  1.2773 -+    static const mask punct 	= _ISpunct;
  1.2774 -+    static const mask alnum 	= _ISalpha | _ISdigit;
  1.2775 -+  };
  1.2776 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h
  1.2777 ---- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h	1969-12-31 18:00:00.000000000 -0600
  1.2778 -+++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h	2004-09-10 10:47:40.000000000 -0500
  1.2779 -@@ -0,0 +1,69 @@
  1.2780 -+// Locale support -*- C++ -*-
  1.2781 -+
  1.2782 -+// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
  1.2783 -+//
  1.2784 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.2785 -+// software; you can redistribute it and/or modify it under the
  1.2786 -+// terms of the GNU General Public License as published by the
  1.2787 -+// Free Software Foundation; either version 2, or (at your option)
  1.2788 -+// any later version.
  1.2789 -+
  1.2790 -+// This library is distributed in the hope that it will be useful,
  1.2791 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.2792 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.2793 -+// GNU General Public License for more details.
  1.2794 -+
  1.2795 -+// You should have received a copy of the GNU General Public License along
  1.2796 -+// with this library; see the file COPYING.  If not, write to the Free
  1.2797 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.2798 -+// USA.
  1.2799 -+
  1.2800 -+// As a special exception, you may use this file as part of a free software
  1.2801 -+// library without restriction.  Specifically, if other files instantiate
  1.2802 -+// templates or use macros or inline functions from this file, or you compile
  1.2803 -+// this file and link it with other files to produce an executable, this
  1.2804 -+// file does not by itself cause the resulting executable to be covered by
  1.2805 -+// the GNU General Public License.  This exception does not however
  1.2806 -+// invalidate any other reasons why the executable file might be covered by
  1.2807 -+// the GNU General Public License.
  1.2808 -+
  1.2809 -+//
  1.2810 -+// ISO C++ 14882: 22.1  Locales
  1.2811 -+//
  1.2812 -+  
  1.2813 -+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
  1.2814 -+// functions go in ctype.cc
  1.2815 -+  
  1.2816 -+  bool
  1.2817 -+  ctype<char>::
  1.2818 -+  is(mask __m, char __c) const
  1.2819 -+  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
  1.2820 -+
  1.2821 -+  const char*
  1.2822 -+  ctype<char>::
  1.2823 -+  is(const char* __low, const char* __high, mask* __vec) const
  1.2824 -+  {
  1.2825 -+    while (__low < __high)
  1.2826 -+      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
  1.2827 -+    return __high;
  1.2828 -+  }
  1.2829 -+
  1.2830 -+  const char*
  1.2831 -+  ctype<char>::
  1.2832 -+  scan_is(mask __m, const char* __low, const char* __high) const
  1.2833 -+  {
  1.2834 -+    while (__low < __high 
  1.2835 -+	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
  1.2836 -+      ++__low;
  1.2837 -+    return __low;
  1.2838 -+  }
  1.2839 -+
  1.2840 -+  const char*
  1.2841 -+  ctype<char>::
  1.2842 -+  scan_not(mask __m, const char* __low, const char* __high) const
  1.2843 -+  {
  1.2844 -+    while (__low < __high 
  1.2845 -+	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
  1.2846 -+      ++__low;
  1.2847 -+    return __low;
  1.2848 -+  }
  1.2849 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h
  1.2850 ---- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h	1969-12-31 18:00:00.000000000 -0600
  1.2851 -+++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h	2004-09-10 10:47:40.000000000 -0500
  1.2852 -@@ -0,0 +1,92 @@
  1.2853 -+// Locale support -*- C++ -*-
  1.2854 -+
  1.2855 -+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
  1.2856 -+// Free Software Foundation, Inc.
  1.2857 -+//
  1.2858 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.2859 -+// software; you can redistribute it and/or modify it under the
  1.2860 -+// terms of the GNU General Public License as published by the
  1.2861 -+// Free Software Foundation; either version 2, or (at your option)
  1.2862 -+// any later version.
  1.2863 -+
  1.2864 -+// This library is distributed in the hope that it will be useful,
  1.2865 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.2866 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.2867 -+// GNU General Public License for more details.
  1.2868 -+
  1.2869 -+// You should have received a copy of the GNU General Public License along
  1.2870 -+// with this library; see the file COPYING.  If not, write to the Free
  1.2871 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.2872 -+// USA.
  1.2873 -+
  1.2874 -+// As a special exception, you may use this file as part of a free software
  1.2875 -+// library without restriction.  Specifically, if other files instantiate
  1.2876 -+// templates or use macros or inline functions from this file, or you compile
  1.2877 -+// this file and link it with other files to produce an executable, this
  1.2878 -+// file does not by itself cause the resulting executable to be covered by
  1.2879 -+// the GNU General Public License.  This exception does not however
  1.2880 -+// invalidate any other reasons why the executable file might be covered by
  1.2881 -+// the GNU General Public License.
  1.2882 -+
  1.2883 -+//
  1.2884 -+// ISO C++ 14882: 22.1  Locales
  1.2885 -+//
  1.2886 -+  
  1.2887 -+// Information as gleaned from /usr/include/ctype.h
  1.2888 -+
  1.2889 -+  const ctype_base::mask*
  1.2890 -+  ctype<char>::classic_table() throw()
  1.2891 -+  { return __C_ctype_b; }
  1.2892 -+
  1.2893 -+  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
  1.2894 -+		     size_t __refs) 
  1.2895 -+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
  1.2896 -+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
  1.2897 -+  {
  1.2898 -+    _M_toupper = __C_ctype_toupper;
  1.2899 -+    _M_tolower = __C_ctype_tolower;
  1.2900 -+    _M_table = __table ? __table : __C_ctype_b;
  1.2901 -+    memset(_M_widen, 0, sizeof(_M_widen));
  1.2902 -+    memset(_M_narrow, 0, sizeof(_M_narrow));
  1.2903 -+  }
  1.2904 -+
  1.2905 -+  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
  1.2906 -+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
  1.2907 -+  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
  1.2908 -+  {
  1.2909 -+    _M_toupper = __C_ctype_toupper;
  1.2910 -+    _M_tolower = __C_ctype_tolower;
  1.2911 -+    _M_table = __table ? __table : __C_ctype_b;
  1.2912 -+    memset(_M_widen, 0, sizeof(_M_widen));
  1.2913 -+    memset(_M_narrow, 0, sizeof(_M_narrow));
  1.2914 -+  }
  1.2915 -+
  1.2916 -+  char
  1.2917 -+  ctype<char>::do_toupper(char __c) const
  1.2918 -+  { return _M_toupper[static_cast<unsigned char>(__c)]; }
  1.2919 -+
  1.2920 -+  const char*
  1.2921 -+  ctype<char>::do_toupper(char* __low, const char* __high) const
  1.2922 -+  {
  1.2923 -+    while (__low < __high)
  1.2924 -+      {
  1.2925 -+	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
  1.2926 -+	++__low;
  1.2927 -+      }
  1.2928 -+    return __high;
  1.2929 -+  }
  1.2930 -+
  1.2931 -+  char
  1.2932 -+  ctype<char>::do_tolower(char __c) const
  1.2933 -+  { return _M_tolower[static_cast<unsigned char>(__c)]; }
  1.2934 -+
  1.2935 -+  const char* 
  1.2936 -+  ctype<char>::do_tolower(char* __low, const char* __high) const
  1.2937 -+  {
  1.2938 -+    while (__low < __high)
  1.2939 -+      {
  1.2940 -+	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
  1.2941 -+	++__low;
  1.2942 -+      }
  1.2943 -+    return __high;
  1.2944 -+  }
  1.2945 -diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h
  1.2946 ---- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h	1969-12-31 18:00:00.000000000 -0600
  1.2947 -+++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h	2004-09-10 10:47:40.000000000 -0500
  1.2948 -@@ -0,0 +1,44 @@
  1.2949 -+// Specific definitions for GNU/Linux  -*- C++ -*-
  1.2950 -+
  1.2951 -+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
  1.2952 -+//
  1.2953 -+// This file is part of the GNU ISO C++ Library.  This library is free
  1.2954 -+// software; you can redistribute it and/or modify it under the
  1.2955 -+// terms of the GNU General Public License as published by the
  1.2956 -+// Free Software Foundation; either version 2, or (at your option)
  1.2957 -+// any later version.
  1.2958 -+
  1.2959 -+// This library is distributed in the hope that it will be useful,
  1.2960 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
  1.2961 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1.2962 -+// GNU General Public License for more details.
  1.2963 -+
  1.2964 -+// You should have received a copy of the GNU General Public License along
  1.2965 -+// with this library; see the file COPYING.  If not, write to the Free
  1.2966 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  1.2967 -+// USA.
  1.2968 -+
  1.2969 -+// As a special exception, you may use this file as part of a free software
  1.2970 -+// library without restriction.  Specifically, if other files instantiate
  1.2971 -+// templates or use macros or inline functions from this file, or you compile
  1.2972 -+// this file and link it with other files to produce an executable, this
  1.2973 -+// file does not by itself cause the resulting executable to be covered by
  1.2974 -+// the GNU General Public License.  This exception does not however
  1.2975 -+// invalidate any other reasons why the executable file might be covered by
  1.2976 -+// the GNU General Public License.
  1.2977 -+
  1.2978 -+#ifndef _GLIBCXX_OS_DEFINES
  1.2979 -+#define _GLIBCXX_OS_DEFINES 1
  1.2980 -+
  1.2981 -+// System-specific #define, typedefs, corrections, etc, go here.  This
  1.2982 -+// file will come before all others.
  1.2983 -+
  1.2984 -+// This keeps isanum, et al from being propagated as macros.
  1.2985 -+#define __NO_CTYPE 1
  1.2986 -+
  1.2987 -+#include <features.h>
  1.2988 -+
  1.2989 -+// We must not see the optimized string functions GNU libc defines.
  1.2990 -+#define __NO_STRING_INLINES
  1.2991 -+
  1.2992 -+#endif
  1.2993 -diff -urN gcc-3.4.2-dist/libstdc++-v3/configure gcc-3.4.2/libstdc++-v3/configure
  1.2994 ---- gcc-3.4.2-dist/libstdc++-v3/configure	2004-08-13 15:44:04.000000000 -0500
  1.2995 -+++ gcc-3.4.2/libstdc++-v3/configure	2004-09-10 10:47:40.000000000 -0500
  1.2996 -@@ -3878,6 +3878,11 @@
  1.2997 -   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  1.2998 -   ;;
  1.2999 - 
  1.3000 -+linux-uclibc*)
  1.3001 -+  lt_cv_deplibs_check_method=pass_all
  1.3002 -+  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  1.3003 -+  ;;
  1.3004 -+
  1.3005 - netbsd*)
  1.3006 -   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  1.3007 -     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  1.3008 -@@ -5479,7 +5479,7 @@
  1.3009 -   enableval="$enable_clocale"
  1.3010 - 
  1.3011 -       case "$enableval" in
  1.3012 --       generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
  1.3013 -+       generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
  1.3014 -        *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
  1.3015 - echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
  1.3016 -    { (exit 1); exit 1; }; } ;;
  1.3017 -@@ -5545,6 +5550,9 @@
  1.3018 -   # Default to "generic".
  1.3019 -   if test $enable_clocale_flag = auto; then
  1.3020 -     case x${target_os} in
  1.3021 -+      xlinux-uclibc*)
  1.3022 -+	enable_clocale_flag=uclibc
  1.3023 -+	;;
  1.3024 -       xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
  1.3025 -         cat >conftest.$ac_ext <<_ACEOF
  1.3026 - #line $LINENO "configure"
  1.3027 -@@ -5759,6 +5767,77 @@
  1.3028 -       CTIME_CC=config/locale/generic/time_members.cc
  1.3029 -       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  1.3030 -       ;;
  1.3031 -+    uclibc)
  1.3032 -+      echo "$as_me:$LINENO: result: uclibc" >&5
  1.3033 -+echo "${ECHO_T}uclibc" >&6
  1.3034 -+
  1.3035 -+      # Declare intention to use gettext, and add support for specific
  1.3036 -+      # languages.
  1.3037 -+      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  1.3038 -+      ALL_LINGUAS="de fr"
  1.3039 -+
  1.3040 -+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  1.3041 -+      # Extract the first word of "msgfmt", so it can be a program name with args.
  1.3042 -+set dummy msgfmt; ac_word=$2
  1.3043 -+echo "$as_me:$LINENO: checking for $ac_word" >&5
  1.3044 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
  1.3045 -+if test "${ac_cv_prog_check_msgfmt+set}" = set; then
  1.3046 -+  echo $ECHO_N "(cached) $ECHO_C" >&6
  1.3047 -+else
  1.3048 -+  if test -n "$check_msgfmt"; then
  1.3049 -+  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
  1.3050 -+else
  1.3051 -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1.3052 -+for as_dir in $PATH
  1.3053 -+do
  1.3054 -+  IFS=$as_save_IFS
  1.3055 -+  test -z "$as_dir" && as_dir=.
  1.3056 -+  for ac_exec_ext in '' $ac_executable_extensions; do
  1.3057 -+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  1.3058 -+    ac_cv_prog_check_msgfmt="yes"
  1.3059 -+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
  1.3060 -+    break 2
  1.3061 -+  fi
  1.3062 -+done
  1.3063 -+done
  1.3064 -+
  1.3065 -+  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
  1.3066 -+fi
  1.3067 -+fi
  1.3068 -+check_msgfmt=$ac_cv_prog_check_msgfmt
  1.3069 -+if test -n "$check_msgfmt"; then
  1.3070 -+  echo "$as_me:$LINENO: result: $check_msgfmt" >&5
  1.3071 -+echo "${ECHO_T}$check_msgfmt" >&6
  1.3072 -+else
  1.3073 -+  echo "$as_me:$LINENO: result: no" >&5
  1.3074 -+echo "${ECHO_T}no" >&6
  1.3075 -+fi
  1.3076 -+
  1.3077 -+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  1.3078 -+        USE_NLS=yes
  1.3079 -+      fi
  1.3080 -+      # Export the build objects.
  1.3081 -+      for ling in $ALL_LINGUAS; do \
  1.3082 -+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
  1.3083 -+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
  1.3084 -+      done
  1.3085 -+
  1.3086 -+
  1.3087 -+
  1.3088 -+      CLOCALE_H=config/locale/uclibc/c_locale.h
  1.3089 -+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
  1.3090 -+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
  1.3091 -+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  1.3092 -+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  1.3093 -+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  1.3094 -+      CMESSAGES_H=config/locale/uclibc/messages_members.h
  1.3095 -+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  1.3096 -+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
  1.3097 -+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  1.3098 -+      CTIME_H=config/locale/uclibc/time_members.h
  1.3099 -+      CTIME_CC=config/locale/uclibc/time_members.cc
  1.3100 -+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  1.3101 -+      ;;
  1.3102 -   esac
  1.3103 - 
  1.3104 -   # This is where the testsuite looks for locale catalogs, using the
  1.3105 -diff -urN gcc-3.4.2-dist/libstdc++-v3/configure.host gcc-3.4.2/libstdc++-v3/configure.host
  1.3106 ---- gcc-3.4.2-dist/libstdc++-v3/configure.host	2004-08-27 14:52:30.000000000 -0500
  1.3107 -+++ gcc-3.4.2/libstdc++-v3/configure.host	2004-09-10 10:47:40.000000000 -0500
  1.3108 -@@ -217,6 +217,12 @@
  1.3109 -     ;;
  1.3110 - esac
  1.3111 - 
  1.3112 -+# Override for uClibc since linux-uclibc gets mishandled above.
  1.3113 -+case "${host_os}" in
  1.3114 -+  *-uclibc*)
  1.3115 -+    os_include_dir="os/uclibc"
  1.3116 -+    ;;
  1.3117 -+esac
  1.3118 - 
  1.3119 - # Set any OS-dependent and CPU-dependent bits.
  1.3120 - # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
  1.3121 -diff -urN gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4 gcc-3.4.2/libstdc++-v3/crossconfig.m4
  1.3122 ---- gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4	2004-07-06 20:23:49.000000000 -0500
  1.3123 -+++ gcc-3.4.2/libstdc++-v3/crossconfig.m4	2004-09-10 10:47:40.000000000 -0500
  1.3124 -@@ -138,6 +138,99 @@
  1.3125 - 	;;
  1.3126 -     esac
  1.3127 -     ;;
  1.3128 -+  *-uclibc*)
  1.3129 -+# Temporary hack until we implement the float versions of the libm funcs
  1.3130 -+    AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
  1.3131 -+      machine/endian.h machine/param.h sys/machine.h sys/types.h \
  1.3132 -+      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
  1.3133 -+    SECTION_FLAGS='-ffunction-sections -fdata-sections'
  1.3134 -+    AC_SUBST(SECTION_FLAGS)
  1.3135 -+    GLIBCXX_CHECK_LINKER_FEATURES
  1.3136 -+    GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
  1.3137 -+    GLIBCXX_CHECK_WCHAR_T_SUPPORT
  1.3138 -+
  1.3139 -+    # For LFS.
  1.3140 -+    AC_DEFINE(HAVE_INT64_T)
  1.3141 -+    case "$target" in
  1.3142 -+      *-uclinux*)
  1.3143 -+        # Don't enable LFS with uClinux
  1.3144 -+        ;;
  1.3145 -+      *)
  1.3146 -+        AC_DEFINE(_GLIBCXX_USE_LFS)
  1.3147 -+    esac
  1.3148 -+
  1.3149 -+    # For showmanyc_helper().
  1.3150 -+    AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
  1.3151 -+    GLIBCXX_CHECK_POLL
  1.3152 -+    GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
  1.3153 -+
  1.3154 -+    # For xsputn_2().
  1.3155 -+    AC_CHECK_HEADERS(sys/uio.h)
  1.3156 -+    GLIBCXX_CHECK_WRITEV
  1.3157 -+
  1.3158 -+#     AC_DEFINE(HAVE_ACOSF)
  1.3159 -+#     AC_DEFINE(HAVE_ASINF)
  1.3160 -+#     AC_DEFINE(HAVE_ATANF)
  1.3161 -+#     AC_DEFINE(HAVE_ATAN2F)
  1.3162 -+    AC_DEFINE(HAVE_CEILF)
  1.3163 -+    AC_DEFINE(HAVE_COPYSIGN)
  1.3164 -+#     AC_DEFINE(HAVE_COPYSIGNF)
  1.3165 -+#     AC_DEFINE(HAVE_COSF)
  1.3166 -+#     AC_DEFINE(HAVE_COSHF)
  1.3167 -+#     AC_DEFINE(HAVE_EXPF)
  1.3168 -+#     AC_DEFINE(HAVE_FABSF)
  1.3169 -+    AC_DEFINE(HAVE_FINITE)
  1.3170 -+    AC_DEFINE(HAVE_FINITEF)
  1.3171 -+    AC_DEFINE(HAVE_FLOORF)
  1.3172 -+#     AC_DEFINE(HAVE_FMODF)
  1.3173 -+#     AC_DEFINE(HAVE_FREXPF)
  1.3174 -+    AC_DEFINE(HAVE_HYPOT)
  1.3175 -+#     AC_DEFINE(HAVE_HYPOTF)
  1.3176 -+    AC_DEFINE(HAVE_ISINF)
  1.3177 -+    AC_DEFINE(HAVE_ISINFF)
  1.3178 -+    AC_DEFINE(HAVE_ISNAN)
  1.3179 -+    AC_DEFINE(HAVE_ISNANF)
  1.3180 -+#     AC_DEFINE(HAVE_LOGF)
  1.3181 -+#     AC_DEFINE(HAVE_LOG10F)
  1.3182 -+#     AC_DEFINE(HAVE_MODFF)
  1.3183 -+#     AC_DEFINE(HAVE_SINF)
  1.3184 -+#     AC_DEFINE(HAVE_SINHF)
  1.3185 -+#     AC_DEFINE(HAVE_SINCOS)
  1.3186 -+#     AC_DEFINE(HAVE_SINCOSF)
  1.3187 -+    AC_DEFINE(HAVE_SQRTF)
  1.3188 -+#     AC_DEFINE(HAVE_TANF)
  1.3189 -+#     AC_DEFINE(HAVE_TANHF)
  1.3190 -+    if test x"long_double_math_on_this_cpu" = x"yes"; then
  1.3191 -+      AC_MSG_ERROR([long_double_math_on_this_cpu is yes!])
  1.3192 -+#       AC_DEFINE(HAVE_ACOSL)
  1.3193 -+#       AC_DEFINE(HAVE_ASINL)
  1.3194 -+#       AC_DEFINE(HAVE_ATANL)
  1.3195 -+#       AC_DEFINE(HAVE_ATAN2L)
  1.3196 -+#       AC_DEFINE(HAVE_CEILL)
  1.3197 -+#       AC_DEFINE(HAVE_COPYSIGNL)
  1.3198 -+#       AC_DEFINE(HAVE_COSL)
  1.3199 -+#       AC_DEFINE(HAVE_COSHL)
  1.3200 -+#       AC_DEFINE(HAVE_EXPL)
  1.3201 -+#       AC_DEFINE(HAVE_FABSL)
  1.3202 -+#       AC_DEFINE(HAVE_FINITEL)
  1.3203 -+#       AC_DEFINE(HAVE_FLOORL)
  1.3204 -+#       AC_DEFINE(HAVE_FMODL)
  1.3205 -+#       AC_DEFINE(HAVE_FREXPL)
  1.3206 -+#       AC_DEFINE(HAVE_HYPOTL)
  1.3207 -+#       AC_DEFINE(HAVE_ISINFL)
  1.3208 -+#       AC_DEFINE(HAVE_ISNANL)
  1.3209 -+#       AC_DEFINE(HAVE_LOGL)
  1.3210 -+#       AC_DEFINE(HAVE_LOG10L)
  1.3211 -+#       AC_DEFINE(HAVE_MODFL)
  1.3212 -+#       AC_DEFINE(HAVE_POWL)
  1.3213 -+#       AC_DEFINE(HAVE_SINL)
  1.3214 -+#       AC_DEFINE(HAVE_SINHL)
  1.3215 -+#       AC_DEFINE(HAVE_SINCOSL)
  1.3216 -+#       AC_DEFINE(HAVE_SQRTL)
  1.3217 -+#       AC_DEFINE(HAVE_TANL)
  1.3218 -+#       AC_DEFINE(HAVE_TANHL)
  1.3219 -+    fi
  1.3220 -+    ;;
  1.3221 -   *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
  1.3222 -     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
  1.3223 -       machine/endian.h machine/param.h sys/machine.h sys/types.h \
  1.3224 -@@ -152,7 +245,7 @@
  1.3225 -     AC_DEFINE(HAVE_INT64_T)
  1.3226 -     case "$target" in
  1.3227 -       *-uclinux*)
  1.3228 --        # Don't enable LFS with uClibc
  1.3229 -+        # Don't enable LFS with uClinux
  1.3230 -         ;;
  1.3231 -       *)
  1.3232 -         AC_DEFINE(_GLIBCXX_USE_LFS)
  1.3233 -diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h
  1.3234 ---- gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h	2003-12-08 21:51:45.000000000 -0600
  1.3235 -+++ gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h	2004-09-10 10:47:40.000000000 -0500
  1.3236 -@@ -101,7 +101,9 @@
  1.3237 - using std::wmemcpy;
  1.3238 - using std::wmemmove;
  1.3239 - using std::wmemset;
  1.3240 -+#if _GLIBCXX_HAVE_WCSFTIME
  1.3241 - using std::wcsftime;
  1.3242 -+#endif
  1.3243 - 
  1.3244 - #if _GLIBCXX_USE_C99
  1.3245 - using std::wcstold;
  1.3246 -diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h
  1.3247 ---- gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h	2004-07-20 03:52:12.000000000 -0500
  1.3248 -+++ gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h	2004-09-10 10:47:40.000000000 -0500
  1.3249 -@@ -179,7 +179,9 @@
  1.3250 -   using ::wcscoll;
  1.3251 -   using ::wcscpy;
  1.3252 -   using ::wcscspn;
  1.3253 -+#if _GLIBCXX_HAVE_WCSFTIME
  1.3254 -   using ::wcsftime;
  1.3255 -+#endif
  1.3256 -   using ::wcslen;
  1.3257 -   using ::wcsncat;
  1.3258 -   using ::wcsncmp;