1 diff -urN gcc-3.4.2-dist/libstdc++-v3/acinclude.m4 gcc-3.4.2/libstdc++-v3/acinclude.m4
2 --- gcc-3.4.2-dist/libstdc++-v3/acinclude.m4 2004-07-15 12:42:45.000000000 -0500
3 +++ gcc-3.4.2/libstdc++-v3/acinclude.m4 2004-09-10 10:47:40.000000000 -0500
5 AC_MSG_CHECKING([for C locale to use])
6 GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
7 [use MODEL for target locale package],
8 - [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
9 + [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
11 # If they didn't use this option switch, or if they specified --enable
12 # with no specific model, we'll have to look for one. If they
14 # Default to "generic".
15 if test $enable_clocale_flag = auto; then
18 + enable_clocale_flag=uclibc
20 xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
21 AC_EGREP_CPP([_GLIBCXX_ok], [
23 @@ -1138,6 +1141,41 @@
24 CTIME_CC=config/locale/generic/time_members.cc
25 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
28 + AC_MSG_RESULT(uclibc)
30 + # Declare intention to use gettext, and add support for specific
32 + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
35 + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
36 + AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
37 + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
40 + # Export the build objects.
41 + for ling in $ALL_LINGUAS; do \
42 + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
43 + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
45 + AC_SUBST(glibcxx_MOFILES)
46 + AC_SUBST(glibcxx_POFILES)
48 + CLOCALE_H=config/locale/uclibc/c_locale.h
49 + CLOCALE_CC=config/locale/uclibc/c_locale.cc
50 + CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
51 + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
52 + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
53 + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
54 + CMESSAGES_H=config/locale/uclibc/messages_members.h
55 + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
56 + CMONEY_CC=config/locale/uclibc/monetary_members.cc
57 + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
58 + CTIME_H=config/locale/uclibc/time_members.h
59 + CTIME_CC=config/locale/uclibc/time_members.cc
60 + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
64 # This is where the testsuite looks for locale catalogs, using the
65 diff -urN gcc-3.4.2-dist/libstdc++-v3/aclocal.m4 gcc-3.4.2/libstdc++-v3/aclocal.m4
66 --- gcc-3.4.2-dist/libstdc++-v3/aclocal.m4 2004-08-13 15:44:03.000000000 -0500
67 +++ gcc-3.4.2/libstdc++-v3/aclocal.m4 2004-09-10 10:47:40.000000000 -0500
69 # Default to "generic".
70 if test $enable_clocale_flag = auto; then
73 + enable_clocale_flag=uclibc
75 xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
76 AC_EGREP_CPP([_GLIBCXX_ok], [
78 @@ -1151,6 +1154,41 @@
79 CTIME_CC=config/locale/generic/time_members.cc
80 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
83 + AC_MSG_RESULT(uclibc)
85 + # Declare intention to use gettext, and add support for specific
87 + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
90 + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
91 + AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
92 + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
95 + # Export the build objects.
96 + for ling in $ALL_LINGUAS; do \
97 + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
98 + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
100 + AC_SUBST(glibcxx_MOFILES)
101 + AC_SUBST(glibcxx_POFILES)
103 + CLOCALE_H=config/locale/uclibc/c_locale.h
104 + CLOCALE_CC=config/locale/uclibc/c_locale.cc
105 + CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
106 + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
107 + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
108 + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
109 + CMESSAGES_H=config/locale/uclibc/messages_members.h
110 + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
111 + CMONEY_CC=config/locale/uclibc/monetary_members.cc
112 + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
113 + CTIME_H=config/locale/uclibc/time_members.h
114 + CTIME_CC=config/locale/uclibc/time_members.cc
115 + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
119 # This is where the testsuite looks for locale catalogs, using the
120 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
121 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 18:00:00.000000000 -0600
122 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2004-09-10 10:47:40.000000000 -0500
124 +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
126 +// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
128 +// This file is part of the GNU ISO C++ Library. This library is free
129 +// software; you can redistribute it and/or modify it under the
130 +// terms of the GNU General Public License as published by the
131 +// Free Software Foundation; either version 2, or (at your option)
132 +// any later version.
134 +// This library is distributed in the hope that it will be useful,
135 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
136 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
137 +// GNU General Public License for more details.
139 +// You should have received a copy of the GNU General Public License along
140 +// with this library; see the file COPYING. If not, write to the Free
141 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
144 +// As a special exception, you may use this file as part of a free software
145 +// library without restriction. Specifically, if other files instantiate
146 +// templates or use macros or inline functions from this file, or you compile
147 +// this file and link it with other files to produce an executable, this
148 +// file does not by itself cause the resulting executable to be covered by
149 +// the GNU General Public License. This exception does not however
150 +// invalidate any other reasons why the executable file might be covered by
151 +// the GNU General Public License.
153 +// Written by Jakub Jelinek <jakub@redhat.com>
157 +#ifdef __UCLIBC_MJN3_ONLY__
158 +#warning clean this up
161 +#ifdef __UCLIBC_HAS_XLOCALE__
163 +extern "C" __typeof(iswctype_l) __iswctype_l;
164 +extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
165 +extern "C" __typeof(strcoll_l) __strcoll_l;
166 +extern "C" __typeof(strftime_l) __strftime_l;
167 +extern "C" __typeof(strtod_l) __strtod_l;
168 +extern "C" __typeof(strtof_l) __strtof_l;
169 +extern "C" __typeof(strtold_l) __strtold_l;
170 +extern "C" __typeof(strxfrm_l) __strxfrm_l;
171 +extern "C" __typeof(towlower_l) __towlower_l;
172 +extern "C" __typeof(towupper_l) __towupper_l;
173 +extern "C" __typeof(wcscoll_l) __wcscoll_l;
174 +extern "C" __typeof(wcsftime_l) __wcsftime_l;
175 +extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
176 +extern "C" __typeof(wctype_l) __wctype_l;
177 +extern "C" __typeof(newlocale) __newlocale;
178 +extern "C" __typeof(freelocale) __freelocale;
179 +extern "C" __typeof(duplocale) __duplocale;
180 +extern "C" __typeof(uselocale) __uselocale;
182 +#endif // GLIBC 2.3 and later
183 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
184 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 18:00:00.000000000 -0600
185 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2004-09-10 10:47:40.000000000 -0500
187 +// Wrapper for underlying C-language localization -*- C++ -*-
189 +// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
191 +// This file is part of the GNU ISO C++ Library. This library is free
192 +// software; you can redistribute it and/or modify it under the
193 +// terms of the GNU General Public License as published by the
194 +// Free Software Foundation; either version 2, or (at your option)
195 +// any later version.
197 +// This library is distributed in the hope that it will be useful,
198 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
199 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
200 +// GNU General Public License for more details.
202 +// You should have received a copy of the GNU General Public License along
203 +// with this library; see the file COPYING. If not, write to the Free
204 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
207 +// As a special exception, you may use this file as part of a free software
208 +// library without restriction. Specifically, if other files instantiate
209 +// templates or use macros or inline functions from this file, or you compile
210 +// this file and link it with other files to produce an executable, this
211 +// file does not by itself cause the resulting executable to be covered by
212 +// the GNU General Public License. This exception does not however
213 +// invalidate any other reasons why the executable file might be covered by
214 +// the GNU General Public License.
217 +// ISO C++ 14882: 22.8 Standard locale categories.
220 +// Written by Benjamin Kosnik <bkoz@redhat.com>
222 +#include <cerrno> // For errno
224 +#include <stdexcept>
225 +#include <langinfo.h>
226 +#include <bits/c++locale_internal.h>
228 +#ifndef __UCLIBC_HAS_XLOCALE__
229 +#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
230 +#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
231 +#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
232 +#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
233 +#define __strtof_l(S, E, L) strtof((S), (E))
234 +#define __strtod_l(S, E, L) strtod((S), (E))
235 +#define __strtold_l(S, E, L) strtold((S), (E))
236 +#warning should dummy __newlocale check for C|POSIX ?
237 +#define __newlocale(a, b, c) NULL
238 +#define __freelocale(a) ((void)0)
239 +#define __duplocale(a) __c_locale()
246 + __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
247 + const __c_locale& __cloc)
249 + if (!(__err & ios_base::failbit))
253 + float __f = __strtof_l(__s, &__sanity, __cloc);
254 + if (__sanity != __s && errno != ERANGE)
257 + __err |= ios_base::failbit;
263 + __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
264 + const __c_locale& __cloc)
266 + if (!(__err & ios_base::failbit))
270 + double __d = __strtod_l(__s, &__sanity, __cloc);
271 + if (__sanity != __s && errno != ERANGE)
274 + __err |= ios_base::failbit;
280 + __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
281 + const __c_locale& __cloc)
283 + if (!(__err & ios_base::failbit))
287 + long double __ld = __strtold_l(__s, &__sanity, __cloc);
288 + if (__sanity != __s && errno != ERANGE)
291 + __err |= ios_base::failbit;
296 + locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
299 + __cloc = __newlocale(1 << LC_ALL, __s, __old);
300 +#ifdef __UCLIBC_HAS_XLOCALE__
303 + // This named locale is not supported by the underlying OS.
304 + __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
305 + "name not valid"));
311 + locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
313 + if (_S_get_c_locale() != __cloc)
314 + __freelocale(__cloc);
318 + locale::facet::_S_clone_c_locale(__c_locale& __cloc)
319 + { return __duplocale(__cloc); }
324 + const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
332 +#if _GLIBCXX_NUM_CATEGORIES != 0
338 + "LC_IDENTIFICATION"
345 + const char* const* const locale::_S_categories = __gnu_cxx::category_names;
347 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
348 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 18:00:00.000000000 -0600
349 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2004-09-10 10:48:08.000000000 -0500
351 +// Wrapper for underlying C-language localization -*- C++ -*-
353 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
355 +// This file is part of the GNU ISO C++ Library. This library is free
356 +// software; you can redistribute it and/or modify it under the
357 +// terms of the GNU General Public License as published by the
358 +// Free Software Foundation; either version 2, or (at your option)
359 +// any later version.
361 +// This library is distributed in the hope that it will be useful,
362 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
363 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
364 +// GNU General Public License for more details.
366 +// You should have received a copy of the GNU General Public License along
367 +// with this library; see the file COPYING. If not, write to the Free
368 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
371 +// As a special exception, you may use this file as part of a free software
372 +// library without restriction. Specifically, if other files instantiate
373 +// templates or use macros or inline functions from this file, or you compile
374 +// this file and link it with other files to produce an executable, this
375 +// file does not by itself cause the resulting executable to be covered by
376 +// the GNU General Public License. This exception does not however
377 +// invalidate any other reasons why the executable file might be covered by
378 +// the GNU General Public License.
381 +// ISO C++ 14882: 22.8 Standard locale categories.
384 +// Written by Benjamin Kosnik <bkoz@redhat.com>
387 +#define _C_LOCALE_H 1
389 +#pragma GCC system_header
391 +#include <cstring> // get std::strlen
392 +#include <cstdio> // get std::snprintf or std::sprintf
394 +#include <langinfo.h> // For codecvt
395 +#ifdef __UCLIBC_MJN3_ONLY__
398 +#ifdef __UCLIBC_HAS_LOCALE__
399 +#include <iconv.h> // For codecvt using iconv, iconv_t
401 +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
402 +#include <libintl.h> // For messages
405 +#ifdef __UCLIBC_MJN3_ONLY__
406 +#warning what is _GLIBCXX_C_LOCALE_GNU for
408 +#define _GLIBCXX_C_LOCALE_GNU 1
410 +#ifdef __UCLIBC_MJN3_ONLY__
411 +#warning fix categories
413 +// #define _GLIBCXX_NUM_CATEGORIES 6
414 +#define _GLIBCXX_NUM_CATEGORIES 0
416 +#ifdef __UCLIBC_HAS_XLOCALE__
419 + extern "C" __typeof(uselocale) __uselocale;
425 +#ifdef __UCLIBC_HAS_XLOCALE__
426 + typedef __locale_t __c_locale;
428 + typedef int* __c_locale;
431 + // Convert numeric value of type _Tv to string and return length of
432 + // string. If snprintf is available use it, otherwise fall back to
433 + // the unsafe sprintf which, in general, can be dangerous and should
435 + template<typename _Tv>
437 + __convert_from_v(char* __out, const int __size, const char* __fmt,
438 +#ifdef __UCLIBC_HAS_XLOCALE__
439 + _Tv __v, const __c_locale& __cloc, int __prec)
441 + __c_locale __old = __gnu_cxx::__uselocale(__cloc);
443 + _Tv __v, const __c_locale&, int __prec)
445 +# ifdef __UCLIBC_HAS_LOCALE__
446 + char* __old = std::setlocale(LC_ALL, NULL);
447 + char* __sav = new char[std::strlen(__old) + 1];
448 + std::strcpy(__sav, __old);
449 + std::setlocale(LC_ALL, "C");
453 + const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
455 +#ifdef __UCLIBC_HAS_XLOCALE__
456 + __gnu_cxx::__uselocale(__old);
457 +#elif defined __UCLIBC_HAS_LOCALE__
458 + std::setlocale(LC_ALL, __sav);
466 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
467 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 18:00:00.000000000 -0600
468 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2004-09-10 10:47:40.000000000 -0500
470 +// std::codecvt implementation details, GNU version -*- C++ -*-
472 +// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
474 +// This file is part of the GNU ISO C++ Library. This library is free
475 +// software; you can redistribute it and/or modify it under the
476 +// terms of the GNU General Public License as published by the
477 +// Free Software Foundation; either version 2, or (at your option)
478 +// any later version.
480 +// This library is distributed in the hope that it will be useful,
481 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
482 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
483 +// GNU General Public License for more details.
485 +// You should have received a copy of the GNU General Public License along
486 +// with this library; see the file COPYING. If not, write to the Free
487 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
490 +// As a special exception, you may use this file as part of a free software
491 +// library without restriction. Specifically, if other files instantiate
492 +// templates or use macros or inline functions from this file, or you compile
493 +// this file and link it with other files to produce an executable, this
494 +// file does not by itself cause the resulting executable to be covered by
495 +// the GNU General Public License. This exception does not however
496 +// invalidate any other reasons why the executable file might be covered by
497 +// the GNU General Public License.
500 +// ISO C++ 14882: 22.2.1.5 - Template class codecvt
503 +// Written by Benjamin Kosnik <bkoz@redhat.com>
506 +#include <bits/c++locale_internal.h>
510 + // Specializations.
511 +#ifdef _GLIBCXX_USE_WCHAR_T
512 + codecvt_base::result
513 + codecvt<wchar_t, char, mbstate_t>::
514 + do_out(state_type& __state, const intern_type* __from,
515 + const intern_type* __from_end, const intern_type*& __from_next,
516 + extern_type* __to, extern_type* __to_end,
517 + extern_type*& __to_next) const
520 + state_type __tmp_state(__state);
522 +#ifdef __UCLIBC_HAS_XLOCALE__
523 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
526 + // wcsnrtombs is *very* fast but stops if encounters NUL characters:
527 + // in case we fall back to wcrtomb and then continue, in a loop.
528 + // NB: wcsnrtombs is a GNU extension
529 + for (__from_next = __from, __to_next = __to;
530 + __from_next < __from_end && __to_next < __to_end
533 + const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
534 + __from_end - __from_next);
535 + if (!__from_chunk_end)
536 + __from_chunk_end = __from_end;
538 + __from = __from_next;
539 + const size_t __conv = wcsnrtombs(__to_next, &__from_next,
540 + __from_chunk_end - __from_next,
541 + __to_end - __to_next, &__state);
542 + if (__conv == static_cast<size_t>(-1))
544 + // In case of error, in order to stop at the exact place we
545 + // have to start again from the beginning with a series of
547 + for (; __from < __from_next; ++__from)
548 + __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
549 + __state = __tmp_state;
552 + else if (__from_next && __from_next < __from_chunk_end)
554 + __to_next += __conv;
559 + __from_next = __from_chunk_end;
560 + __to_next += __conv;
563 + if (__from_next < __from_end && __ret == ok)
565 + extern_type __buf[MB_LEN_MAX];
566 + __tmp_state = __state;
567 + const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
568 + if (__conv > static_cast<size_t>(__to_end - __to_next))
572 + memcpy(__to_next, __buf, __conv);
573 + __state = __tmp_state;
574 + __to_next += __conv;
580 +#ifdef __UCLIBC_HAS_XLOCALE__
581 + __uselocale(__old);
587 + codecvt_base::result
588 + codecvt<wchar_t, char, mbstate_t>::
589 + do_in(state_type& __state, const extern_type* __from,
590 + const extern_type* __from_end, const extern_type*& __from_next,
591 + intern_type* __to, intern_type* __to_end,
592 + intern_type*& __to_next) const
595 + state_type __tmp_state(__state);
597 +#ifdef __UCLIBC_HAS_XLOCALE__
598 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
601 + // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
602 + // in case we store a L'\0' and then continue, in a loop.
603 + // NB: mbsnrtowcs is a GNU extension
604 + for (__from_next = __from, __to_next = __to;
605 + __from_next < __from_end && __to_next < __to_end
608 + const extern_type* __from_chunk_end;
609 + __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
612 + if (!__from_chunk_end)
613 + __from_chunk_end = __from_end;
615 + __from = __from_next;
616 + size_t __conv = mbsnrtowcs(__to_next, &__from_next,
617 + __from_chunk_end - __from_next,
618 + __to_end - __to_next, &__state);
619 + if (__conv == static_cast<size_t>(-1))
621 + // In case of error, in order to stop at the exact place we
622 + // have to start again from the beginning with a series of
624 + for (;; ++__to_next, __from += __conv)
626 + __conv = mbrtowc(__to_next, __from, __from_end - __from,
628 + if (__conv == static_cast<size_t>(-1)
629 + || __conv == static_cast<size_t>(-2))
632 + __from_next = __from;
633 + __state = __tmp_state;
636 + else if (__from_next && __from_next < __from_chunk_end)
638 + // It is unclear what to return in this case (see DR 382).
639 + __to_next += __conv;
644 + __from_next = __from_chunk_end;
645 + __to_next += __conv;
648 + if (__from_next < __from_end && __ret == ok)
650 + if (__to_next < __to_end)
652 + // XXX Probably wrong for stateful encodings
653 + __tmp_state = __state;
655 + *__to_next++ = L'\0';
662 +#ifdef __UCLIBC_HAS_XLOCALE__
663 + __uselocale(__old);
670 + codecvt<wchar_t, char, mbstate_t>::
671 + do_encoding() const throw()
673 + // XXX This implementation assumes that the encoding is
674 + // stateless and is either single-byte or variable-width.
676 +#ifdef __UCLIBC_HAS_XLOCALE__
677 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
679 + if (MB_CUR_MAX == 1)
681 +#ifdef __UCLIBC_HAS_XLOCALE__
682 + __uselocale(__old);
688 + codecvt<wchar_t, char, mbstate_t>::
689 + do_max_length() const throw()
691 +#ifdef __UCLIBC_HAS_XLOCALE__
692 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
694 + // XXX Probably wrong for stateful encodings.
695 + int __ret = MB_CUR_MAX;
696 +#ifdef __UCLIBC_HAS_XLOCALE__
697 + __uselocale(__old);
703 + codecvt<wchar_t, char, mbstate_t>::
704 + do_length(state_type& __state, const extern_type* __from,
705 + const extern_type* __end, size_t __max) const
708 + state_type __tmp_state(__state);
710 +#ifdef __UCLIBC_HAS_XLOCALE__
711 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
714 + // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
715 + // in case we advance past it and then continue, in a loop.
716 + // NB: mbsnrtowcs is a GNU extension
718 + // A dummy internal buffer is needed in order for mbsnrtocws to consider
719 + // its fourth parameter (it wouldn't with NULL as first parameter).
720 + wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
722 + while (__from < __end && __max)
724 + const extern_type* __from_chunk_end;
725 + __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
728 + if (!__from_chunk_end)
729 + __from_chunk_end = __end;
731 + const extern_type* __tmp_from = __from;
732 + size_t __conv = mbsnrtowcs(__to, &__from,
733 + __from_chunk_end - __from,
735 + if (__conv == static_cast<size_t>(-1))
737 + // In case of error, in order to stop at the exact place we
738 + // have to start again from the beginning with a series of
740 + for (__from = __tmp_from;; __from += __conv)
742 + __conv = mbrtowc(NULL, __from, __end - __from,
744 + if (__conv == static_cast<size_t>(-1)
745 + || __conv == static_cast<size_t>(-2))
748 + __state = __tmp_state;
749 + __ret += __from - __tmp_from;
753 + __from = __from_chunk_end;
755 + __ret += __from - __tmp_from;
758 + if (__from < __end && __max)
760 + // XXX Probably wrong for stateful encodings
761 + __tmp_state = __state;
768 +#ifdef __UCLIBC_HAS_XLOCALE__
769 + __uselocale(__old);
776 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
777 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 18:00:00.000000000 -0600
778 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc 2004-09-10 10:47:40.000000000 -0500
780 +// std::collate implementation details, GNU version -*- C++ -*-
782 +// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
784 +// This file is part of the GNU ISO C++ Library. This library is free
785 +// software; you can redistribute it and/or modify it under the
786 +// terms of the GNU General Public License as published by the
787 +// Free Software Foundation; either version 2, or (at your option)
788 +// any later version.
790 +// This library is distributed in the hope that it will be useful,
791 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
792 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
793 +// GNU General Public License for more details.
795 +// You should have received a copy of the GNU General Public License along
796 +// with this library; see the file COPYING. If not, write to the Free
797 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
800 +// As a special exception, you may use this file as part of a free software
801 +// library without restriction. Specifically, if other files instantiate
802 +// templates or use macros or inline functions from this file, or you compile
803 +// this file and link it with other files to produce an executable, this
804 +// file does not by itself cause the resulting executable to be covered by
805 +// the GNU General Public License. This exception does not however
806 +// invalidate any other reasons why the executable file might be covered by
807 +// the GNU General Public License.
810 +// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
813 +// Written by Benjamin Kosnik <bkoz@redhat.com>
816 +#include <bits/c++locale_internal.h>
818 +#ifndef __UCLIBC_HAS_XLOCALE__
819 +#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
820 +#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
821 +#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
822 +#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
827 + // These are basically extensions to char_traits, and perhaps should
828 + // be put there instead of here.
831 + collate<char>::_M_compare(const char* __one, const char* __two) const
833 + int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
834 + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
839 + collate<char>::_M_transform(char* __to, const char* __from,
841 + { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
843 +#ifdef _GLIBCXX_USE_WCHAR_T
846 + collate<wchar_t>::_M_compare(const wchar_t* __one,
847 + const wchar_t* __two) const
849 + int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
850 + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
855 + collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
857 + { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
860 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
861 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 18:00:00.000000000 -0600
862 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2004-09-10 10:47:40.000000000 -0500
864 +// std::ctype implementation details, GNU version -*- C++ -*-
866 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
868 +// This file is part of the GNU ISO C++ Library. This library is free
869 +// software; you can redistribute it and/or modify it under the
870 +// terms of the GNU General Public License as published by the
871 +// Free Software Foundation; either version 2, or (at your option)
872 +// any later version.
874 +// This library is distributed in the hope that it will be useful,
875 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
876 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
877 +// GNU General Public License for more details.
879 +// You should have received a copy of the GNU General Public License along
880 +// with this library; see the file COPYING. If not, write to the Free
881 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
884 +// As a special exception, you may use this file as part of a free software
885 +// library without restriction. Specifically, if other files instantiate
886 +// templates or use macros or inline functions from this file, or you compile
887 +// this file and link it with other files to produce an executable, this
888 +// file does not by itself cause the resulting executable to be covered by
889 +// the GNU General Public License. This exception does not however
890 +// invalidate any other reasons why the executable file might be covered by
891 +// the GNU General Public License.
894 +// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
897 +// Written by Benjamin Kosnik <bkoz@redhat.com>
902 +#include <bits/c++locale_internal.h>
904 +#ifndef __UCLIBC_HAS_XLOCALE__
905 +#define __wctype_l(S, L) wctype((S))
906 +#define __towupper_l(C, L) towupper((C))
907 +#define __towlower_l(C, L) towlower((C))
908 +#define __iswctype_l(C, M, L) iswctype((C), (M))
913 + // NB: The other ctype<char> specializations are in src/locale.cc and
914 + // various /config/os/* files.
916 + ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
917 + : ctype<char>(0, false, __refs)
919 + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
921 + this->_S_destroy_c_locale(this->_M_c_locale_ctype);
922 + this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
923 +#ifdef __UCLIBC_HAS_XLOCALE__
924 + this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
925 + this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
926 + this->_M_table = this->_M_c_locale_ctype->__ctype_b;
931 +#ifdef _GLIBCXX_USE_WCHAR_T
932 + ctype<wchar_t>::__wmask_type
933 + ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
935 + __wmask_type __ret;
939 + __ret = __wctype_l("space", _M_c_locale_ctype);
942 + __ret = __wctype_l("print", _M_c_locale_ctype);
945 + __ret = __wctype_l("cntrl", _M_c_locale_ctype);
948 + __ret = __wctype_l("upper", _M_c_locale_ctype);
951 + __ret = __wctype_l("lower", _M_c_locale_ctype);
954 + __ret = __wctype_l("alpha", _M_c_locale_ctype);
957 + __ret = __wctype_l("digit", _M_c_locale_ctype);
960 + __ret = __wctype_l("punct", _M_c_locale_ctype);
963 + __ret = __wctype_l("xdigit", _M_c_locale_ctype);
966 + __ret = __wctype_l("alnum", _M_c_locale_ctype);
969 + __ret = __wctype_l("graph", _M_c_locale_ctype);
978 + ctype<wchar_t>::do_toupper(wchar_t __c) const
979 + { return __towupper_l(__c, _M_c_locale_ctype); }
982 + ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
984 + while (__lo < __hi)
986 + *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
993 + ctype<wchar_t>::do_tolower(wchar_t __c) const
994 + { return __towlower_l(__c, _M_c_locale_ctype); }
997 + ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
999 + while (__lo < __hi)
1001 + *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
1009 + do_is(mask __m, wchar_t __c) const
1011 + // Highest bitmask in ctype_base == 10, but extra in "C"
1012 + // library for blank.
1013 + bool __ret = false;
1014 + const size_t __bitmasksize = 11;
1015 + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
1016 + if (__m & _M_bit[__bitcur]
1017 + && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
1027 + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
1029 + for (; __lo < __hi; ++__vec, ++__lo)
1031 + // Highest bitmask in ctype_base == 10, but extra in "C"
1032 + // library for blank.
1033 + const size_t __bitmasksize = 11;
1035 + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
1036 + if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
1037 + __m |= _M_bit[__bitcur];
1045 + do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
1047 + while (__lo < __hi && !this->do_is(__m, *__lo))
1054 + do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
1056 + while (__lo < __hi && this->do_is(__m, *__lo) != 0)
1063 + do_widen(char __c) const
1064 + { return _M_widen[static_cast<unsigned char>(__c)]; }
1068 + do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
1070 + while (__lo < __hi)
1072 + *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
1081 + do_narrow(wchar_t __wc, char __dfault) const
1083 + if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
1084 + return _M_narrow[__wc];
1085 +#ifdef __UCLIBC_HAS_XLOCALE__
1086 + __c_locale __old = __uselocale(_M_c_locale_ctype);
1088 + const int __c = wctob(__wc);
1089 +#ifdef __UCLIBC_HAS_XLOCALE__
1090 + __uselocale(__old);
1092 + return (__c == EOF ? __dfault : static_cast<char>(__c));
1097 + do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
1098 + char* __dest) const
1100 +#ifdef __UCLIBC_HAS_XLOCALE__
1101 + __c_locale __old = __uselocale(_M_c_locale_ctype);
1104 + while (__lo < __hi)
1106 + if (*__lo >= 0 && *__lo < 128)
1107 + *__dest = _M_narrow[*__lo];
1110 + const int __c = wctob(*__lo);
1111 + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
1117 + while (__lo < __hi)
1119 + const int __c = wctob(*__lo);
1120 + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
1124 +#ifdef __UCLIBC_HAS_XLOCALE__
1125 + __uselocale(__old);
1131 + ctype<wchar_t>::_M_initialize_ctype()
1133 +#ifdef __UCLIBC_HAS_XLOCALE__
1134 + __c_locale __old = __uselocale(_M_c_locale_ctype);
1137 + for (__i = 0; __i < 128; ++__i)
1139 + const int __c = wctob(__i);
1143 + _M_narrow[__i] = static_cast<char>(__c);
1146 + _M_narrow_ok = true;
1148 + _M_narrow_ok = false;
1149 + for (size_t __j = 0;
1150 + __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
1151 + _M_widen[__j] = btowc(__j);
1153 + for (size_t __k = 0; __k <= 11; ++__k)
1155 + _M_bit[__k] = static_cast<mask>(_ISbit(__k));
1156 + _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
1158 +#ifdef __UCLIBC_HAS_XLOCALE__
1159 + __uselocale(__old);
1162 +#endif // _GLIBCXX_USE_WCHAR_T
1164 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
1165 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 18:00:00.000000000 -0600
1166 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc 2004-09-10 10:47:40.000000000 -0500
1168 +// std::messages implementation details, GNU version -*- C++ -*-
1170 +// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
1172 +// This file is part of the GNU ISO C++ Library. This library is free
1173 +// software; you can redistribute it and/or modify it under the
1174 +// terms of the GNU General Public License as published by the
1175 +// Free Software Foundation; either version 2, or (at your option)
1176 +// any later version.
1178 +// This library is distributed in the hope that it will be useful,
1179 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1180 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1181 +// GNU General Public License for more details.
1183 +// You should have received a copy of the GNU General Public License along
1184 +// with this library; see the file COPYING. If not, write to the Free
1185 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1188 +// As a special exception, you may use this file as part of a free software
1189 +// library without restriction. Specifically, if other files instantiate
1190 +// templates or use macros or inline functions from this file, or you compile
1191 +// this file and link it with other files to produce an executable, this
1192 +// file does not by itself cause the resulting executable to be covered by
1193 +// the GNU General Public License. This exception does not however
1194 +// invalidate any other reasons why the executable file might be covered by
1195 +// the GNU General Public License.
1198 +// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
1201 +// Written by Benjamin Kosnik <bkoz@redhat.com>
1204 +#include <bits/c++locale_internal.h>
1206 +#ifdef __UCLIBC_MJN3_ONLY__
1207 +#warning fix gettext stuff
1209 +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1210 +extern "C" char *__dcgettext(const char *domainname,
1211 + const char *msgid, int category);
1213 +#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
1216 +#define gettext(msgid) (msgid)
1221 + // Specializations.
1224 + messages<char>::do_get(catalog, int, int, const string& __dfault) const
1226 +#ifdef __UCLIBC_HAS_XLOCALE__
1227 + __c_locale __old = __uselocale(_M_c_locale_messages);
1228 + const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
1229 + __uselocale(__old);
1230 + return string(__msg);
1231 +#elif defined __UCLIBC_HAS_LOCALE__
1232 + char* __old = strdup(setlocale(LC_ALL, NULL));
1233 + setlocale(LC_ALL, _M_name_messages);
1234 + const char* __msg = gettext(__dfault.c_str());
1235 + setlocale(LC_ALL, __old);
1237 + return string(__msg);
1239 + const char* __msg = gettext(__dfault.c_str());
1240 + return string(__msg);
1244 +#ifdef _GLIBCXX_USE_WCHAR_T
1247 + messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
1249 +# ifdef __UCLIBC_HAS_XLOCALE__
1250 + __c_locale __old = __uselocale(_M_c_locale_messages);
1251 + char* __msg = gettext(_M_convert_to_char(__dfault));
1252 + __uselocale(__old);
1253 + return _M_convert_from_char(__msg);
1254 +# elif defined __UCLIBC_HAS_LOCALE__
1255 + char* __old = strdup(setlocale(LC_ALL, NULL));
1256 + setlocale(LC_ALL, _M_name_messages);
1257 + char* __msg = gettext(_M_convert_to_char(__dfault));
1258 + setlocale(LC_ALL, __old);
1260 + return _M_convert_from_char(__msg);
1262 + char* __msg = gettext(_M_convert_to_char(__dfault));
1263 + return _M_convert_from_char(__msg);
1268 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
1269 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 18:00:00.000000000 -0600
1270 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2004-09-10 10:47:40.000000000 -0500
1272 +// std::messages implementation details, GNU version -*- C++ -*-
1274 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1276 +// This file is part of the GNU ISO C++ Library. This library is free
1277 +// software; you can redistribute it and/or modify it under the
1278 +// terms of the GNU General Public License as published by the
1279 +// Free Software Foundation; either version 2, or (at your option)
1280 +// any later version.
1282 +// This library is distributed in the hope that it will be useful,
1283 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1284 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1285 +// GNU General Public License for more details.
1287 +// You should have received a copy of the GNU General Public License along
1288 +// with this library; see the file COPYING. If not, write to the Free
1289 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1292 +// As a special exception, you may use this file as part of a free software
1293 +// library without restriction. Specifically, if other files instantiate
1294 +// templates or use macros or inline functions from this file, or you compile
1295 +// this file and link it with other files to produce an executable, this
1296 +// file does not by itself cause the resulting executable to be covered by
1297 +// the GNU General Public License. This exception does not however
1298 +// invalidate any other reasons why the executable file might be covered by
1299 +// the GNU General Public License.
1302 +// ISO C++ 14882: 22.2.7.1.2 messages functions
1305 +// Written by Benjamin Kosnik <bkoz@redhat.com>
1307 +#ifdef __UCLIBC_MJN3_ONLY__
1308 +#warning fix prototypes for *textdomain funcs
1310 +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1311 +extern "C" char *__textdomain(const char *domainname);
1312 +extern "C" char *__bindtextdomain(const char *domainname,
1313 + const char *dirname);
1315 +#undef __textdomain
1316 +#undef __bindtextdomain
1317 +#define __textdomain(D) ((void)0)
1318 +#define __bindtextdomain(D,P) ((void)0)
1321 + // Non-virtual member functions.
1322 + template<typename _CharT>
1323 + messages<_CharT>::messages(size_t __refs)
1324 + : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
1325 + _M_name_messages(_S_get_c_name())
1328 + template<typename _CharT>
1329 + messages<_CharT>::messages(__c_locale __cloc, const char* __s,
1331 + : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
1332 + _M_name_messages(__s)
1334 + char* __tmp = new char[std::strlen(__s) + 1];
1335 + std::strcpy(__tmp, __s);
1336 + _M_name_messages = __tmp;
1339 + template<typename _CharT>
1340 + typename messages<_CharT>::catalog
1341 + messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
1342 + const char* __dir) const
1344 + __bindtextdomain(__s.c_str(), __dir);
1345 + return this->do_open(__s, __loc);
1348 + // Virtual member functions.
1349 + template<typename _CharT>
1350 + messages<_CharT>::~messages()
1352 + if (_M_name_messages != _S_get_c_name())
1353 + delete [] _M_name_messages;
1354 + _S_destroy_c_locale(_M_c_locale_messages);
1357 + template<typename _CharT>
1358 + typename messages<_CharT>::catalog
1359 + messages<_CharT>::do_open(const basic_string<char>& __s,
1360 + const locale&) const
1362 + // No error checking is done, assume the catalog exists and can
1364 + __textdomain(__s.c_str());
1368 + template<typename _CharT>
1370 + messages<_CharT>::do_close(catalog) const
1373 + // messages_byname
1374 + template<typename _CharT>
1375 + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
1376 + : messages<_CharT>(__refs)
1378 + if (this->_M_name_messages != locale::facet::_S_get_c_name())
1379 + delete [] this->_M_name_messages;
1380 + char* __tmp = new char[std::strlen(__s) + 1];
1381 + std::strcpy(__tmp, __s);
1382 + this->_M_name_messages = __tmp;
1384 + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
1386 + this->_S_destroy_c_locale(this->_M_c_locale_messages);
1387 + this->_S_create_c_locale(this->_M_c_locale_messages, __s);
1390 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
1391 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 18:00:00.000000000 -0600
1392 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2004-09-10 10:47:40.000000000 -0500
1394 +// std::moneypunct implementation details, GNU version -*- C++ -*-
1396 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1398 +// This file is part of the GNU ISO C++ Library. This library is free
1399 +// software; you can redistribute it and/or modify it under the
1400 +// terms of the GNU General Public License as published by the
1401 +// Free Software Foundation; either version 2, or (at your option)
1402 +// any later version.
1404 +// This library is distributed in the hope that it will be useful,
1405 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1406 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1407 +// GNU General Public License for more details.
1409 +// You should have received a copy of the GNU General Public License along
1410 +// with this library; see the file COPYING. If not, write to the Free
1411 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1414 +// As a special exception, you may use this file as part of a free software
1415 +// library without restriction. Specifically, if other files instantiate
1416 +// templates or use macros or inline functions from this file, or you compile
1417 +// this file and link it with other files to produce an executable, this
1418 +// file does not by itself cause the resulting executable to be covered by
1419 +// the GNU General Public License. This exception does not however
1420 +// invalidate any other reasons why the executable file might be covered by
1421 +// the GNU General Public License.
1424 +// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
1427 +// Written by Benjamin Kosnik <bkoz@redhat.com>
1432 +#include <bits/c++locale_internal.h>
1434 +#ifdef __UCLIBC_MJN3_ONLY__
1435 +#warning optimize this for uclibc
1436 +#warning tailor for stub locale support
1439 +#ifndef __UCLIBC_HAS_XLOCALE__
1440 +#define __nl_langinfo_l(N, L) nl_langinfo((N))
1445 + // Construct and return valid pattern consisting of some combination of:
1446 + // space none symbol sign value
1447 + money_base::pattern
1448 + money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
1452 + // This insanely complicated routine attempts to construct a valid
1453 + // pattern for use with monyepunct. A couple of invariants:
1455 + // if (__precedes) symbol -> value
1456 + // else value -> symbol
1458 + // if (__space) space
1461 + // none == never first
1462 + // space never first or last
1464 + // Any elegant implementations of this are welcome.
1469 + // 1 The sign precedes the value and symbol.
1470 + __ret.field[0] = sign;
1473 + // Pattern starts with sign.
1476 + __ret.field[1] = symbol;
1477 + __ret.field[3] = value;
1481 + __ret.field[1] = value;
1482 + __ret.field[3] = symbol;
1484 + __ret.field[2] = space;
1488 + // Pattern starts with sign and ends with none.
1491 + __ret.field[1] = symbol;
1492 + __ret.field[2] = value;
1496 + __ret.field[1] = value;
1497 + __ret.field[2] = symbol;
1499 + __ret.field[3] = none;
1503 + // 2 The sign follows the value and symbol.
1506 + // Pattern either ends with sign.
1509 + __ret.field[0] = symbol;
1510 + __ret.field[2] = value;
1514 + __ret.field[0] = value;
1515 + __ret.field[2] = symbol;
1517 + __ret.field[1] = space;
1518 + __ret.field[3] = sign;
1522 + // Pattern ends with sign then none.
1525 + __ret.field[0] = symbol;
1526 + __ret.field[1] = value;
1530 + __ret.field[0] = value;
1531 + __ret.field[1] = symbol;
1533 + __ret.field[2] = sign;
1534 + __ret.field[3] = none;
1538 + // 3 The sign immediately precedes the symbol.
1541 + __ret.field[0] = sign;
1542 + __ret.field[1] = symbol;
1545 + __ret.field[2] = space;
1546 + __ret.field[3] = value;
1550 + __ret.field[2] = value;
1551 + __ret.field[3] = none;
1556 + __ret.field[0] = value;
1559 + __ret.field[1] = space;
1560 + __ret.field[2] = sign;
1561 + __ret.field[3] = symbol;
1565 + __ret.field[1] = sign;
1566 + __ret.field[2] = symbol;
1567 + __ret.field[3] = none;
1572 + // 4 The sign immediately follows the symbol.
1575 + __ret.field[0] = symbol;
1576 + __ret.field[1] = sign;
1579 + __ret.field[2] = space;
1580 + __ret.field[3] = value;
1584 + __ret.field[2] = value;
1585 + __ret.field[3] = none;
1590 + __ret.field[0] = value;
1593 + __ret.field[1] = space;
1594 + __ret.field[2] = symbol;
1595 + __ret.field[3] = sign;
1599 + __ret.field[1] = symbol;
1600 + __ret.field[2] = sign;
1601 + __ret.field[3] = none;
1613 + moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
1617 + _M_data = new __moneypunct_cache<char, true>;
1622 + _M_data->_M_decimal_point = '.';
1623 + _M_data->_M_thousands_sep = ',';
1624 + _M_data->_M_grouping = "";
1625 + _M_data->_M_grouping_size = 0;
1626 + _M_data->_M_curr_symbol = "";
1627 + _M_data->_M_curr_symbol_size = 0;
1628 + _M_data->_M_positive_sign = "";
1629 + _M_data->_M_positive_sign_size = 0;
1630 + _M_data->_M_negative_sign = "";
1631 + _M_data->_M_negative_sign_size = 0;
1632 + _M_data->_M_frac_digits = 0;
1633 + _M_data->_M_pos_format = money_base::_S_default_pattern;
1634 + _M_data->_M_neg_format = money_base::_S_default_pattern;
1636 + for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1637 + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
1642 + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
1644 + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
1646 + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1647 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1648 + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1649 + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
1651 + char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
1653 + _M_data->_M_negative_sign = "()";
1655 + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
1657 + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
1660 + _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1661 + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
1662 + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
1664 + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
1665 + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
1666 + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
1667 + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1669 + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
1670 + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
1671 + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1678 + moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
1682 + _M_data = new __moneypunct_cache<char, false>;
1687 + _M_data->_M_decimal_point = '.';
1688 + _M_data->_M_thousands_sep = ',';
1689 + _M_data->_M_grouping = "";
1690 + _M_data->_M_grouping_size = 0;
1691 + _M_data->_M_curr_symbol = "";
1692 + _M_data->_M_curr_symbol_size = 0;
1693 + _M_data->_M_positive_sign = "";
1694 + _M_data->_M_positive_sign_size = 0;
1695 + _M_data->_M_negative_sign = "";
1696 + _M_data->_M_negative_sign_size = 0;
1697 + _M_data->_M_frac_digits = 0;
1698 + _M_data->_M_pos_format = money_base::_S_default_pattern;
1699 + _M_data->_M_neg_format = money_base::_S_default_pattern;
1701 + for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1702 + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
1707 + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
1709 + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
1711 + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1712 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1713 + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1714 + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
1716 + char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
1718 + _M_data->_M_negative_sign = "()";
1720 + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
1722 + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
1725 + _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
1726 + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
1727 + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
1728 + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
1729 + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
1730 + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
1731 + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1733 + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
1734 + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
1735 + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1741 + moneypunct<char, true>::~moneypunct()
1742 + { delete _M_data; }
1745 + moneypunct<char, false>::~moneypunct()
1746 + { delete _M_data; }
1748 +#ifdef _GLIBCXX_USE_WCHAR_T
1751 + moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
1752 +#ifdef __UCLIBC_HAS_XLOCALE__
1755 + const char* __name)
1759 + _M_data = new __moneypunct_cache<wchar_t, true>;
1764 + _M_data->_M_decimal_point = L'.';
1765 + _M_data->_M_thousands_sep = L',';
1766 + _M_data->_M_grouping = "";
1767 + _M_data->_M_grouping_size = 0;
1768 + _M_data->_M_curr_symbol = L"";
1769 + _M_data->_M_curr_symbol_size = 0;
1770 + _M_data->_M_positive_sign = L"";
1771 + _M_data->_M_positive_sign_size = 0;
1772 + _M_data->_M_negative_sign = L"";
1773 + _M_data->_M_negative_sign_size = 0;
1774 + _M_data->_M_frac_digits = 0;
1775 + _M_data->_M_pos_format = money_base::_S_default_pattern;
1776 + _M_data->_M_neg_format = money_base::_S_default_pattern;
1778 + // Use ctype::widen code without the facet...
1780 + for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1782 + uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
1783 + _M_data->_M_atoms[__i] = btowc(uc);
1789 +#ifdef __UCLIBC_HAS_XLOCALE__
1790 + __c_locale __old = __uselocale(__cloc);
1792 + // Switch to named locale so that mbsrtowcs will work.
1793 + char* __old = strdup(setlocale(LC_ALL, NULL));
1794 + setlocale(LC_ALL, __name);
1797 +#ifdef __UCLIBC_MJN3_ONLY__
1798 +#warning fix this... should be monetary
1801 +# ifdef __UCLIBC_HAS_XLOCALE__
1802 + _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1803 + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1805 + _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1806 + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1809 + union __s_and_w { const char *__s; unsigned int __w; } __u;
1810 + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
1811 + _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
1813 + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
1814 + _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
1816 + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1817 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1819 + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1820 + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1821 + const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1823 + wchar_t* __wcs_ps = 0;
1824 + wchar_t* __wcs_ns = 0;
1825 + const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
1828 + mbstate_t __state;
1829 + size_t __len = strlen(__cpossign);
1833 + memset(&__state, 0, sizeof(mbstate_t));
1834 + __wcs_ps = new wchar_t[__len];
1835 + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
1836 + _M_data->_M_positive_sign = __wcs_ps;
1839 + _M_data->_M_positive_sign = L"";
1840 + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
1842 + __len = strlen(__cnegsign);
1844 + _M_data->_M_negative_sign = L"()";
1848 + memset(&__state, 0, sizeof(mbstate_t));
1849 + __wcs_ns = new wchar_t[__len];
1850 + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
1851 + _M_data->_M_negative_sign = __wcs_ns;
1854 + _M_data->_M_negative_sign = L"";
1855 + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
1858 + __len = strlen(__ccurr);
1862 + memset(&__state, 0, sizeof(mbstate_t));
1863 + wchar_t* __wcs = new wchar_t[__len];
1864 + mbsrtowcs(__wcs, &__ccurr, __len, &__state);
1865 + _M_data->_M_curr_symbol = __wcs;
1868 + _M_data->_M_curr_symbol = L"";
1869 + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
1877 +#ifdef __UCLIBC_HAS_XLOCALE__
1878 + __uselocale(__old);
1880 + setlocale(LC_ALL, __old);
1883 + __throw_exception_again;
1886 + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
1888 + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
1889 + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
1890 + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
1891 + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1893 + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
1894 + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
1895 + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1898 +#ifdef __UCLIBC_HAS_XLOCALE__
1899 + __uselocale(__old);
1901 + setlocale(LC_ALL, __old);
1909 + moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
1910 +#ifdef __UCLIBC_HAS_XLOCALE__
1913 + const char* __name)
1917 + _M_data = new __moneypunct_cache<wchar_t, false>;
1922 + _M_data->_M_decimal_point = L'.';
1923 + _M_data->_M_thousands_sep = L',';
1924 + _M_data->_M_grouping = "";
1925 + _M_data->_M_grouping_size = 0;
1926 + _M_data->_M_curr_symbol = L"";
1927 + _M_data->_M_curr_symbol_size = 0;
1928 + _M_data->_M_positive_sign = L"";
1929 + _M_data->_M_positive_sign_size = 0;
1930 + _M_data->_M_negative_sign = L"";
1931 + _M_data->_M_negative_sign_size = 0;
1932 + _M_data->_M_frac_digits = 0;
1933 + _M_data->_M_pos_format = money_base::_S_default_pattern;
1934 + _M_data->_M_neg_format = money_base::_S_default_pattern;
1936 + // Use ctype::widen code without the facet...
1938 + for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1940 + uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
1941 + _M_data->_M_atoms[__i] = btowc(uc);
1947 +#ifdef __UCLIBC_HAS_XLOCALE__
1948 + __c_locale __old = __uselocale(__cloc);
1950 + // Switch to named locale so that mbsrtowcs will work.
1951 + char* __old = strdup(setlocale(LC_ALL, NULL));
1952 + setlocale(LC_ALL, __name);
1955 +#ifdef __UCLIBC_MJN3_ONLY__
1956 +#warning fix this... should be monetary
1959 +# ifdef __UCLIBC_HAS_XLOCALE__
1960 + _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1961 + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1963 + _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1964 + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1967 + union __s_and_w { const char *__s; unsigned int __w; } __u;
1968 + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
1969 + _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
1971 + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
1972 + _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
1974 + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1975 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1977 + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1978 + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1979 + const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
1981 + wchar_t* __wcs_ps = 0;
1982 + wchar_t* __wcs_ns = 0;
1983 + const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
1986 + mbstate_t __state;
1988 + __len = strlen(__cpossign);
1992 + memset(&__state, 0, sizeof(mbstate_t));
1993 + __wcs_ps = new wchar_t[__len];
1994 + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
1995 + _M_data->_M_positive_sign = __wcs_ps;
1998 + _M_data->_M_positive_sign = L"";
1999 + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
2001 + __len = strlen(__cnegsign);
2003 + _M_data->_M_negative_sign = L"()";
2007 + memset(&__state, 0, sizeof(mbstate_t));
2008 + __wcs_ns = new wchar_t[__len];
2009 + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
2010 + _M_data->_M_negative_sign = __wcs_ns;
2013 + _M_data->_M_negative_sign = L"";
2014 + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
2017 + __len = strlen(__ccurr);
2021 + memset(&__state, 0, sizeof(mbstate_t));
2022 + wchar_t* __wcs = new wchar_t[__len];
2023 + mbsrtowcs(__wcs, &__ccurr, __len, &__state);
2024 + _M_data->_M_curr_symbol = __wcs;
2027 + _M_data->_M_curr_symbol = L"";
2028 + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
2036 +#ifdef __UCLIBC_HAS_XLOCALE__
2037 + __uselocale(__old);
2039 + setlocale(LC_ALL, __old);
2042 + __throw_exception_again;
2045 + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
2046 + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
2047 + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
2048 + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
2049 + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
2051 + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
2052 + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
2053 + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
2056 +#ifdef __UCLIBC_HAS_XLOCALE__
2057 + __uselocale(__old);
2059 + setlocale(LC_ALL, __old);
2066 + moneypunct<wchar_t, true>::~moneypunct()
2068 + if (_M_data->_M_positive_sign_size)
2069 + delete [] _M_data->_M_positive_sign;
2070 + if (_M_data->_M_negative_sign_size
2071 + && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
2072 + delete [] _M_data->_M_negative_sign;
2073 + if (_M_data->_M_curr_symbol_size)
2074 + delete [] _M_data->_M_curr_symbol;
2079 + moneypunct<wchar_t, false>::~moneypunct()
2081 + if (_M_data->_M_positive_sign_size)
2082 + delete [] _M_data->_M_positive_sign;
2083 + if (_M_data->_M_negative_sign_size
2084 + && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
2085 + delete [] _M_data->_M_negative_sign;
2086 + if (_M_data->_M_curr_symbol_size)
2087 + delete [] _M_data->_M_curr_symbol;
2092 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
2093 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 18:00:00.000000000 -0600
2094 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2004-09-10 10:47:40.000000000 -0500
2096 +// std::numpunct implementation details, GNU version -*- C++ -*-
2098 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2100 +// This file is part of the GNU ISO C++ Library. This library is free
2101 +// software; you can redistribute it and/or modify it under the
2102 +// terms of the GNU General Public License as published by the
2103 +// Free Software Foundation; either version 2, or (at your option)
2104 +// any later version.
2106 +// This library is distributed in the hope that it will be useful,
2107 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2108 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2109 +// GNU General Public License for more details.
2111 +// You should have received a copy of the GNU General Public License along
2112 +// with this library; see the file COPYING. If not, write to the Free
2113 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2116 +// As a special exception, you may use this file as part of a free software
2117 +// library without restriction. Specifically, if other files instantiate
2118 +// templates or use macros or inline functions from this file, or you compile
2119 +// this file and link it with other files to produce an executable, this
2120 +// file does not by itself cause the resulting executable to be covered by
2121 +// the GNU General Public License. This exception does not however
2122 +// invalidate any other reasons why the executable file might be covered by
2123 +// the GNU General Public License.
2126 +// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
2129 +// Written by Benjamin Kosnik <bkoz@redhat.com>
2134 +#include <bits/c++locale_internal.h>
2136 +#ifdef __UCLIBC_MJN3_ONLY__
2137 +#warning tailor for stub locale support
2139 +#ifndef __UCLIBC_HAS_XLOCALE__
2140 +#define __nl_langinfo_l(N, L) nl_langinfo((N))
2147 + numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
2150 + _M_data = new __numpunct_cache<char>;
2155 + _M_data->_M_grouping = "";
2156 + _M_data->_M_grouping_size = 0;
2157 + _M_data->_M_use_grouping = false;
2159 + _M_data->_M_decimal_point = '.';
2160 + _M_data->_M_thousands_sep = ',';
2162 + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
2163 + _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
2165 + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
2166 + _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
2171 + _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
2173 + _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
2176 + // Check for NULL, which implies no grouping.
2177 + if (_M_data->_M_thousands_sep == '\0')
2178 + _M_data->_M_grouping = "";
2180 + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2181 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
2184 + // NB: There is no way to extact this info from posix locales.
2185 + // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2186 + _M_data->_M_truename = "true";
2187 + _M_data->_M_truename_size = strlen(_M_data->_M_truename);
2188 + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2189 + _M_data->_M_falsename = "false";
2190 + _M_data->_M_falsename_size = strlen(_M_data->_M_falsename);
2194 + numpunct<char>::~numpunct()
2195 + { delete _M_data; }
2197 +#ifdef _GLIBCXX_USE_WCHAR_T
2200 + numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
2203 + _M_data = new __numpunct_cache<wchar_t>;
2208 + _M_data->_M_grouping = "";
2209 + _M_data->_M_grouping_size = 0;
2210 + _M_data->_M_use_grouping = false;
2212 + _M_data->_M_decimal_point = L'.';
2213 + _M_data->_M_thousands_sep = L',';
2215 +#ifdef __UCLIBC_HAS_XLOCALE__
2216 + __c_locale __old = __uselocale(_S_get_c_locale());
2218 + // Use ctype::widen code without the facet...
2220 + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
2222 + uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]);
2223 + _M_data->_M_atoms_out[__i] = btowc(uc);
2226 + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
2228 + uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__j]);
2229 + _M_data->_M_atoms_in[__j] = btowc(uc);
2231 +#ifdef __UCLIBC_HAS_XLOCALE__
2232 + __uselocale(__old);
2238 +#ifdef __UCLIBC_MJN3_ONLY__
2242 +# ifdef __UCLIBC_HAS_XLOCALE__
2243 + _M_data->_M_decimal_point = __cloc->decimal_point_wc;
2244 + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
2246 + _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
2247 + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
2250 + union __s_and_w { const char *__s; unsigned int __w; } __u;
2251 + __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
2252 + _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
2254 + __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
2255 + _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
2258 + if (_M_data->_M_thousands_sep == L'\0')
2259 + _M_data->_M_grouping = "";
2261 + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2262 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
2265 + // NB: There is no way to extact this info from posix locales.
2266 + // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2267 + _M_data->_M_truename = L"true";
2268 + _M_data->_M_truename_size = wcslen(_M_data->_M_truename);
2269 + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2270 + _M_data->_M_falsename = L"false";
2271 + _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename);
2275 + numpunct<wchar_t>::~numpunct()
2276 + { delete _M_data; }
2279 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
2280 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 18:00:00.000000000 -0600
2281 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2004-09-10 10:48:00.000000000 -0500
2283 +// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2285 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2287 +// This file is part of the GNU ISO C++ Library. This library is free
2288 +// software; you can redistribute it and/or modify it under the
2289 +// terms of the GNU General Public License as published by the
2290 +// Free Software Foundation; either version 2, or (at your option)
2291 +// any later version.
2293 +// This library is distributed in the hope that it will be useful,
2294 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2295 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2296 +// GNU General Public License for more details.
2298 +// You should have received a copy of the GNU General Public License along
2299 +// with this library; see the file COPYING. If not, write to the Free
2300 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2303 +// As a special exception, you may use this file as part of a free software
2304 +// library without restriction. Specifically, if other files instantiate
2305 +// templates or use macros or inline functions from this file, or you compile
2306 +// this file and link it with other files to produce an executable, this
2307 +// file does not by itself cause the resulting executable to be covered by
2308 +// the GNU General Public License. This exception does not however
2309 +// invalidate any other reasons why the executable file might be covered by
2310 +// the GNU General Public License.
2313 +// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
2314 +// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
2317 +// Written by Benjamin Kosnik <bkoz@redhat.com>
2320 +#include <bits/c++locale_internal.h>
2322 +#ifdef __UCLIBC_MJN3_ONLY__
2323 +#warning tailor for stub locale support
2325 +#ifndef __UCLIBC_HAS_XLOCALE__
2326 +#define __nl_langinfo_l(N, L) nl_langinfo((N))
2333 + __timepunct<char>::
2334 + _M_put(char* __s, size_t __maxlen, const char* __format,
2335 + const tm* __tm) const
2337 +#ifdef __UCLIBC_HAS_XLOCALE__
2338 + const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
2339 + _M_c_locale_timepunct);
2341 + char* __old = strdup(setlocale(LC_ALL, NULL));
2342 + setlocale(LC_ALL, _M_name_timepunct);
2343 + const size_t __len = strftime(__s, __maxlen, __format, __tm);
2344 + setlocale(LC_ALL, __old);
2347 + // Make sure __s is null terminated.
2354 + __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
2357 + _M_data = new __timepunct_cache<char>;
2362 + _M_c_locale_timepunct = _S_get_c_locale();
2364 + _M_data->_M_date_format = "%m/%d/%y";
2365 + _M_data->_M_date_era_format = "%m/%d/%y";
2366 + _M_data->_M_time_format = "%H:%M:%S";
2367 + _M_data->_M_time_era_format = "%H:%M:%S";
2368 + _M_data->_M_date_time_format = "";
2369 + _M_data->_M_date_time_era_format = "";
2370 + _M_data->_M_am = "AM";
2371 + _M_data->_M_pm = "PM";
2372 + _M_data->_M_am_pm_format = "";
2374 + // Day names, starting with "C"'s Sunday.
2375 + _M_data->_M_day1 = "Sunday";
2376 + _M_data->_M_day2 = "Monday";
2377 + _M_data->_M_day3 = "Tuesday";
2378 + _M_data->_M_day4 = "Wednesday";
2379 + _M_data->_M_day5 = "Thursday";
2380 + _M_data->_M_day6 = "Friday";
2381 + _M_data->_M_day7 = "Saturday";
2383 + // Abbreviated day names, starting with "C"'s Sun.
2384 + _M_data->_M_aday1 = "Sun";
2385 + _M_data->_M_aday2 = "Mon";
2386 + _M_data->_M_aday3 = "Tue";
2387 + _M_data->_M_aday4 = "Wed";
2388 + _M_data->_M_aday5 = "Thu";
2389 + _M_data->_M_aday6 = "Fri";
2390 + _M_data->_M_aday7 = "Sat";
2392 + // Month names, starting with "C"'s January.
2393 + _M_data->_M_month01 = "January";
2394 + _M_data->_M_month02 = "February";
2395 + _M_data->_M_month03 = "March";
2396 + _M_data->_M_month04 = "April";
2397 + _M_data->_M_month05 = "May";
2398 + _M_data->_M_month06 = "June";
2399 + _M_data->_M_month07 = "July";
2400 + _M_data->_M_month08 = "August";
2401 + _M_data->_M_month09 = "September";
2402 + _M_data->_M_month10 = "October";
2403 + _M_data->_M_month11 = "November";
2404 + _M_data->_M_month12 = "December";
2406 + // Abbreviated month names, starting with "C"'s Jan.
2407 + _M_data->_M_amonth01 = "Jan";
2408 + _M_data->_M_amonth02 = "Feb";
2409 + _M_data->_M_amonth03 = "Mar";
2410 + _M_data->_M_amonth04 = "Apr";
2411 + _M_data->_M_amonth05 = "May";
2412 + _M_data->_M_amonth06 = "Jun";
2413 + _M_data->_M_amonth07 = "Jul";
2414 + _M_data->_M_amonth08 = "Aug";
2415 + _M_data->_M_amonth09 = "Sep";
2416 + _M_data->_M_amonth10 = "Oct";
2417 + _M_data->_M_amonth11 = "Nov";
2418 + _M_data->_M_amonth12 = "Dec";
2422 + _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2424 + _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
2425 + _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
2426 + _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
2427 + _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
2428 + _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
2429 + _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc);
2430 + _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
2431 + _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
2432 + _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
2434 + // Day names, starting with "C"'s Sunday.
2435 + _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
2436 + _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
2437 + _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
2438 + _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
2439 + _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
2440 + _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
2441 + _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
2443 + // Abbreviated day names, starting with "C"'s Sun.
2444 + _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
2445 + _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
2446 + _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
2447 + _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
2448 + _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
2449 + _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
2450 + _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
2452 + // Month names, starting with "C"'s January.
2453 + _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
2454 + _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
2455 + _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
2456 + _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
2457 + _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
2458 + _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
2459 + _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
2460 + _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
2461 + _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
2462 + _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
2463 + _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
2464 + _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
2466 + // Abbreviated month names, starting with "C"'s Jan.
2467 + _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
2468 + _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
2469 + _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
2470 + _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
2471 + _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
2472 + _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
2473 + _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
2474 + _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
2475 + _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
2476 + _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
2477 + _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
2478 + _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
2482 +#ifdef _GLIBCXX_USE_WCHAR_T
2485 + __timepunct<wchar_t>::
2486 + _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
2487 + const tm* __tm) const
2489 +#ifdef __UCLIBC_HAS_XLOCALE__
2490 + __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
2491 + const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
2492 + _M_c_locale_timepunct);
2494 + char* __old = strdup(setlocale(LC_ALL, NULL));
2495 + setlocale(LC_ALL, _M_name_timepunct);
2496 + const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
2497 + setlocale(LC_ALL, __old);
2500 + // Make sure __s is null terminated.
2507 + __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
2510 + _M_data = new __timepunct_cache<wchar_t>;
2512 +#warning wide time stuff
2516 + _M_c_locale_timepunct = _S_get_c_locale();
2518 + _M_data->_M_date_format = L"%m/%d/%y";
2519 + _M_data->_M_date_era_format = L"%m/%d/%y";
2520 + _M_data->_M_time_format = L"%H:%M:%S";
2521 + _M_data->_M_time_era_format = L"%H:%M:%S";
2522 + _M_data->_M_date_time_format = L"";
2523 + _M_data->_M_date_time_era_format = L"";
2524 + _M_data->_M_am = L"AM";
2525 + _M_data->_M_pm = L"PM";
2526 + _M_data->_M_am_pm_format = L"";
2528 + // Day names, starting with "C"'s Sunday.
2529 + _M_data->_M_day1 = L"Sunday";
2530 + _M_data->_M_day2 = L"Monday";
2531 + _M_data->_M_day3 = L"Tuesday";
2532 + _M_data->_M_day4 = L"Wednesday";
2533 + _M_data->_M_day5 = L"Thursday";
2534 + _M_data->_M_day6 = L"Friday";
2535 + _M_data->_M_day7 = L"Saturday";
2537 + // Abbreviated day names, starting with "C"'s Sun.
2538 + _M_data->_M_aday1 = L"Sun";
2539 + _M_data->_M_aday2 = L"Mon";
2540 + _M_data->_M_aday3 = L"Tue";
2541 + _M_data->_M_aday4 = L"Wed";
2542 + _M_data->_M_aday5 = L"Thu";
2543 + _M_data->_M_aday6 = L"Fri";
2544 + _M_data->_M_aday7 = L"Sat";
2546 + // Month names, starting with "C"'s January.
2547 + _M_data->_M_month01 = L"January";
2548 + _M_data->_M_month02 = L"February";
2549 + _M_data->_M_month03 = L"March";
2550 + _M_data->_M_month04 = L"April";
2551 + _M_data->_M_month05 = L"May";
2552 + _M_data->_M_month06 = L"June";
2553 + _M_data->_M_month07 = L"July";
2554 + _M_data->_M_month08 = L"August";
2555 + _M_data->_M_month09 = L"September";
2556 + _M_data->_M_month10 = L"October";
2557 + _M_data->_M_month11 = L"November";
2558 + _M_data->_M_month12 = L"December";
2560 + // Abbreviated month names, starting with "C"'s Jan.
2561 + _M_data->_M_amonth01 = L"Jan";
2562 + _M_data->_M_amonth02 = L"Feb";
2563 + _M_data->_M_amonth03 = L"Mar";
2564 + _M_data->_M_amonth04 = L"Apr";
2565 + _M_data->_M_amonth05 = L"May";
2566 + _M_data->_M_amonth06 = L"Jun";
2567 + _M_data->_M_amonth07 = L"Jul";
2568 + _M_data->_M_amonth08 = L"Aug";
2569 + _M_data->_M_amonth09 = L"Sep";
2570 + _M_data->_M_amonth10 = L"Oct";
2571 + _M_data->_M_amonth11 = L"Nov";
2572 + _M_data->_M_amonth12 = L"Dec";
2577 + _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2579 + _M_data->_M_date_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_FMT, __cloc));
2580 + _M_data->_M_date_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc));
2581 + _M_data->_M_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT, __cloc));
2582 + _M_data->_M_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc));
2583 + _M_data->_M_date_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_T_FMT, __cloc));
2584 + _M_data->_M_date_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc));
2585 + _M_data->_M_am = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WAM_STR, __cloc));
2586 + _M_data->_M_pm = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WPM_STR, __cloc));
2587 + _M_data->_M_am_pm_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc));
2589 + // Day names, starting with "C"'s Sunday.
2590 + _M_data->_M_day1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_1, __cloc));
2591 + _M_data->_M_day2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_2, __cloc));
2592 + _M_data->_M_day3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_3, __cloc));
2593 + _M_data->_M_day4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_4, __cloc));
2594 + _M_data->_M_day5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_5, __cloc));
2595 + _M_data->_M_day6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_6, __cloc));
2596 + _M_data->_M_day7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_7, __cloc));
2598 + // Abbreviated day names, starting with "C"'s Sun.
2599 + _M_data->_M_aday1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_1, __cloc));
2600 + _M_data->_M_aday2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_2, __cloc));
2601 + _M_data->_M_aday3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_3, __cloc));
2602 + _M_data->_M_aday4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_4, __cloc));
2603 + _M_data->_M_aday5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_5, __cloc));
2604 + _M_data->_M_aday6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_6, __cloc));
2605 + _M_data->_M_aday7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_7, __cloc));
2607 + // Month names, starting with "C"'s January.
2608 + _M_data->_M_month01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_1, __cloc));
2609 + _M_data->_M_month02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_2, __cloc));
2610 + _M_data->_M_month03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_3, __cloc));
2611 + _M_data->_M_month04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_4, __cloc));
2612 + _M_data->_M_month05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_5, __cloc));
2613 + _M_data->_M_month06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_6, __cloc));
2614 + _M_data->_M_month07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_7, __cloc));
2615 + _M_data->_M_month08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_8, __cloc));
2616 + _M_data->_M_month09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_9, __cloc));
2617 + _M_data->_M_month10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_10, __cloc));
2618 + _M_data->_M_month11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_11, __cloc));
2619 + _M_data->_M_month12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_12, __cloc));
2621 + // Abbreviated month names, starting with "C"'s Jan.
2622 + _M_data->_M_amonth01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_1, __cloc));
2623 + _M_data->_M_amonth02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_2, __cloc));
2624 + _M_data->_M_amonth03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_3, __cloc));
2625 + _M_data->_M_amonth04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_4, __cloc));
2626 + _M_data->_M_amonth05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_5, __cloc));
2627 + _M_data->_M_amonth06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_6, __cloc));
2628 + _M_data->_M_amonth07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_7, __cloc));
2629 + _M_data->_M_amonth08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_8, __cloc));
2630 + _M_data->_M_amonth09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_9, __cloc));
2631 + _M_data->_M_amonth10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_10, __cloc));
2632 + _M_data->_M_amonth11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_11, __cloc));
2633 + _M_data->_M_amonth12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_12, __cloc));
2639 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
2640 --- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 18:00:00.000000000 -0600
2641 +++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2004-09-10 10:47:40.000000000 -0500
2643 +// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2645 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2647 +// This file is part of the GNU ISO C++ Library. This library is free
2648 +// software; you can redistribute it and/or modify it under the
2649 +// terms of the GNU General Public License as published by the
2650 +// Free Software Foundation; either version 2, or (at your option)
2651 +// any later version.
2653 +// This library is distributed in the hope that it will be useful,
2654 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2655 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2656 +// GNU General Public License for more details.
2658 +// You should have received a copy of the GNU General Public License along
2659 +// with this library; see the file COPYING. If not, write to the Free
2660 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2663 +// As a special exception, you may use this file as part of a free software
2664 +// library without restriction. Specifically, if other files instantiate
2665 +// templates or use macros or inline functions from this file, or you compile
2666 +// this file and link it with other files to produce an executable, this
2667 +// file does not by itself cause the resulting executable to be covered by
2668 +// the GNU General Public License. This exception does not however
2669 +// invalidate any other reasons why the executable file might be covered by
2670 +// the GNU General Public License.
2673 +// ISO C++ 14882: 22.2.5.1.2 - time_get functions
2674 +// ISO C++ 14882: 22.2.5.3.2 - time_put functions
2677 +// Written by Benjamin Kosnik <bkoz@redhat.com>
2679 + template<typename _CharT>
2680 + __timepunct<_CharT>::__timepunct(size_t __refs)
2681 + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
2682 + _M_name_timepunct(_S_get_c_name())
2683 + { _M_initialize_timepunct(); }
2685 + template<typename _CharT>
2686 + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
2687 + : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
2688 + _M_name_timepunct(_S_get_c_name())
2689 + { _M_initialize_timepunct(); }
2691 + template<typename _CharT>
2692 + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
2694 + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
2695 + _M_name_timepunct(__s)
2697 + char* __tmp = new char[std::strlen(__s) + 1];
2698 + std::strcpy(__tmp, __s);
2699 + _M_name_timepunct = __tmp;
2700 + _M_initialize_timepunct(__cloc);
2703 + template<typename _CharT>
2704 + __timepunct<_CharT>::~__timepunct()
2706 + if (_M_name_timepunct != _S_get_c_name())
2707 + delete [] _M_name_timepunct;
2709 + _S_destroy_c_locale(_M_c_locale_timepunct);
2711 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
2712 --- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 18:00:00.000000000 -0600
2713 +++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h 2004-09-10 10:47:40.000000000 -0500
2715 +// Locale support -*- C++ -*-
2717 +// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
2718 +// Free Software Foundation, Inc.
2720 +// This file is part of the GNU ISO C++ Library. This library is free
2721 +// software; you can redistribute it and/or modify it under the
2722 +// terms of the GNU General Public License as published by the
2723 +// Free Software Foundation; either version 2, or (at your option)
2724 +// any later version.
2726 +// This library is distributed in the hope that it will be useful,
2727 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2728 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2729 +// GNU General Public License for more details.
2731 +// You should have received a copy of the GNU General Public License along
2732 +// with this library; see the file COPYING. If not, write to the Free
2733 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2736 +// As a special exception, you may use this file as part of a free software
2737 +// library without restriction. Specifically, if other files instantiate
2738 +// templates or use macros or inline functions from this file, or you compile
2739 +// this file and link it with other files to produce an executable, this
2740 +// file does not by itself cause the resulting executable to be covered by
2741 +// the GNU General Public License. This exception does not however
2742 +// invalidate any other reasons why the executable file might be covered by
2743 +// the GNU General Public License.
2746 +// ISO C++ 14882: 22.1 Locales
2749 +// Information as gleaned from /usr/include/ctype.h
2753 + // Note: In uClibc, the following two types depend on configuration.
2755 + // Non-standard typedefs.
2756 + typedef const __ctype_touplow_t* __to_type;
2758 + // NB: Offsets into ctype<char>::_M_table force a particular size
2759 + // on the mask type. Because of this, we don't use an enum.
2760 + typedef __ctype_mask_t mask;
2761 + static const mask upper = _ISupper;
2762 + static const mask lower = _ISlower;
2763 + static const mask alpha = _ISalpha;
2764 + static const mask digit = _ISdigit;
2765 + static const mask xdigit = _ISxdigit;
2766 + static const mask space = _ISspace;
2767 + static const mask print = _ISprint;
2768 + static const mask graph = _ISalpha | _ISdigit | _ISpunct;
2769 + static const mask cntrl = _IScntrl;
2770 + static const mask punct = _ISpunct;
2771 + static const mask alnum = _ISalpha | _ISdigit;
2773 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
2774 --- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 18:00:00.000000000 -0600
2775 +++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h 2004-09-10 10:47:40.000000000 -0500
2777 +// Locale support -*- C++ -*-
2779 +// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
2781 +// This file is part of the GNU ISO C++ Library. This library is free
2782 +// software; you can redistribute it and/or modify it under the
2783 +// terms of the GNU General Public License as published by the
2784 +// Free Software Foundation; either version 2, or (at your option)
2785 +// any later version.
2787 +// This library is distributed in the hope that it will be useful,
2788 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2789 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2790 +// GNU General Public License for more details.
2792 +// You should have received a copy of the GNU General Public License along
2793 +// with this library; see the file COPYING. If not, write to the Free
2794 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2797 +// As a special exception, you may use this file as part of a free software
2798 +// library without restriction. Specifically, if other files instantiate
2799 +// templates or use macros or inline functions from this file, or you compile
2800 +// this file and link it with other files to produce an executable, this
2801 +// file does not by itself cause the resulting executable to be covered by
2802 +// the GNU General Public License. This exception does not however
2803 +// invalidate any other reasons why the executable file might be covered by
2804 +// the GNU General Public License.
2807 +// ISO C++ 14882: 22.1 Locales
2810 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
2811 +// functions go in ctype.cc
2815 + is(mask __m, char __c) const
2816 + { return _M_table[static_cast<unsigned char>(__c)] & __m; }
2820 + is(const char* __low, const char* __high, mask* __vec) const
2822 + while (__low < __high)
2823 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
2829 + scan_is(mask __m, const char* __low, const char* __high) const
2831 + while (__low < __high
2832 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
2839 + scan_not(mask __m, const char* __low, const char* __high) const
2841 + while (__low < __high
2842 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
2846 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
2847 --- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 18:00:00.000000000 -0600
2848 +++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2004-09-10 10:47:40.000000000 -0500
2850 +// Locale support -*- C++ -*-
2852 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
2853 +// Free Software Foundation, Inc.
2855 +// This file is part of the GNU ISO C++ Library. This library is free
2856 +// software; you can redistribute it and/or modify it under the
2857 +// terms of the GNU General Public License as published by the
2858 +// Free Software Foundation; either version 2, or (at your option)
2859 +// any later version.
2861 +// This library is distributed in the hope that it will be useful,
2862 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2863 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2864 +// GNU General Public License for more details.
2866 +// You should have received a copy of the GNU General Public License along
2867 +// with this library; see the file COPYING. If not, write to the Free
2868 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2871 +// As a special exception, you may use this file as part of a free software
2872 +// library without restriction. Specifically, if other files instantiate
2873 +// templates or use macros or inline functions from this file, or you compile
2874 +// this file and link it with other files to produce an executable, this
2875 +// file does not by itself cause the resulting executable to be covered by
2876 +// the GNU General Public License. This exception does not however
2877 +// invalidate any other reasons why the executable file might be covered by
2878 +// the GNU General Public License.
2881 +// ISO C++ 14882: 22.1 Locales
2884 +// Information as gleaned from /usr/include/ctype.h
2886 + const ctype_base::mask*
2887 + ctype<char>::classic_table() throw()
2888 + { return __C_ctype_b; }
2890 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
2892 + : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
2893 + _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
2895 + _M_toupper = __C_ctype_toupper;
2896 + _M_tolower = __C_ctype_tolower;
2897 + _M_table = __table ? __table : __C_ctype_b;
2898 + memset(_M_widen, 0, sizeof(_M_widen));
2899 + memset(_M_narrow, 0, sizeof(_M_narrow));
2902 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
2903 + : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
2904 + _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
2906 + _M_toupper = __C_ctype_toupper;
2907 + _M_tolower = __C_ctype_tolower;
2908 + _M_table = __table ? __table : __C_ctype_b;
2909 + memset(_M_widen, 0, sizeof(_M_widen));
2910 + memset(_M_narrow, 0, sizeof(_M_narrow));
2914 + ctype<char>::do_toupper(char __c) const
2915 + { return _M_toupper[static_cast<unsigned char>(__c)]; }
2918 + ctype<char>::do_toupper(char* __low, const char* __high) const
2920 + while (__low < __high)
2922 + *__low = _M_toupper[static_cast<unsigned char>(*__low)];
2929 + ctype<char>::do_tolower(char __c) const
2930 + { return _M_tolower[static_cast<unsigned char>(__c)]; }
2933 + ctype<char>::do_tolower(char* __low, const char* __high) const
2935 + while (__low < __high)
2937 + *__low = _M_tolower[static_cast<unsigned char>(*__low)];
2942 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
2943 --- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 18:00:00.000000000 -0600
2944 +++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h 2004-09-10 10:47:40.000000000 -0500
2946 +// Specific definitions for GNU/Linux -*- C++ -*-
2948 +// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2950 +// This file is part of the GNU ISO C++ Library. This library is free
2951 +// software; you can redistribute it and/or modify it under the
2952 +// terms of the GNU General Public License as published by the
2953 +// Free Software Foundation; either version 2, or (at your option)
2954 +// any later version.
2956 +// This library is distributed in the hope that it will be useful,
2957 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2958 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2959 +// GNU General Public License for more details.
2961 +// You should have received a copy of the GNU General Public License along
2962 +// with this library; see the file COPYING. If not, write to the Free
2963 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2966 +// As a special exception, you may use this file as part of a free software
2967 +// library without restriction. Specifically, if other files instantiate
2968 +// templates or use macros or inline functions from this file, or you compile
2969 +// this file and link it with other files to produce an executable, this
2970 +// file does not by itself cause the resulting executable to be covered by
2971 +// the GNU General Public License. This exception does not however
2972 +// invalidate any other reasons why the executable file might be covered by
2973 +// the GNU General Public License.
2975 +#ifndef _GLIBCXX_OS_DEFINES
2976 +#define _GLIBCXX_OS_DEFINES 1
2978 +// System-specific #define, typedefs, corrections, etc, go here. This
2979 +// file will come before all others.
2981 +// This keeps isanum, et al from being propagated as macros.
2982 +#define __NO_CTYPE 1
2984 +#include <features.h>
2986 +// We must not see the optimized string functions GNU libc defines.
2987 +#define __NO_STRING_INLINES
2990 diff -urN gcc-3.4.2-dist/libstdc++-v3/configure gcc-3.4.2/libstdc++-v3/configure
2991 --- gcc-3.4.2-dist/libstdc++-v3/configure 2004-08-13 15:44:04.000000000 -0500
2992 +++ gcc-3.4.2/libstdc++-v3/configure 2004-09-10 10:47:40.000000000 -0500
2993 @@ -3878,6 +3878,11 @@
2994 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2998 + lt_cv_deplibs_check_method=pass_all
2999 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
3003 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3004 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3005 @@ -5479,7 +5479,7 @@
3006 enableval="$enable_clocale"
3008 case "$enableval" in
3009 - generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
3010 + generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
3011 *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
3012 echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
3013 { (exit 1); exit 1; }; } ;;
3014 @@ -5545,6 +5550,9 @@
3015 # Default to "generic".
3016 if test $enable_clocale_flag = auto; then
3017 case x${target_os} in
3019 + enable_clocale_flag=uclibc
3021 xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
3022 cat >conftest.$ac_ext <<_ACEOF
3023 #line $LINENO "configure"
3024 @@ -5759,6 +5767,77 @@
3025 CTIME_CC=config/locale/generic/time_members.cc
3026 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
3029 + echo "$as_me:$LINENO: result: uclibc" >&5
3030 +echo "${ECHO_T}uclibc" >&6
3032 + # Declare intention to use gettext, and add support for specific
3034 + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
3035 + ALL_LINGUAS="de fr"
3037 + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
3038 + # Extract the first word of "msgfmt", so it can be a program name with args.
3039 +set dummy msgfmt; ac_word=$2
3040 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3041 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3042 +if test "${ac_cv_prog_check_msgfmt+set}" = set; then
3043 + echo $ECHO_N "(cached) $ECHO_C" >&6
3045 + if test -n "$check_msgfmt"; then
3046 + ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
3048 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3049 +for as_dir in $PATH
3052 + test -z "$as_dir" && as_dir=.
3053 + for ac_exec_ext in '' $ac_executable_extensions; do
3054 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3055 + ac_cv_prog_check_msgfmt="yes"
3056 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3062 + test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
3065 +check_msgfmt=$ac_cv_prog_check_msgfmt
3066 +if test -n "$check_msgfmt"; then
3067 + echo "$as_me:$LINENO: result: $check_msgfmt" >&5
3068 +echo "${ECHO_T}$check_msgfmt" >&6
3070 + echo "$as_me:$LINENO: result: no" >&5
3071 +echo "${ECHO_T}no" >&6
3074 + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
3077 + # Export the build objects.
3078 + for ling in $ALL_LINGUAS; do \
3079 + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
3080 + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
3085 + CLOCALE_H=config/locale/uclibc/c_locale.h
3086 + CLOCALE_CC=config/locale/uclibc/c_locale.cc
3087 + CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
3088 + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
3089 + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
3090 + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
3091 + CMESSAGES_H=config/locale/uclibc/messages_members.h
3092 + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
3093 + CMONEY_CC=config/locale/uclibc/monetary_members.cc
3094 + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
3095 + CTIME_H=config/locale/uclibc/time_members.h
3096 + CTIME_CC=config/locale/uclibc/time_members.cc
3097 + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
3101 # This is where the testsuite looks for locale catalogs, using the
3102 diff -urN gcc-3.4.2-dist/libstdc++-v3/configure.host gcc-3.4.2/libstdc++-v3/configure.host
3103 --- gcc-3.4.2-dist/libstdc++-v3/configure.host 2004-08-27 14:52:30.000000000 -0500
3104 +++ gcc-3.4.2/libstdc++-v3/configure.host 2004-09-10 10:47:40.000000000 -0500
3105 @@ -217,6 +217,12 @@
3109 +# Override for uClibc since linux-uclibc gets mishandled above.
3110 +case "${host_os}" in
3112 + os_include_dir="os/uclibc"
3116 # Set any OS-dependent and CPU-dependent bits.
3117 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
3118 diff -urN gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4 gcc-3.4.2/libstdc++-v3/crossconfig.m4
3119 --- gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4 2004-07-06 20:23:49.000000000 -0500
3120 +++ gcc-3.4.2/libstdc++-v3/crossconfig.m4 2004-09-10 10:47:40.000000000 -0500
3121 @@ -138,6 +138,99 @@
3126 +# Temporary hack until we implement the float versions of the libm funcs
3127 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
3128 + machine/endian.h machine/param.h sys/machine.h sys/types.h \
3129 + fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
3130 + SECTION_FLAGS='-ffunction-sections -fdata-sections'
3131 + AC_SUBST(SECTION_FLAGS)
3132 + GLIBCXX_CHECK_LINKER_FEATURES
3133 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
3134 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
3137 + AC_DEFINE(HAVE_INT64_T)
3140 + # Don't enable LFS with uClinux
3143 + AC_DEFINE(_GLIBCXX_USE_LFS)
3146 + # For showmanyc_helper().
3147 + AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
3148 + GLIBCXX_CHECK_POLL
3149 + GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
3152 + AC_CHECK_HEADERS(sys/uio.h)
3153 + GLIBCXX_CHECK_WRITEV
3155 +# AC_DEFINE(HAVE_ACOSF)
3156 +# AC_DEFINE(HAVE_ASINF)
3157 +# AC_DEFINE(HAVE_ATANF)
3158 +# AC_DEFINE(HAVE_ATAN2F)
3159 + AC_DEFINE(HAVE_CEILF)
3160 + AC_DEFINE(HAVE_COPYSIGN)
3161 +# AC_DEFINE(HAVE_COPYSIGNF)
3162 +# AC_DEFINE(HAVE_COSF)
3163 +# AC_DEFINE(HAVE_COSHF)
3164 +# AC_DEFINE(HAVE_EXPF)
3165 +# AC_DEFINE(HAVE_FABSF)
3166 + AC_DEFINE(HAVE_FINITE)
3167 + AC_DEFINE(HAVE_FINITEF)
3168 + AC_DEFINE(HAVE_FLOORF)
3169 +# AC_DEFINE(HAVE_FMODF)
3170 +# AC_DEFINE(HAVE_FREXPF)
3171 + AC_DEFINE(HAVE_HYPOT)
3172 +# AC_DEFINE(HAVE_HYPOTF)
3173 + AC_DEFINE(HAVE_ISINF)
3174 + AC_DEFINE(HAVE_ISINFF)
3175 + AC_DEFINE(HAVE_ISNAN)
3176 + AC_DEFINE(HAVE_ISNANF)
3177 +# AC_DEFINE(HAVE_LOGF)
3178 +# AC_DEFINE(HAVE_LOG10F)
3179 +# AC_DEFINE(HAVE_MODFF)
3180 +# AC_DEFINE(HAVE_SINF)
3181 +# AC_DEFINE(HAVE_SINHF)
3182 +# AC_DEFINE(HAVE_SINCOS)
3183 +# AC_DEFINE(HAVE_SINCOSF)
3184 + AC_DEFINE(HAVE_SQRTF)
3185 +# AC_DEFINE(HAVE_TANF)
3186 +# AC_DEFINE(HAVE_TANHF)
3187 + if test x"long_double_math_on_this_cpu" = x"yes"; then
3188 + AC_MSG_ERROR([long_double_math_on_this_cpu is yes!])
3189 +# AC_DEFINE(HAVE_ACOSL)
3190 +# AC_DEFINE(HAVE_ASINL)
3191 +# AC_DEFINE(HAVE_ATANL)
3192 +# AC_DEFINE(HAVE_ATAN2L)
3193 +# AC_DEFINE(HAVE_CEILL)
3194 +# AC_DEFINE(HAVE_COPYSIGNL)
3195 +# AC_DEFINE(HAVE_COSL)
3196 +# AC_DEFINE(HAVE_COSHL)
3197 +# AC_DEFINE(HAVE_EXPL)
3198 +# AC_DEFINE(HAVE_FABSL)
3199 +# AC_DEFINE(HAVE_FINITEL)
3200 +# AC_DEFINE(HAVE_FLOORL)
3201 +# AC_DEFINE(HAVE_FMODL)
3202 +# AC_DEFINE(HAVE_FREXPL)
3203 +# AC_DEFINE(HAVE_HYPOTL)
3204 +# AC_DEFINE(HAVE_ISINFL)
3205 +# AC_DEFINE(HAVE_ISNANL)
3206 +# AC_DEFINE(HAVE_LOGL)
3207 +# AC_DEFINE(HAVE_LOG10L)
3208 +# AC_DEFINE(HAVE_MODFL)
3209 +# AC_DEFINE(HAVE_POWL)
3210 +# AC_DEFINE(HAVE_SINL)
3211 +# AC_DEFINE(HAVE_SINHL)
3212 +# AC_DEFINE(HAVE_SINCOSL)
3213 +# AC_DEFINE(HAVE_SQRTL)
3214 +# AC_DEFINE(HAVE_TANL)
3215 +# AC_DEFINE(HAVE_TANHL)
3218 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
3219 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
3220 machine/endian.h machine/param.h sys/machine.h sys/types.h \
3222 AC_DEFINE(HAVE_INT64_T)
3225 - # Don't enable LFS with uClibc
3226 + # Don't enable LFS with uClinux
3229 AC_DEFINE(_GLIBCXX_USE_LFS)
3230 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
3231 --- gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h 2003-12-08 21:51:45.000000000 -0600
3232 +++ gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h 2004-09-10 10:47:40.000000000 -0500
3235 using std::wmemmove;
3237 +#if _GLIBCXX_HAVE_WCSFTIME
3238 using std::wcsftime;
3241 #if _GLIBCXX_USE_C99
3243 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
3244 --- gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h 2004-07-20 03:52:12.000000000 -0500
3245 +++ gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h 2004-09-10 10:47:40.000000000 -0500
3250 +#if _GLIBCXX_HAVE_WCSFTIME