1 diff -urN gcc-4.0.0-100/libstdc++-v3/acinclude.m4 gcc-4.0.0/libstdc++-v3/acinclude.m4
2 --- gcc-4.0.0-100/libstdc++-v3/acinclude.m4 2005-04-30 13:06:53.000000000 -0500
3 +++ gcc-4.0.0/libstdc++-v3/acinclude.m4 2005-04-28 20:19:01.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 linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
21 AC_EGREP_CPP([_GLIBCXX_ok], [
23 @@ -1263,6 +1266,40 @@
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_CC=config/locale/uclibc/codecvt_members.cc
51 + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
52 + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
53 + CMESSAGES_H=config/locale/uclibc/messages_members.h
54 + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
55 + CMONEY_CC=config/locale/uclibc/monetary_members.cc
56 + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
57 + CTIME_H=config/locale/uclibc/time_members.h
58 + CTIME_CC=config/locale/uclibc/time_members.cc
59 + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
63 # This is where the testsuite looks for locale catalogs, using the
64 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
65 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 18:00:00.000000000 -0600
66 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2005-04-28 01:13:15.000000000 -0500
68 +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
70 +// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
72 +// This file is part of the GNU ISO C++ Library. This library is free
73 +// software; you can redistribute it and/or modify it under the
74 +// terms of the GNU General Public License as published by the
75 +// Free Software Foundation; either version 2, or (at your option)
76 +// any later version.
78 +// This library is distributed in the hope that it will be useful,
79 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
80 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81 +// GNU General Public License for more details.
83 +// You should have received a copy of the GNU General Public License along
84 +// with this library; see the file COPYING. If not, write to the Free
85 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
88 +// As a special exception, you may use this file as part of a free software
89 +// library without restriction. Specifically, if other files instantiate
90 +// templates or use macros or inline functions from this file, or you compile
91 +// this file and link it with other files to produce an executable, this
92 +// file does not by itself cause the resulting executable to be covered by
93 +// the GNU General Public License. This exception does not however
94 +// invalidate any other reasons why the executable file might be covered by
95 +// the GNU General Public License.
97 +// Written by Jakub Jelinek <jakub@redhat.com>
101 +#ifdef __UCLIBC_MJN3_ONLY__
102 +#warning clean this up
105 +#ifdef __UCLIBC_HAS_XLOCALE__
107 +extern "C" __typeof(iswctype_l) __iswctype_l;
108 +extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
109 +extern "C" __typeof(strcoll_l) __strcoll_l;
110 +extern "C" __typeof(strftime_l) __strftime_l;
111 +extern "C" __typeof(strtod_l) __strtod_l;
112 +extern "C" __typeof(strtof_l) __strtof_l;
113 +extern "C" __typeof(strtold_l) __strtold_l;
114 +extern "C" __typeof(strxfrm_l) __strxfrm_l;
115 +extern "C" __typeof(towlower_l) __towlower_l;
116 +extern "C" __typeof(towupper_l) __towupper_l;
117 +extern "C" __typeof(wcscoll_l) __wcscoll_l;
118 +extern "C" __typeof(wcsftime_l) __wcsftime_l;
119 +extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
120 +extern "C" __typeof(wctype_l) __wctype_l;
121 +extern "C" __typeof(newlocale) __newlocale;
122 +extern "C" __typeof(freelocale) __freelocale;
123 +extern "C" __typeof(duplocale) __duplocale;
124 +extern "C" __typeof(uselocale) __uselocale;
126 +#endif // GLIBC 2.3 and later
127 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
128 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 18:00:00.000000000 -0600
129 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2005-04-28 01:13:15.000000000 -0500
131 +// Wrapper for underlying C-language localization -*- C++ -*-
133 +// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
135 +// This file is part of the GNU ISO C++ Library. This library is free
136 +// software; you can redistribute it and/or modify it under the
137 +// terms of the GNU General Public License as published by the
138 +// Free Software Foundation; either version 2, or (at your option)
139 +// any later version.
141 +// This library is distributed in the hope that it will be useful,
142 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
143 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
144 +// GNU General Public License for more details.
146 +// You should have received a copy of the GNU General Public License along
147 +// with this library; see the file COPYING. If not, write to the Free
148 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
151 +// As a special exception, you may use this file as part of a free software
152 +// library without restriction. Specifically, if other files instantiate
153 +// templates or use macros or inline functions from this file, or you compile
154 +// this file and link it with other files to produce an executable, this
155 +// file does not by itself cause the resulting executable to be covered by
156 +// the GNU General Public License. This exception does not however
157 +// invalidate any other reasons why the executable file might be covered by
158 +// the GNU General Public License.
161 +// ISO C++ 14882: 22.8 Standard locale categories.
164 +// Written by Benjamin Kosnik <bkoz@redhat.com>
166 +#include <cerrno> // For errno
168 +#include <stdexcept>
169 +#include <langinfo.h>
170 +#include <bits/c++locale_internal.h>
172 +#ifndef __UCLIBC_HAS_XLOCALE__
173 +#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
174 +#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
175 +#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
176 +#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
177 +#define __strtof_l(S, E, L) strtof((S), (E))
178 +#define __strtod_l(S, E, L) strtod((S), (E))
179 +#define __strtold_l(S, E, L) strtold((S), (E))
180 +#warning should dummy __newlocale check for C|POSIX ?
181 +#define __newlocale(a, b, c) NULL
182 +#define __freelocale(a) ((void)0)
183 +#define __duplocale(a) __c_locale()
190 + __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
191 + const __c_locale& __cloc)
193 + if (!(__err & ios_base::failbit))
197 + float __f = __strtof_l(__s, &__sanity, __cloc);
198 + if (__sanity != __s && errno != ERANGE)
201 + __err |= ios_base::failbit;
207 + __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
208 + const __c_locale& __cloc)
210 + if (!(__err & ios_base::failbit))
214 + double __d = __strtod_l(__s, &__sanity, __cloc);
215 + if (__sanity != __s && errno != ERANGE)
218 + __err |= ios_base::failbit;
224 + __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
225 + const __c_locale& __cloc)
227 + if (!(__err & ios_base::failbit))
231 + long double __ld = __strtold_l(__s, &__sanity, __cloc);
232 + if (__sanity != __s && errno != ERANGE)
235 + __err |= ios_base::failbit;
240 + locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
243 + __cloc = __newlocale(1 << LC_ALL, __s, __old);
244 +#ifdef __UCLIBC_HAS_XLOCALE__
247 + // This named locale is not supported by the underlying OS.
248 + __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
249 + "name not valid"));
255 + locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
257 + if (_S_get_c_locale() != __cloc)
258 + __freelocale(__cloc);
262 + locale::facet::_S_clone_c_locale(__c_locale& __cloc)
263 + { return __duplocale(__cloc); }
268 + const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
276 +#if _GLIBCXX_NUM_CATEGORIES != 0
282 + "LC_IDENTIFICATION"
289 + const char* const* const locale::_S_categories = __gnu_cxx::category_names;
291 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h
292 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 18:00:00.000000000 -0600
293 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2005-04-28 01:13:15.000000000 -0500
295 +// Wrapper for underlying C-language localization -*- C++ -*-
297 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
299 +// This file is part of the GNU ISO C++ Library. This library is free
300 +// software; you can redistribute it and/or modify it under the
301 +// terms of the GNU General Public License as published by the
302 +// Free Software Foundation; either version 2, or (at your option)
303 +// any later version.
305 +// This library is distributed in the hope that it will be useful,
306 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
307 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
308 +// GNU General Public License for more details.
310 +// You should have received a copy of the GNU General Public License along
311 +// with this library; see the file COPYING. If not, write to the Free
312 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
315 +// As a special exception, you may use this file as part of a free software
316 +// library without restriction. Specifically, if other files instantiate
317 +// templates or use macros or inline functions from this file, or you compile
318 +// this file and link it with other files to produce an executable, this
319 +// file does not by itself cause the resulting executable to be covered by
320 +// the GNU General Public License. This exception does not however
321 +// invalidate any other reasons why the executable file might be covered by
322 +// the GNU General Public License.
325 +// ISO C++ 14882: 22.8 Standard locale categories.
328 +// Written by Benjamin Kosnik <bkoz@redhat.com>
331 +#define _C_LOCALE_H 1
333 +#pragma GCC system_header
335 +#include <cstring> // get std::strlen
336 +#include <cstdio> // get std::snprintf or std::sprintf
338 +#include <langinfo.h> // For codecvt
339 +#ifdef __UCLIBC_MJN3_ONLY__
342 +#ifdef __UCLIBC_HAS_LOCALE__
343 +#include <iconv.h> // For codecvt using iconv, iconv_t
345 +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
346 +#include <libintl.h> // For messages
349 +#ifdef __UCLIBC_MJN3_ONLY__
350 +#warning what is _GLIBCXX_C_LOCALE_GNU for
352 +#define _GLIBCXX_C_LOCALE_GNU 1
354 +#ifdef __UCLIBC_MJN3_ONLY__
355 +#warning fix categories
357 +// #define _GLIBCXX_NUM_CATEGORIES 6
358 +#define _GLIBCXX_NUM_CATEGORIES 0
360 +#ifdef __UCLIBC_HAS_XLOCALE__
363 + extern "C" __typeof(uselocale) __uselocale;
369 +#ifdef __UCLIBC_HAS_XLOCALE__
370 + typedef __locale_t __c_locale;
372 + typedef int* __c_locale;
375 + // Convert numeric value of type _Tv to string and return length of
376 + // string. If snprintf is available use it, otherwise fall back to
377 + // the unsafe sprintf which, in general, can be dangerous and should
379 + template<typename _Tv>
381 + __convert_from_v(char* __out, const int __size, const char* __fmt,
382 +#ifdef __UCLIBC_HAS_XLOCALE__
383 + _Tv __v, const __c_locale& __cloc, int __prec)
385 + __c_locale __old = __gnu_cxx::__uselocale(__cloc);
387 + _Tv __v, const __c_locale&, int __prec)
389 +# ifdef __UCLIBC_HAS_LOCALE__
390 + char* __old = std::setlocale(LC_ALL, NULL);
391 + char* __sav = new char[std::strlen(__old) + 1];
392 + std::strcpy(__sav, __old);
393 + std::setlocale(LC_ALL, "C");
397 + const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
399 +#ifdef __UCLIBC_HAS_XLOCALE__
400 + __gnu_cxx::__uselocale(__old);
401 +#elif defined __UCLIBC_HAS_LOCALE__
402 + std::setlocale(LC_ALL, __sav);
410 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
411 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 18:00:00.000000000 -0600
412 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2005-04-28 01:13:15.000000000 -0500
414 +// std::codecvt implementation details, GNU version -*- C++ -*-
416 +// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
418 +// This file is part of the GNU ISO C++ Library. This library is free
419 +// software; you can redistribute it and/or modify it under the
420 +// terms of the GNU General Public License as published by the
421 +// Free Software Foundation; either version 2, or (at your option)
422 +// any later version.
424 +// This library is distributed in the hope that it will be useful,
425 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
426 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
427 +// GNU General Public License for more details.
429 +// You should have received a copy of the GNU General Public License along
430 +// with this library; see the file COPYING. If not, write to the Free
431 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
434 +// As a special exception, you may use this file as part of a free software
435 +// library without restriction. Specifically, if other files instantiate
436 +// templates or use macros or inline functions from this file, or you compile
437 +// this file and link it with other files to produce an executable, this
438 +// file does not by itself cause the resulting executable to be covered by
439 +// the GNU General Public License. This exception does not however
440 +// invalidate any other reasons why the executable file might be covered by
441 +// the GNU General Public License.
444 +// ISO C++ 14882: 22.2.1.5 - Template class codecvt
447 +// Written by Benjamin Kosnik <bkoz@redhat.com>
450 +#include <bits/c++locale_internal.h>
454 + // Specializations.
455 +#ifdef _GLIBCXX_USE_WCHAR_T
456 + codecvt_base::result
457 + codecvt<wchar_t, char, mbstate_t>::
458 + do_out(state_type& __state, const intern_type* __from,
459 + const intern_type* __from_end, const intern_type*& __from_next,
460 + extern_type* __to, extern_type* __to_end,
461 + extern_type*& __to_next) const
464 + state_type __tmp_state(__state);
466 +#ifdef __UCLIBC_HAS_XLOCALE__
467 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
470 + // wcsnrtombs is *very* fast but stops if encounters NUL characters:
471 + // in case we fall back to wcrtomb and then continue, in a loop.
472 + // NB: wcsnrtombs is a GNU extension
473 + for (__from_next = __from, __to_next = __to;
474 + __from_next < __from_end && __to_next < __to_end
477 + const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
478 + __from_end - __from_next);
479 + if (!__from_chunk_end)
480 + __from_chunk_end = __from_end;
482 + __from = __from_next;
483 + const size_t __conv = wcsnrtombs(__to_next, &__from_next,
484 + __from_chunk_end - __from_next,
485 + __to_end - __to_next, &__state);
486 + if (__conv == static_cast<size_t>(-1))
488 + // In case of error, in order to stop at the exact place we
489 + // have to start again from the beginning with a series of
491 + for (; __from < __from_next; ++__from)
492 + __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
493 + __state = __tmp_state;
496 + else if (__from_next && __from_next < __from_chunk_end)
498 + __to_next += __conv;
503 + __from_next = __from_chunk_end;
504 + __to_next += __conv;
507 + if (__from_next < __from_end && __ret == ok)
509 + extern_type __buf[MB_LEN_MAX];
510 + __tmp_state = __state;
511 + const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
512 + if (__conv > static_cast<size_t>(__to_end - __to_next))
516 + memcpy(__to_next, __buf, __conv);
517 + __state = __tmp_state;
518 + __to_next += __conv;
524 +#ifdef __UCLIBC_HAS_XLOCALE__
525 + __uselocale(__old);
531 + codecvt_base::result
532 + codecvt<wchar_t, char, mbstate_t>::
533 + do_in(state_type& __state, const extern_type* __from,
534 + const extern_type* __from_end, const extern_type*& __from_next,
535 + intern_type* __to, intern_type* __to_end,
536 + intern_type*& __to_next) const
539 + state_type __tmp_state(__state);
541 +#ifdef __UCLIBC_HAS_XLOCALE__
542 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
545 + // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
546 + // in case we store a L'\0' and then continue, in a loop.
547 + // NB: mbsnrtowcs is a GNU extension
548 + for (__from_next = __from, __to_next = __to;
549 + __from_next < __from_end && __to_next < __to_end
552 + const extern_type* __from_chunk_end;
553 + __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
556 + if (!__from_chunk_end)
557 + __from_chunk_end = __from_end;
559 + __from = __from_next;
560 + size_t __conv = mbsnrtowcs(__to_next, &__from_next,
561 + __from_chunk_end - __from_next,
562 + __to_end - __to_next, &__state);
563 + if (__conv == static_cast<size_t>(-1))
565 + // In case of error, in order to stop at the exact place we
566 + // have to start again from the beginning with a series of
568 + for (;; ++__to_next, __from += __conv)
570 + __conv = mbrtowc(__to_next, __from, __from_end - __from,
572 + if (__conv == static_cast<size_t>(-1)
573 + || __conv == static_cast<size_t>(-2))
576 + __from_next = __from;
577 + __state = __tmp_state;
580 + else if (__from_next && __from_next < __from_chunk_end)
582 + // It is unclear what to return in this case (see DR 382).
583 + __to_next += __conv;
588 + __from_next = __from_chunk_end;
589 + __to_next += __conv;
592 + if (__from_next < __from_end && __ret == ok)
594 + if (__to_next < __to_end)
596 + // XXX Probably wrong for stateful encodings
597 + __tmp_state = __state;
599 + *__to_next++ = L'\0';
606 +#ifdef __UCLIBC_HAS_XLOCALE__
607 + __uselocale(__old);
614 + codecvt<wchar_t, char, mbstate_t>::
615 + do_encoding() const throw()
617 + // XXX This implementation assumes that the encoding is
618 + // stateless and is either single-byte or variable-width.
620 +#ifdef __UCLIBC_HAS_XLOCALE__
621 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
623 + if (MB_CUR_MAX == 1)
625 +#ifdef __UCLIBC_HAS_XLOCALE__
626 + __uselocale(__old);
632 + codecvt<wchar_t, char, mbstate_t>::
633 + do_max_length() const throw()
635 +#ifdef __UCLIBC_HAS_XLOCALE__
636 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
638 + // XXX Probably wrong for stateful encodings.
639 + int __ret = MB_CUR_MAX;
640 +#ifdef __UCLIBC_HAS_XLOCALE__
641 + __uselocale(__old);
647 + codecvt<wchar_t, char, mbstate_t>::
648 + do_length(state_type& __state, const extern_type* __from,
649 + const extern_type* __end, size_t __max) const
652 + state_type __tmp_state(__state);
654 +#ifdef __UCLIBC_HAS_XLOCALE__
655 + __c_locale __old = __uselocale(_M_c_locale_codecvt);
658 + // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
659 + // in case we advance past it and then continue, in a loop.
660 + // NB: mbsnrtowcs is a GNU extension
662 + // A dummy internal buffer is needed in order for mbsnrtocws to consider
663 + // its fourth parameter (it wouldn't with NULL as first parameter).
664 + wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
666 + while (__from < __end && __max)
668 + const extern_type* __from_chunk_end;
669 + __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
672 + if (!__from_chunk_end)
673 + __from_chunk_end = __end;
675 + const extern_type* __tmp_from = __from;
676 + size_t __conv = mbsnrtowcs(__to, &__from,
677 + __from_chunk_end - __from,
679 + if (__conv == static_cast<size_t>(-1))
681 + // In case of error, in order to stop at the exact place we
682 + // have to start again from the beginning with a series of
684 + for (__from = __tmp_from;; __from += __conv)
686 + __conv = mbrtowc(NULL, __from, __end - __from,
688 + if (__conv == static_cast<size_t>(-1)
689 + || __conv == static_cast<size_t>(-2))
692 + __state = __tmp_state;
693 + __ret += __from - __tmp_from;
697 + __from = __from_chunk_end;
699 + __ret += __from - __tmp_from;
702 + if (__from < __end && __max)
704 + // XXX Probably wrong for stateful encodings
705 + __tmp_state = __state;
712 +#ifdef __UCLIBC_HAS_XLOCALE__
713 + __uselocale(__old);
720 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
721 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 18:00:00.000000000 -0600
722 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 2005-04-28 01:13:15.000000000 -0500
724 +// std::collate implementation details, GNU version -*- C++ -*-
726 +// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
728 +// This file is part of the GNU ISO C++ Library. This library is free
729 +// software; you can redistribute it and/or modify it under the
730 +// terms of the GNU General Public License as published by the
731 +// Free Software Foundation; either version 2, or (at your option)
732 +// any later version.
734 +// This library is distributed in the hope that it will be useful,
735 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
736 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
737 +// GNU General Public License for more details.
739 +// You should have received a copy of the GNU General Public License along
740 +// with this library; see the file COPYING. If not, write to the Free
741 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
744 +// As a special exception, you may use this file as part of a free software
745 +// library without restriction. Specifically, if other files instantiate
746 +// templates or use macros or inline functions from this file, or you compile
747 +// this file and link it with other files to produce an executable, this
748 +// file does not by itself cause the resulting executable to be covered by
749 +// the GNU General Public License. This exception does not however
750 +// invalidate any other reasons why the executable file might be covered by
751 +// the GNU General Public License.
754 +// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
757 +// Written by Benjamin Kosnik <bkoz@redhat.com>
760 +#include <bits/c++locale_internal.h>
762 +#ifndef __UCLIBC_HAS_XLOCALE__
763 +#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
764 +#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
765 +#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
766 +#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
771 + // These are basically extensions to char_traits, and perhaps should
772 + // be put there instead of here.
775 + collate<char>::_M_compare(const char* __one, const char* __two) const
777 + int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
778 + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
783 + collate<char>::_M_transform(char* __to, const char* __from,
785 + { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
787 +#ifdef _GLIBCXX_USE_WCHAR_T
790 + collate<wchar_t>::_M_compare(const wchar_t* __one,
791 + const wchar_t* __two) const
793 + int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
794 + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
799 + collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
801 + { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
804 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
805 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 18:00:00.000000000 -0600
806 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2005-04-28 01:13:15.000000000 -0500
808 +// std::ctype implementation details, GNU version -*- C++ -*-
810 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
812 +// This file is part of the GNU ISO C++ Library. This library is free
813 +// software; you can redistribute it and/or modify it under the
814 +// terms of the GNU General Public License as published by the
815 +// Free Software Foundation; either version 2, or (at your option)
816 +// any later version.
818 +// This library is distributed in the hope that it will be useful,
819 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
820 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
821 +// GNU General Public License for more details.
823 +// You should have received a copy of the GNU General Public License along
824 +// with this library; see the file COPYING. If not, write to the Free
825 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
828 +// As a special exception, you may use this file as part of a free software
829 +// library without restriction. Specifically, if other files instantiate
830 +// templates or use macros or inline functions from this file, or you compile
831 +// this file and link it with other files to produce an executable, this
832 +// file does not by itself cause the resulting executable to be covered by
833 +// the GNU General Public License. This exception does not however
834 +// invalidate any other reasons why the executable file might be covered by
835 +// the GNU General Public License.
838 +// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
841 +// Written by Benjamin Kosnik <bkoz@redhat.com>
846 +#include <bits/c++locale_internal.h>
848 +#ifndef __UCLIBC_HAS_XLOCALE__
849 +#define __wctype_l(S, L) wctype((S))
850 +#define __towupper_l(C, L) towupper((C))
851 +#define __towlower_l(C, L) towlower((C))
852 +#define __iswctype_l(C, M, L) iswctype((C), (M))
857 + // NB: The other ctype<char> specializations are in src/locale.cc and
858 + // various /config/os/* files.
860 + ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
861 + : ctype<char>(0, false, __refs)
863 + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
865 + this->_S_destroy_c_locale(this->_M_c_locale_ctype);
866 + this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
867 +#ifdef __UCLIBC_HAS_XLOCALE__
868 + this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
869 + this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
870 + this->_M_table = this->_M_c_locale_ctype->__ctype_b;
875 +#ifdef _GLIBCXX_USE_WCHAR_T
876 + ctype<wchar_t>::__wmask_type
877 + ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
879 + __wmask_type __ret;
883 + __ret = __wctype_l("space", _M_c_locale_ctype);
886 + __ret = __wctype_l("print", _M_c_locale_ctype);
889 + __ret = __wctype_l("cntrl", _M_c_locale_ctype);
892 + __ret = __wctype_l("upper", _M_c_locale_ctype);
895 + __ret = __wctype_l("lower", _M_c_locale_ctype);
898 + __ret = __wctype_l("alpha", _M_c_locale_ctype);
901 + __ret = __wctype_l("digit", _M_c_locale_ctype);
904 + __ret = __wctype_l("punct", _M_c_locale_ctype);
907 + __ret = __wctype_l("xdigit", _M_c_locale_ctype);
910 + __ret = __wctype_l("alnum", _M_c_locale_ctype);
913 + __ret = __wctype_l("graph", _M_c_locale_ctype);
916 + __ret = __wmask_type();
922 + ctype<wchar_t>::do_toupper(wchar_t __c) const
923 + { return __towupper_l(__c, _M_c_locale_ctype); }
926 + ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
928 + while (__lo < __hi)
930 + *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
937 + ctype<wchar_t>::do_tolower(wchar_t __c) const
938 + { return __towlower_l(__c, _M_c_locale_ctype); }
941 + ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
943 + while (__lo < __hi)
945 + *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
953 + do_is(mask __m, wchar_t __c) const
955 + // Highest bitmask in ctype_base == 10, but extra in "C"
956 + // library for blank.
957 + bool __ret = false;
958 + const size_t __bitmasksize = 11;
959 + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
960 + if (__m & _M_bit[__bitcur]
961 + && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
971 + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
973 + for (; __lo < __hi; ++__vec, ++__lo)
975 + // Highest bitmask in ctype_base == 10, but extra in "C"
976 + // library for blank.
977 + const size_t __bitmasksize = 11;
979 + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
980 + if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
981 + __m |= _M_bit[__bitcur];
989 + do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
991 + while (__lo < __hi && !this->do_is(__m, *__lo))
998 + do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
1000 + while (__lo < __hi && this->do_is(__m, *__lo) != 0)
1007 + do_widen(char __c) const
1008 + { return _M_widen[static_cast<unsigned char>(__c)]; }
1012 + do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
1014 + while (__lo < __hi)
1016 + *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
1025 + do_narrow(wchar_t __wc, char __dfault) const
1027 + if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
1028 + return _M_narrow[__wc];
1029 +#ifdef __UCLIBC_HAS_XLOCALE__
1030 + __c_locale __old = __uselocale(_M_c_locale_ctype);
1032 + const int __c = wctob(__wc);
1033 +#ifdef __UCLIBC_HAS_XLOCALE__
1034 + __uselocale(__old);
1036 + return (__c == EOF ? __dfault : static_cast<char>(__c));
1041 + do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
1042 + char* __dest) const
1044 +#ifdef __UCLIBC_HAS_XLOCALE__
1045 + __c_locale __old = __uselocale(_M_c_locale_ctype);
1048 + while (__lo < __hi)
1050 + if (*__lo >= 0 && *__lo < 128)
1051 + *__dest = _M_narrow[*__lo];
1054 + const int __c = wctob(*__lo);
1055 + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
1061 + while (__lo < __hi)
1063 + const int __c = wctob(*__lo);
1064 + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
1068 +#ifdef __UCLIBC_HAS_XLOCALE__
1069 + __uselocale(__old);
1075 + ctype<wchar_t>::_M_initialize_ctype()
1077 +#ifdef __UCLIBC_HAS_XLOCALE__
1078 + __c_locale __old = __uselocale(_M_c_locale_ctype);
1081 + for (__i = 0; __i < 128; ++__i)
1083 + const int __c = wctob(__i);
1087 + _M_narrow[__i] = static_cast<char>(__c);
1090 + _M_narrow_ok = true;
1092 + _M_narrow_ok = false;
1093 + for (size_t __j = 0;
1094 + __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
1095 + _M_widen[__j] = btowc(__j);
1097 + for (size_t __k = 0; __k <= 11; ++__k)
1099 + _M_bit[__k] = static_cast<mask>(_ISbit(__k));
1100 + _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
1102 +#ifdef __UCLIBC_HAS_XLOCALE__
1103 + __uselocale(__old);
1106 +#endif // _GLIBCXX_USE_WCHAR_T
1108 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
1109 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 18:00:00.000000000 -0600
1110 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 2005-04-28 01:13:15.000000000 -0500
1112 +// std::messages implementation details, GNU version -*- C++ -*-
1114 +// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
1116 +// This file is part of the GNU ISO C++ Library. This library is free
1117 +// software; you can redistribute it and/or modify it under the
1118 +// terms of the GNU General Public License as published by the
1119 +// Free Software Foundation; either version 2, or (at your option)
1120 +// any later version.
1122 +// This library is distributed in the hope that it will be useful,
1123 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1124 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1125 +// GNU General Public License for more details.
1127 +// You should have received a copy of the GNU General Public License along
1128 +// with this library; see the file COPYING. If not, write to the Free
1129 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1132 +// As a special exception, you may use this file as part of a free software
1133 +// library without restriction. Specifically, if other files instantiate
1134 +// templates or use macros or inline functions from this file, or you compile
1135 +// this file and link it with other files to produce an executable, this
1136 +// file does not by itself cause the resulting executable to be covered by
1137 +// the GNU General Public License. This exception does not however
1138 +// invalidate any other reasons why the executable file might be covered by
1139 +// the GNU General Public License.
1142 +// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
1145 +// Written by Benjamin Kosnik <bkoz@redhat.com>
1148 +#include <bits/c++locale_internal.h>
1150 +#ifdef __UCLIBC_MJN3_ONLY__
1151 +#warning fix gettext stuff
1153 +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1154 +extern "C" char *__dcgettext(const char *domainname,
1155 + const char *msgid, int category);
1157 +#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
1160 +#define gettext(msgid) (msgid)
1165 + // Specializations.
1168 + messages<char>::do_get(catalog, int, int, const string& __dfault) const
1170 +#ifdef __UCLIBC_HAS_XLOCALE__
1171 + __c_locale __old = __uselocale(_M_c_locale_messages);
1172 + const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
1173 + __uselocale(__old);
1174 + return string(__msg);
1175 +#elif defined __UCLIBC_HAS_LOCALE__
1176 + char* __old = strdup(setlocale(LC_ALL, NULL));
1177 + setlocale(LC_ALL, _M_name_messages);
1178 + const char* __msg = gettext(__dfault.c_str());
1179 + setlocale(LC_ALL, __old);
1181 + return string(__msg);
1183 + const char* __msg = gettext(__dfault.c_str());
1184 + return string(__msg);
1188 +#ifdef _GLIBCXX_USE_WCHAR_T
1191 + messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
1193 +# ifdef __UCLIBC_HAS_XLOCALE__
1194 + __c_locale __old = __uselocale(_M_c_locale_messages);
1195 + char* __msg = gettext(_M_convert_to_char(__dfault));
1196 + __uselocale(__old);
1197 + return _M_convert_from_char(__msg);
1198 +# elif defined __UCLIBC_HAS_LOCALE__
1199 + char* __old = strdup(setlocale(LC_ALL, NULL));
1200 + setlocale(LC_ALL, _M_name_messages);
1201 + char* __msg = gettext(_M_convert_to_char(__dfault));
1202 + setlocale(LC_ALL, __old);
1204 + return _M_convert_from_char(__msg);
1206 + char* __msg = gettext(_M_convert_to_char(__dfault));
1207 + return _M_convert_from_char(__msg);
1212 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h
1213 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 18:00:00.000000000 -0600
1214 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2005-04-28 01:13:15.000000000 -0500
1216 +// std::messages implementation details, GNU version -*- C++ -*-
1218 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1220 +// This file is part of the GNU ISO C++ Library. This library is free
1221 +// software; you can redistribute it and/or modify it under the
1222 +// terms of the GNU General Public License as published by the
1223 +// Free Software Foundation; either version 2, or (at your option)
1224 +// any later version.
1226 +// This library is distributed in the hope that it will be useful,
1227 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1228 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1229 +// GNU General Public License for more details.
1231 +// You should have received a copy of the GNU General Public License along
1232 +// with this library; see the file COPYING. If not, write to the Free
1233 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1236 +// As a special exception, you may use this file as part of a free software
1237 +// library without restriction. Specifically, if other files instantiate
1238 +// templates or use macros or inline functions from this file, or you compile
1239 +// this file and link it with other files to produce an executable, this
1240 +// file does not by itself cause the resulting executable to be covered by
1241 +// the GNU General Public License. This exception does not however
1242 +// invalidate any other reasons why the executable file might be covered by
1243 +// the GNU General Public License.
1246 +// ISO C++ 14882: 22.2.7.1.2 messages functions
1249 +// Written by Benjamin Kosnik <bkoz@redhat.com>
1251 +#ifdef __UCLIBC_MJN3_ONLY__
1252 +#warning fix prototypes for *textdomain funcs
1254 +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1255 +extern "C" char *__textdomain(const char *domainname);
1256 +extern "C" char *__bindtextdomain(const char *domainname,
1257 + const char *dirname);
1259 +#undef __textdomain
1260 +#undef __bindtextdomain
1261 +#define __textdomain(D) ((void)0)
1262 +#define __bindtextdomain(D,P) ((void)0)
1265 + // Non-virtual member functions.
1266 + template<typename _CharT>
1267 + messages<_CharT>::messages(size_t __refs)
1268 + : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
1269 + _M_name_messages(_S_get_c_name())
1272 + template<typename _CharT>
1273 + messages<_CharT>::messages(__c_locale __cloc, const char* __s,
1275 + : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
1276 + _M_name_messages(__s)
1278 + char* __tmp = new char[std::strlen(__s) + 1];
1279 + std::strcpy(__tmp, __s);
1280 + _M_name_messages = __tmp;
1283 + template<typename _CharT>
1284 + typename messages<_CharT>::catalog
1285 + messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
1286 + const char* __dir) const
1288 + __bindtextdomain(__s.c_str(), __dir);
1289 + return this->do_open(__s, __loc);
1292 + // Virtual member functions.
1293 + template<typename _CharT>
1294 + messages<_CharT>::~messages()
1296 + if (_M_name_messages != _S_get_c_name())
1297 + delete [] _M_name_messages;
1298 + _S_destroy_c_locale(_M_c_locale_messages);
1301 + template<typename _CharT>
1302 + typename messages<_CharT>::catalog
1303 + messages<_CharT>::do_open(const basic_string<char>& __s,
1304 + const locale&) const
1306 + // No error checking is done, assume the catalog exists and can
1308 + __textdomain(__s.c_str());
1312 + template<typename _CharT>
1314 + messages<_CharT>::do_close(catalog) const
1317 + // messages_byname
1318 + template<typename _CharT>
1319 + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
1320 + : messages<_CharT>(__refs)
1322 + if (this->_M_name_messages != locale::facet::_S_get_c_name())
1323 + delete [] this->_M_name_messages;
1324 + char* __tmp = new char[std::strlen(__s) + 1];
1325 + std::strcpy(__tmp, __s);
1326 + this->_M_name_messages = __tmp;
1328 + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
1330 + this->_S_destroy_c_locale(this->_M_c_locale_messages);
1331 + this->_S_create_c_locale(this->_M_c_locale_messages, __s);
1334 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
1335 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 18:00:00.000000000 -0600
1336 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2005-04-28 01:23:02.000000000 -0500
1338 +// std::moneypunct implementation details, GNU version -*- C++ -*-
1340 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1342 +// This file is part of the GNU ISO C++ Library. This library is free
1343 +// software; you can redistribute it and/or modify it under the
1344 +// terms of the GNU General Public License as published by the
1345 +// Free Software Foundation; either version 2, or (at your option)
1346 +// any later version.
1348 +// This library is distributed in the hope that it will be useful,
1349 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1350 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1351 +// GNU General Public License for more details.
1353 +// You should have received a copy of the GNU General Public License along
1354 +// with this library; see the file COPYING. If not, write to the Free
1355 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1358 +// As a special exception, you may use this file as part of a free software
1359 +// library without restriction. Specifically, if other files instantiate
1360 +// templates or use macros or inline functions from this file, or you compile
1361 +// this file and link it with other files to produce an executable, this
1362 +// file does not by itself cause the resulting executable to be covered by
1363 +// the GNU General Public License. This exception does not however
1364 +// invalidate any other reasons why the executable file might be covered by
1365 +// the GNU General Public License.
1368 +// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
1371 +// Written by Benjamin Kosnik <bkoz@redhat.com>
1376 +#include <bits/c++locale_internal.h>
1378 +#ifdef __UCLIBC_MJN3_ONLY__
1379 +#warning optimize this for uclibc
1380 +#warning tailor for stub locale support
1383 +#ifndef __UCLIBC_HAS_XLOCALE__
1384 +#define __nl_langinfo_l(N, L) nl_langinfo((N))
1389 + // Construct and return valid pattern consisting of some combination of:
1390 + // space none symbol sign value
1391 + money_base::pattern
1392 + money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
1396 + // This insanely complicated routine attempts to construct a valid
1397 + // pattern for use with monyepunct. A couple of invariants:
1399 + // if (__precedes) symbol -> value
1400 + // else value -> symbol
1402 + // if (__space) space
1405 + // none == never first
1406 + // space never first or last
1408 + // Any elegant implementations of this are welcome.
1413 + // 1 The sign precedes the value and symbol.
1414 + __ret.field[0] = sign;
1417 + // Pattern starts with sign.
1420 + __ret.field[1] = symbol;
1421 + __ret.field[3] = value;
1425 + __ret.field[1] = value;
1426 + __ret.field[3] = symbol;
1428 + __ret.field[2] = space;
1432 + // Pattern starts with sign and ends with none.
1435 + __ret.field[1] = symbol;
1436 + __ret.field[2] = value;
1440 + __ret.field[1] = value;
1441 + __ret.field[2] = symbol;
1443 + __ret.field[3] = none;
1447 + // 2 The sign follows the value and symbol.
1450 + // Pattern either ends with sign.
1453 + __ret.field[0] = symbol;
1454 + __ret.field[2] = value;
1458 + __ret.field[0] = value;
1459 + __ret.field[2] = symbol;
1461 + __ret.field[1] = space;
1462 + __ret.field[3] = sign;
1466 + // Pattern ends with sign then none.
1469 + __ret.field[0] = symbol;
1470 + __ret.field[1] = value;
1474 + __ret.field[0] = value;
1475 + __ret.field[1] = symbol;
1477 + __ret.field[2] = sign;
1478 + __ret.field[3] = none;
1482 + // 3 The sign immediately precedes the symbol.
1485 + __ret.field[0] = sign;
1486 + __ret.field[1] = symbol;
1489 + __ret.field[2] = space;
1490 + __ret.field[3] = value;
1494 + __ret.field[2] = value;
1495 + __ret.field[3] = none;
1500 + __ret.field[0] = value;
1503 + __ret.field[1] = space;
1504 + __ret.field[2] = sign;
1505 + __ret.field[3] = symbol;
1509 + __ret.field[1] = sign;
1510 + __ret.field[2] = symbol;
1511 + __ret.field[3] = none;
1516 + // 4 The sign immediately follows the symbol.
1519 + __ret.field[0] = symbol;
1520 + __ret.field[1] = sign;
1523 + __ret.field[2] = space;
1524 + __ret.field[3] = value;
1528 + __ret.field[2] = value;
1529 + __ret.field[3] = none;
1534 + __ret.field[0] = value;
1537 + __ret.field[1] = space;
1538 + __ret.field[2] = symbol;
1539 + __ret.field[3] = sign;
1543 + __ret.field[1] = symbol;
1544 + __ret.field[2] = sign;
1545 + __ret.field[3] = none;
1550 + __ret = pattern();
1557 + moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
1561 + _M_data = new __moneypunct_cache<char, true>;
1566 + _M_data->_M_decimal_point = '.';
1567 + _M_data->_M_thousands_sep = ',';
1568 + _M_data->_M_grouping = "";
1569 + _M_data->_M_grouping_size = 0;
1570 + _M_data->_M_curr_symbol = "";
1571 + _M_data->_M_curr_symbol_size = 0;
1572 + _M_data->_M_positive_sign = "";
1573 + _M_data->_M_positive_sign_size = 0;
1574 + _M_data->_M_negative_sign = "";
1575 + _M_data->_M_negative_sign_size = 0;
1576 + _M_data->_M_frac_digits = 0;
1577 + _M_data->_M_pos_format = money_base::_S_default_pattern;
1578 + _M_data->_M_neg_format = money_base::_S_default_pattern;
1580 + for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1581 + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
1586 + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
1588 + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
1590 + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1591 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1592 + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1593 + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
1595 + char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
1597 + _M_data->_M_negative_sign = "()";
1599 + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
1601 + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
1604 + _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1605 + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
1606 + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
1608 + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
1609 + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
1610 + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
1611 + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1613 + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
1614 + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
1615 + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1622 + moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
1626 + _M_data = new __moneypunct_cache<char, false>;
1631 + _M_data->_M_decimal_point = '.';
1632 + _M_data->_M_thousands_sep = ',';
1633 + _M_data->_M_grouping = "";
1634 + _M_data->_M_grouping_size = 0;
1635 + _M_data->_M_curr_symbol = "";
1636 + _M_data->_M_curr_symbol_size = 0;
1637 + _M_data->_M_positive_sign = "";
1638 + _M_data->_M_positive_sign_size = 0;
1639 + _M_data->_M_negative_sign = "";
1640 + _M_data->_M_negative_sign_size = 0;
1641 + _M_data->_M_frac_digits = 0;
1642 + _M_data->_M_pos_format = money_base::_S_default_pattern;
1643 + _M_data->_M_neg_format = money_base::_S_default_pattern;
1645 + for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1646 + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
1651 + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
1653 + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
1655 + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1656 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1657 + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1658 + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
1660 + char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
1662 + _M_data->_M_negative_sign = "()";
1664 + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
1666 + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
1669 + _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
1670 + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
1671 + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
1672 + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
1673 + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
1674 + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
1675 + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1677 + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
1678 + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
1679 + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1685 + moneypunct<char, true>::~moneypunct()
1686 + { delete _M_data; }
1689 + moneypunct<char, false>::~moneypunct()
1690 + { delete _M_data; }
1692 +#ifdef _GLIBCXX_USE_WCHAR_T
1695 + moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
1696 +#ifdef __UCLIBC_HAS_XLOCALE__
1699 + const char* __name)
1703 + _M_data = new __moneypunct_cache<wchar_t, true>;
1708 + _M_data->_M_decimal_point = L'.';
1709 + _M_data->_M_thousands_sep = L',';
1710 + _M_data->_M_grouping = "";
1711 + _M_data->_M_grouping_size = 0;
1712 + _M_data->_M_curr_symbol = L"";
1713 + _M_data->_M_curr_symbol_size = 0;
1714 + _M_data->_M_positive_sign = L"";
1715 + _M_data->_M_positive_sign_size = 0;
1716 + _M_data->_M_negative_sign = L"";
1717 + _M_data->_M_negative_sign_size = 0;
1718 + _M_data->_M_frac_digits = 0;
1719 + _M_data->_M_pos_format = money_base::_S_default_pattern;
1720 + _M_data->_M_neg_format = money_base::_S_default_pattern;
1722 + // Use ctype::widen code without the facet...
1723 + for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1724 + _M_data->_M_atoms[__i] =
1725 + static_cast<wchar_t>(money_base::_S_atoms[__i]);
1730 +#ifdef __UCLIBC_HAS_XLOCALE__
1731 + __c_locale __old = __uselocale(__cloc);
1733 + // Switch to named locale so that mbsrtowcs will work.
1734 + char* __old = strdup(setlocale(LC_ALL, NULL));
1735 + setlocale(LC_ALL, __name);
1738 +#ifdef __UCLIBC_MJN3_ONLY__
1739 +#warning fix this... should be monetary
1742 +# ifdef __UCLIBC_HAS_XLOCALE__
1743 + _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1744 + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1746 + _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1747 + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1750 + union { char *__s; wchar_t __w; } __u;
1751 + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
1752 + _M_data->_M_decimal_point = __u.__w;
1754 + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
1755 + _M_data->_M_thousands_sep = __u.__w;
1757 + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1758 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1760 + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1761 + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1762 + const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1764 + wchar_t* __wcs_ps = 0;
1765 + wchar_t* __wcs_ns = 0;
1766 + const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
1769 + mbstate_t __state;
1770 + size_t __len = strlen(__cpossign);
1774 + memset(&__state, 0, sizeof(mbstate_t));
1775 + __wcs_ps = new wchar_t[__len];
1776 + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
1777 + _M_data->_M_positive_sign = __wcs_ps;
1780 + _M_data->_M_positive_sign = L"";
1781 + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
1783 + __len = strlen(__cnegsign);
1785 + _M_data->_M_negative_sign = L"()";
1789 + memset(&__state, 0, sizeof(mbstate_t));
1790 + __wcs_ns = new wchar_t[__len];
1791 + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
1792 + _M_data->_M_negative_sign = __wcs_ns;
1795 + _M_data->_M_negative_sign = L"";
1796 + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
1799 + __len = strlen(__ccurr);
1803 + memset(&__state, 0, sizeof(mbstate_t));
1804 + wchar_t* __wcs = new wchar_t[__len];
1805 + mbsrtowcs(__wcs, &__ccurr, __len, &__state);
1806 + _M_data->_M_curr_symbol = __wcs;
1809 + _M_data->_M_curr_symbol = L"";
1810 + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
1818 +#ifdef __UCLIBC_HAS_XLOCALE__
1819 + __uselocale(__old);
1821 + setlocale(LC_ALL, __old);
1824 + __throw_exception_again;
1827 + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
1829 + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
1830 + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
1831 + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
1832 + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1834 + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
1835 + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
1836 + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1839 +#ifdef __UCLIBC_HAS_XLOCALE__
1840 + __uselocale(__old);
1842 + setlocale(LC_ALL, __old);
1850 + moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
1851 +#ifdef __UCLIBC_HAS_XLOCALE__
1854 + const char* __name)
1858 + _M_data = new __moneypunct_cache<wchar_t, false>;
1863 + _M_data->_M_decimal_point = L'.';
1864 + _M_data->_M_thousands_sep = L',';
1865 + _M_data->_M_grouping = "";
1866 + _M_data->_M_grouping_size = 0;
1867 + _M_data->_M_curr_symbol = L"";
1868 + _M_data->_M_curr_symbol_size = 0;
1869 + _M_data->_M_positive_sign = L"";
1870 + _M_data->_M_positive_sign_size = 0;
1871 + _M_data->_M_negative_sign = L"";
1872 + _M_data->_M_negative_sign_size = 0;
1873 + _M_data->_M_frac_digits = 0;
1874 + _M_data->_M_pos_format = money_base::_S_default_pattern;
1875 + _M_data->_M_neg_format = money_base::_S_default_pattern;
1877 + // Use ctype::widen code without the facet...
1878 + for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1879 + _M_data->_M_atoms[__i] =
1880 + static_cast<wchar_t>(money_base::_S_atoms[__i]);
1885 +#ifdef __UCLIBC_HAS_XLOCALE__
1886 + __c_locale __old = __uselocale(__cloc);
1888 + // Switch to named locale so that mbsrtowcs will work.
1889 + char* __old = strdup(setlocale(LC_ALL, NULL));
1890 + setlocale(LC_ALL, __name);
1893 +#ifdef __UCLIBC_MJN3_ONLY__
1894 +#warning fix this... should be monetary
1897 +# ifdef __UCLIBC_HAS_XLOCALE__
1898 + _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1899 + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1901 + _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1902 + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1905 + union { char *__s; wchar_t __w; } __u;
1906 + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
1907 + _M_data->_M_decimal_point = __u.__w;
1909 + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
1910 + _M_data->_M_thousands_sep = __u.__w;
1912 + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1913 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1915 + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1916 + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1917 + const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
1919 + wchar_t* __wcs_ps = 0;
1920 + wchar_t* __wcs_ns = 0;
1921 + const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
1924 + mbstate_t __state;
1926 + __len = strlen(__cpossign);
1930 + memset(&__state, 0, sizeof(mbstate_t));
1931 + __wcs_ps = new wchar_t[__len];
1932 + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
1933 + _M_data->_M_positive_sign = __wcs_ps;
1936 + _M_data->_M_positive_sign = L"";
1937 + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
1939 + __len = strlen(__cnegsign);
1941 + _M_data->_M_negative_sign = L"()";
1945 + memset(&__state, 0, sizeof(mbstate_t));
1946 + __wcs_ns = new wchar_t[__len];
1947 + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
1948 + _M_data->_M_negative_sign = __wcs_ns;
1951 + _M_data->_M_negative_sign = L"";
1952 + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
1955 + __len = strlen(__ccurr);
1959 + memset(&__state, 0, sizeof(mbstate_t));
1960 + wchar_t* __wcs = new wchar_t[__len];
1961 + mbsrtowcs(__wcs, &__ccurr, __len, &__state);
1962 + _M_data->_M_curr_symbol = __wcs;
1965 + _M_data->_M_curr_symbol = L"";
1966 + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
1974 +#ifdef __UCLIBC_HAS_XLOCALE__
1975 + __uselocale(__old);
1977 + setlocale(LC_ALL, __old);
1980 + __throw_exception_again;
1983 + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
1984 + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
1985 + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
1986 + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
1987 + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1989 + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
1990 + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
1991 + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1994 +#ifdef __UCLIBC_HAS_XLOCALE__
1995 + __uselocale(__old);
1997 + setlocale(LC_ALL, __old);
2004 + moneypunct<wchar_t, true>::~moneypunct()
2006 + if (_M_data->_M_positive_sign_size)
2007 + delete [] _M_data->_M_positive_sign;
2008 + if (_M_data->_M_negative_sign_size
2009 + && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
2010 + delete [] _M_data->_M_negative_sign;
2011 + if (_M_data->_M_curr_symbol_size)
2012 + delete [] _M_data->_M_curr_symbol;
2017 + moneypunct<wchar_t, false>::~moneypunct()
2019 + if (_M_data->_M_positive_sign_size)
2020 + delete [] _M_data->_M_positive_sign;
2021 + if (_M_data->_M_negative_sign_size
2022 + && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
2023 + delete [] _M_data->_M_negative_sign;
2024 + if (_M_data->_M_curr_symbol_size)
2025 + delete [] _M_data->_M_curr_symbol;
2030 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
2031 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 18:00:00.000000000 -0600
2032 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2005-04-28 01:20:20.000000000 -0500
2034 +// std::numpunct implementation details, GNU version -*- C++ -*-
2036 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2038 +// This file is part of the GNU ISO C++ Library. This library is free
2039 +// software; you can redistribute it and/or modify it under the
2040 +// terms of the GNU General Public License as published by the
2041 +// Free Software Foundation; either version 2, or (at your option)
2042 +// any later version.
2044 +// This library is distributed in the hope that it will be useful,
2045 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2046 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2047 +// GNU General Public License for more details.
2049 +// You should have received a copy of the GNU General Public License along
2050 +// with this library; see the file COPYING. If not, write to the Free
2051 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2054 +// As a special exception, you may use this file as part of a free software
2055 +// library without restriction. Specifically, if other files instantiate
2056 +// templates or use macros or inline functions from this file, or you compile
2057 +// this file and link it with other files to produce an executable, this
2058 +// file does not by itself cause the resulting executable to be covered by
2059 +// the GNU General Public License. This exception does not however
2060 +// invalidate any other reasons why the executable file might be covered by
2061 +// the GNU General Public License.
2064 +// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
2067 +// Written by Benjamin Kosnik <bkoz@redhat.com>
2072 +#include <bits/c++locale_internal.h>
2074 +#ifdef __UCLIBC_MJN3_ONLY__
2075 +#warning tailor for stub locale support
2077 +#ifndef __UCLIBC_HAS_XLOCALE__
2078 +#define __nl_langinfo_l(N, L) nl_langinfo((N))
2085 + numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
2088 + _M_data = new __numpunct_cache<char>;
2093 + _M_data->_M_grouping = "";
2094 + _M_data->_M_grouping_size = 0;
2095 + _M_data->_M_use_grouping = false;
2097 + _M_data->_M_decimal_point = '.';
2098 + _M_data->_M_thousands_sep = ',';
2100 + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
2101 + _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
2103 + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
2104 + _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
2109 + _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
2111 + _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
2114 + // Check for NULL, which implies no grouping.
2115 + if (_M_data->_M_thousands_sep == '\0')
2116 + _M_data->_M_grouping = "";
2118 + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2119 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
2122 + // NB: There is no way to extact this info from posix locales.
2123 + // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2124 + _M_data->_M_truename = "true";
2125 + _M_data->_M_truename_size = 4;
2126 + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2127 + _M_data->_M_falsename = "false";
2128 + _M_data->_M_falsename_size = 5;
2132 + numpunct<char>::~numpunct()
2133 + { delete _M_data; }
2135 +#ifdef _GLIBCXX_USE_WCHAR_T
2138 + numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
2141 + _M_data = new __numpunct_cache<wchar_t>;
2146 + _M_data->_M_grouping = "";
2147 + _M_data->_M_grouping_size = 0;
2148 + _M_data->_M_use_grouping = false;
2150 + _M_data->_M_decimal_point = L'.';
2151 + _M_data->_M_thousands_sep = L',';
2153 + // Use ctype::widen code without the facet...
2154 + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
2155 + _M_data->_M_atoms_out[__i] =
2156 + static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
2158 + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
2159 + _M_data->_M_atoms_in[__j] =
2160 + static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
2165 + // NB: In the GNU model wchar_t is always 32 bit wide.
2166 +#ifdef __UCLIBC_MJN3_ONLY__
2170 +# ifdef __UCLIBC_HAS_XLOCALE__
2171 + _M_data->_M_decimal_point = __cloc->decimal_point_wc;
2172 + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
2174 + _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
2175 + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
2178 + union { char *__s; wchar_t __w; } __u;
2179 + __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
2180 + _M_data->_M_decimal_point = __u.__w;
2182 + __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
2183 + _M_data->_M_thousands_sep = __u.__w;
2186 + if (_M_data->_M_thousands_sep == L'\0')
2187 + _M_data->_M_grouping = "";
2189 + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2190 + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
2193 + // NB: There is no way to extact this info from posix locales.
2194 + // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2195 + _M_data->_M_truename = L"true";
2196 + _M_data->_M_truename_size = 4;
2197 + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2198 + _M_data->_M_falsename = L"false";
2199 + _M_data->_M_falsename_size = 5;
2203 + numpunct<wchar_t>::~numpunct()
2204 + { delete _M_data; }
2207 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc
2208 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 18:00:00.000000000 -0600
2209 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc 2005-04-28 01:13:15.000000000 -0500
2211 +// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2213 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2215 +// This file is part of the GNU ISO C++ Library. This library is free
2216 +// software; you can redistribute it and/or modify it under the
2217 +// terms of the GNU General Public License as published by the
2218 +// Free Software Foundation; either version 2, or (at your option)
2219 +// any later version.
2221 +// This library is distributed in the hope that it will be useful,
2222 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2223 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2224 +// GNU General Public License for more details.
2226 +// You should have received a copy of the GNU General Public License along
2227 +// with this library; see the file COPYING. If not, write to the Free
2228 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2231 +// As a special exception, you may use this file as part of a free software
2232 +// library without restriction. Specifically, if other files instantiate
2233 +// templates or use macros or inline functions from this file, or you compile
2234 +// this file and link it with other files to produce an executable, this
2235 +// file does not by itself cause the resulting executable to be covered by
2236 +// the GNU General Public License. This exception does not however
2237 +// invalidate any other reasons why the executable file might be covered by
2238 +// the GNU General Public License.
2241 +// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
2242 +// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
2245 +// Written by Benjamin Kosnik <bkoz@redhat.com>
2248 +#include <bits/c++locale_internal.h>
2250 +#ifdef __UCLIBC_MJN3_ONLY__
2251 +#warning tailor for stub locale support
2253 +#ifndef __UCLIBC_HAS_XLOCALE__
2254 +#define __nl_langinfo_l(N, L) nl_langinfo((N))
2261 + __timepunct<char>::
2262 + _M_put(char* __s, size_t __maxlen, const char* __format,
2263 + const tm* __tm) const
2265 +#ifdef __UCLIBC_HAS_XLOCALE__
2266 + const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
2267 + _M_c_locale_timepunct);
2269 + char* __old = strdup(setlocale(LC_ALL, NULL));
2270 + setlocale(LC_ALL, _M_name_timepunct);
2271 + const size_t __len = strftime(__s, __maxlen, __format, __tm);
2272 + setlocale(LC_ALL, __old);
2275 + // Make sure __s is null terminated.
2282 + __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
2285 + _M_data = new __timepunct_cache<char>;
2290 + _M_c_locale_timepunct = _S_get_c_locale();
2292 + _M_data->_M_date_format = "%m/%d/%y";
2293 + _M_data->_M_date_era_format = "%m/%d/%y";
2294 + _M_data->_M_time_format = "%H:%M:%S";
2295 + _M_data->_M_time_era_format = "%H:%M:%S";
2296 + _M_data->_M_date_time_format = "";
2297 + _M_data->_M_date_time_era_format = "";
2298 + _M_data->_M_am = "AM";
2299 + _M_data->_M_pm = "PM";
2300 + _M_data->_M_am_pm_format = "";
2302 + // Day names, starting with "C"'s Sunday.
2303 + _M_data->_M_day1 = "Sunday";
2304 + _M_data->_M_day2 = "Monday";
2305 + _M_data->_M_day3 = "Tuesday";
2306 + _M_data->_M_day4 = "Wednesday";
2307 + _M_data->_M_day5 = "Thursday";
2308 + _M_data->_M_day6 = "Friday";
2309 + _M_data->_M_day7 = "Saturday";
2311 + // Abbreviated day names, starting with "C"'s Sun.
2312 + _M_data->_M_aday1 = "Sun";
2313 + _M_data->_M_aday2 = "Mon";
2314 + _M_data->_M_aday3 = "Tue";
2315 + _M_data->_M_aday4 = "Wed";
2316 + _M_data->_M_aday5 = "Thu";
2317 + _M_data->_M_aday6 = "Fri";
2318 + _M_data->_M_aday7 = "Sat";
2320 + // Month names, starting with "C"'s January.
2321 + _M_data->_M_month01 = "January";
2322 + _M_data->_M_month02 = "February";
2323 + _M_data->_M_month03 = "March";
2324 + _M_data->_M_month04 = "April";
2325 + _M_data->_M_month05 = "May";
2326 + _M_data->_M_month06 = "June";
2327 + _M_data->_M_month07 = "July";
2328 + _M_data->_M_month08 = "August";
2329 + _M_data->_M_month09 = "September";
2330 + _M_data->_M_month10 = "October";
2331 + _M_data->_M_month11 = "November";
2332 + _M_data->_M_month12 = "December";
2334 + // Abbreviated month names, starting with "C"'s Jan.
2335 + _M_data->_M_amonth01 = "Jan";
2336 + _M_data->_M_amonth02 = "Feb";
2337 + _M_data->_M_amonth03 = "Mar";
2338 + _M_data->_M_amonth04 = "Apr";
2339 + _M_data->_M_amonth05 = "May";
2340 + _M_data->_M_amonth06 = "Jun";
2341 + _M_data->_M_amonth07 = "Jul";
2342 + _M_data->_M_amonth08 = "Aug";
2343 + _M_data->_M_amonth09 = "Sep";
2344 + _M_data->_M_amonth10 = "Oct";
2345 + _M_data->_M_amonth11 = "Nov";
2346 + _M_data->_M_amonth12 = "Dec";
2350 + _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2352 + _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
2353 + _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
2354 + _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
2355 + _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
2356 + _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
2357 + _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
2359 + _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
2360 + _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
2361 + _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
2363 + // Day names, starting with "C"'s Sunday.
2364 + _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
2365 + _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
2366 + _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
2367 + _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
2368 + _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
2369 + _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
2370 + _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
2372 + // Abbreviated day names, starting with "C"'s Sun.
2373 + _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
2374 + _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
2375 + _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
2376 + _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
2377 + _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
2378 + _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
2379 + _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
2381 + // Month names, starting with "C"'s January.
2382 + _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
2383 + _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
2384 + _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
2385 + _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
2386 + _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
2387 + _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
2388 + _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
2389 + _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
2390 + _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
2391 + _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
2392 + _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
2393 + _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
2395 + // Abbreviated month names, starting with "C"'s Jan.
2396 + _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
2397 + _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
2398 + _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
2399 + _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
2400 + _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
2401 + _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
2402 + _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
2403 + _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
2404 + _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
2405 + _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
2406 + _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
2407 + _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
2411 +#ifdef _GLIBCXX_USE_WCHAR_T
2414 + __timepunct<wchar_t>::
2415 + _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
2416 + const tm* __tm) const
2418 +#ifdef __UCLIBC_HAS_XLOCALE__
2419 + __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
2420 + const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
2421 + _M_c_locale_timepunct);
2423 + char* __old = strdup(setlocale(LC_ALL, NULL));
2424 + setlocale(LC_ALL, _M_name_timepunct);
2425 + const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
2426 + setlocale(LC_ALL, __old);
2429 + // Make sure __s is null terminated.
2436 + __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
2439 + _M_data = new __timepunct_cache<wchar_t>;
2441 +#warning wide time stuff
2445 + _M_c_locale_timepunct = _S_get_c_locale();
2447 + _M_data->_M_date_format = L"%m/%d/%y";
2448 + _M_data->_M_date_era_format = L"%m/%d/%y";
2449 + _M_data->_M_time_format = L"%H:%M:%S";
2450 + _M_data->_M_time_era_format = L"%H:%M:%S";
2451 + _M_data->_M_date_time_format = L"";
2452 + _M_data->_M_date_time_era_format = L"";
2453 + _M_data->_M_am = L"AM";
2454 + _M_data->_M_pm = L"PM";
2455 + _M_data->_M_am_pm_format = L"";
2457 + // Day names, starting with "C"'s Sunday.
2458 + _M_data->_M_day1 = L"Sunday";
2459 + _M_data->_M_day2 = L"Monday";
2460 + _M_data->_M_day3 = L"Tuesday";
2461 + _M_data->_M_day4 = L"Wednesday";
2462 + _M_data->_M_day5 = L"Thursday";
2463 + _M_data->_M_day6 = L"Friday";
2464 + _M_data->_M_day7 = L"Saturday";
2466 + // Abbreviated day names, starting with "C"'s Sun.
2467 + _M_data->_M_aday1 = L"Sun";
2468 + _M_data->_M_aday2 = L"Mon";
2469 + _M_data->_M_aday3 = L"Tue";
2470 + _M_data->_M_aday4 = L"Wed";
2471 + _M_data->_M_aday5 = L"Thu";
2472 + _M_data->_M_aday6 = L"Fri";
2473 + _M_data->_M_aday7 = L"Sat";
2475 + // Month names, starting with "C"'s January.
2476 + _M_data->_M_month01 = L"January";
2477 + _M_data->_M_month02 = L"February";
2478 + _M_data->_M_month03 = L"March";
2479 + _M_data->_M_month04 = L"April";
2480 + _M_data->_M_month05 = L"May";
2481 + _M_data->_M_month06 = L"June";
2482 + _M_data->_M_month07 = L"July";
2483 + _M_data->_M_month08 = L"August";
2484 + _M_data->_M_month09 = L"September";
2485 + _M_data->_M_month10 = L"October";
2486 + _M_data->_M_month11 = L"November";
2487 + _M_data->_M_month12 = L"December";
2489 + // Abbreviated month names, starting with "C"'s Jan.
2490 + _M_data->_M_amonth01 = L"Jan";
2491 + _M_data->_M_amonth02 = L"Feb";
2492 + _M_data->_M_amonth03 = L"Mar";
2493 + _M_data->_M_amonth04 = L"Apr";
2494 + _M_data->_M_amonth05 = L"May";
2495 + _M_data->_M_amonth06 = L"Jun";
2496 + _M_data->_M_amonth07 = L"Jul";
2497 + _M_data->_M_amonth08 = L"Aug";
2498 + _M_data->_M_amonth09 = L"Sep";
2499 + _M_data->_M_amonth10 = L"Oct";
2500 + _M_data->_M_amonth11 = L"Nov";
2501 + _M_data->_M_amonth12 = L"Dec";
2506 + _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2508 + union { char *__s; wchar_t *__w; } __u;
2510 + __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
2511 + _M_data->_M_date_format = __u.__w;
2512 + __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
2513 + _M_data->_M_date_era_format = __u.__w;
2514 + __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
2515 + _M_data->_M_time_format = __u.__w;
2516 + __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
2517 + _M_data->_M_time_era_format = __u.__w;
2518 + __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
2519 + _M_data->_M_date_time_format = __u.__w;
2520 + __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
2521 + _M_data->_M_date_time_era_format = __u.__w;
2522 + __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
2523 + _M_data->_M_am = __u.__w;
2524 + __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
2525 + _M_data->_M_pm = __u.__w;
2526 + __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
2527 + _M_data->_M_am_pm_format = __u.__w;
2529 + // Day names, starting with "C"'s Sunday.
2530 + __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
2531 + _M_data->_M_day1 = __u.__w;
2532 + __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
2533 + _M_data->_M_day2 = __u.__w;
2534 + __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
2535 + _M_data->_M_day3 = __u.__w;
2536 + __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
2537 + _M_data->_M_day4 = __u.__w;
2538 + __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
2539 + _M_data->_M_day5 = __u.__w;
2540 + __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
2541 + _M_data->_M_day6 = __u.__w;
2542 + __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
2543 + _M_data->_M_day7 = __u.__w;
2545 + // Abbreviated day names, starting with "C"'s Sun.
2546 + __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
2547 + _M_data->_M_aday1 = __u.__w;
2548 + __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
2549 + _M_data->_M_aday2 = __u.__w;
2550 + __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
2551 + _M_data->_M_aday3 = __u.__w;
2552 + __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
2553 + _M_data->_M_aday4 = __u.__w;
2554 + __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
2555 + _M_data->_M_aday5 = __u.__w;
2556 + __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
2557 + _M_data->_M_aday6 = __u.__w;
2558 + __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
2559 + _M_data->_M_aday7 = __u.__w;
2561 + // Month names, starting with "C"'s January.
2562 + __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
2563 + _M_data->_M_month01 = __u.__w;
2564 + __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
2565 + _M_data->_M_month02 = __u.__w;
2566 + __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
2567 + _M_data->_M_month03 = __u.__w;
2568 + __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
2569 + _M_data->_M_month04 = __u.__w;
2570 + __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
2571 + _M_data->_M_month05 = __u.__w;
2572 + __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
2573 + _M_data->_M_month06 = __u.__w;
2574 + __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
2575 + _M_data->_M_month07 = __u.__w;
2576 + __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
2577 + _M_data->_M_month08 = __u.__w;
2578 + __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
2579 + _M_data->_M_month09 = __u.__w;
2580 + __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
2581 + _M_data->_M_month10 = __u.__w;
2582 + __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
2583 + _M_data->_M_month11 = __u.__w;
2584 + __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
2585 + _M_data->_M_month12 = __u.__w;
2587 + // Abbreviated month names, starting with "C"'s Jan.
2588 + __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
2589 + _M_data->_M_amonth01 = __u.__w;
2590 + __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
2591 + _M_data->_M_amonth02 = __u.__w;
2592 + __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
2593 + _M_data->_M_amonth03 = __u.__w;
2594 + __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
2595 + _M_data->_M_amonth04 = __u.__w;
2596 + __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
2597 + _M_data->_M_amonth05 = __u.__w;
2598 + __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
2599 + _M_data->_M_amonth06 = __u.__w;
2600 + __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
2601 + _M_data->_M_amonth07 = __u.__w;
2602 + __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
2603 + _M_data->_M_amonth08 = __u.__w;
2604 + __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
2605 + _M_data->_M_amonth09 = __u.__w;
2606 + __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
2607 + _M_data->_M_amonth10 = __u.__w;
2608 + __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
2609 + _M_data->_M_amonth11 = __u.__w;
2610 + __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
2611 + _M_data->_M_amonth12 = __u.__w;
2617 diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h
2618 --- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 18:00:00.000000000 -0600
2619 +++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h 2004-05-22 18:46:31.000000000 -0500
2621 +// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2623 +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2625 +// This file is part of the GNU ISO C++ Library. This library is free
2626 +// software; you can redistribute it and/or modify it under the
2627 +// terms of the GNU General Public License as published by the
2628 +// Free Software Foundation; either version 2, or (at your option)
2629 +// any later version.
2631 +// This library is distributed in the hope that it will be useful,
2632 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2633 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2634 +// GNU General Public License for more details.
2636 +// You should have received a copy of the GNU General Public License along
2637 +// with this library; see the file COPYING. If not, write to the Free
2638 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2641 +// As a special exception, you may use this file as part of a free software
2642 +// library without restriction. Specifically, if other files instantiate
2643 +// templates or use macros or inline functions from this file, or you compile
2644 +// this file and link it with other files to produce an executable, this
2645 +// file does not by itself cause the resulting executable to be covered by
2646 +// the GNU General Public License. This exception does not however
2647 +// invalidate any other reasons why the executable file might be covered by
2648 +// the GNU General Public License.
2651 +// ISO C++ 14882: 22.2.5.1.2 - time_get functions
2652 +// ISO C++ 14882: 22.2.5.3.2 - time_put functions
2655 +// Written by Benjamin Kosnik <bkoz@redhat.com>
2657 + template<typename _CharT>
2658 + __timepunct<_CharT>::__timepunct(size_t __refs)
2659 + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
2660 + _M_name_timepunct(_S_get_c_name())
2661 + { _M_initialize_timepunct(); }
2663 + template<typename _CharT>
2664 + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
2665 + : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
2666 + _M_name_timepunct(_S_get_c_name())
2667 + { _M_initialize_timepunct(); }
2669 + template<typename _CharT>
2670 + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
2672 + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
2673 + _M_name_timepunct(__s)
2675 + char* __tmp = new char[std::strlen(__s) + 1];
2676 + std::strcpy(__tmp, __s);
2677 + _M_name_timepunct = __tmp;
2678 + _M_initialize_timepunct(__cloc);
2681 + template<typename _CharT>
2682 + __timepunct<_CharT>::~__timepunct()
2684 + if (_M_name_timepunct != _S_get_c_name())
2685 + delete [] _M_name_timepunct;
2687 + _S_destroy_c_locale(_M_c_locale_timepunct);
2689 diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h
2690 --- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 18:00:00.000000000 -0600
2691 +++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h 2005-04-28 01:10:27.000000000 -0500
2693 +// Locale support -*- C++ -*-
2695 +// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
2696 +// Free Software Foundation, Inc.
2698 +// This file is part of the GNU ISO C++ Library. This library is free
2699 +// software; you can redistribute it and/or modify it under the
2700 +// terms of the GNU General Public License as published by the
2701 +// Free Software Foundation; either version 2, or (at your option)
2702 +// any later version.
2704 +// This library is distributed in the hope that it will be useful,
2705 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2706 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2707 +// GNU General Public License for more details.
2709 +// You should have received a copy of the GNU General Public License along
2710 +// with this library; see the file COPYING. If not, write to the Free
2711 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2714 +// As a special exception, you may use this file as part of a free software
2715 +// library without restriction. Specifically, if other files instantiate
2716 +// templates or use macros or inline functions from this file, or you compile
2717 +// this file and link it with other files to produce an executable, this
2718 +// file does not by itself cause the resulting executable to be covered by
2719 +// the GNU General Public License. This exception does not however
2720 +// invalidate any other reasons why the executable file might be covered by
2721 +// the GNU General Public License.
2724 +// ISO C++ 14882: 22.1 Locales
2727 +/** @file ctype_base.h
2728 + * This is an internal header file, included by other library headers.
2729 + * You should not attempt to use it directly.
2732 +// Information as gleaned from /usr/include/ctype.h
2734 + /// @brief Base class for ctype.
2737 + // Note: In uClibc, the following two types depend on configuration.
2739 + // Non-standard typedefs.
2740 + typedef const __ctype_touplow_t* __to_type;
2742 + // NB: Offsets into ctype<char>::_M_table force a particular size
2743 + // on the mask type. Because of this, we don't use an enum.
2744 + typedef __ctype_mask_t mask;
2745 + static const mask upper = _ISupper;
2746 + static const mask lower = _ISlower;
2747 + static const mask alpha = _ISalpha;
2748 + static const mask digit = _ISdigit;
2749 + static const mask xdigit = _ISxdigit;
2750 + static const mask space = _ISspace;
2751 + static const mask print = _ISprint;
2752 + static const mask graph = _ISalpha | _ISdigit | _ISpunct;
2753 + static const mask cntrl = _IScntrl;
2754 + static const mask punct = _ISpunct;
2755 + static const mask alnum = _ISalpha | _ISdigit;
2757 diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h
2758 --- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 18:00:00.000000000 -0600
2759 +++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h 2002-06-24 00:49:19.000000000 -0500
2761 +// Locale support -*- C++ -*-
2763 +// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
2765 +// This file is part of the GNU ISO C++ Library. This library is free
2766 +// software; you can redistribute it and/or modify it under the
2767 +// terms of the GNU General Public License as published by the
2768 +// Free Software Foundation; either version 2, or (at your option)
2769 +// any later version.
2771 +// This library is distributed in the hope that it will be useful,
2772 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2773 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2774 +// GNU General Public License for more details.
2776 +// You should have received a copy of the GNU General Public License along
2777 +// with this library; see the file COPYING. If not, write to the Free
2778 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2781 +// As a special exception, you may use this file as part of a free software
2782 +// library without restriction. Specifically, if other files instantiate
2783 +// templates or use macros or inline functions from this file, or you compile
2784 +// this file and link it with other files to produce an executable, this
2785 +// file does not by itself cause the resulting executable to be covered by
2786 +// the GNU General Public License. This exception does not however
2787 +// invalidate any other reasons why the executable file might be covered by
2788 +// the GNU General Public License.
2791 +// ISO C++ 14882: 22.1 Locales
2794 +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
2795 +// functions go in ctype.cc
2799 + is(mask __m, char __c) const
2800 + { return _M_table[static_cast<unsigned char>(__c)] & __m; }
2804 + is(const char* __low, const char* __high, mask* __vec) const
2806 + while (__low < __high)
2807 + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
2813 + scan_is(mask __m, const char* __low, const char* __high) const
2815 + while (__low < __high
2816 + && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
2823 + scan_not(mask __m, const char* __low, const char* __high) const
2825 + while (__low < __high
2826 + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
2830 diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h
2831 --- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 18:00:00.000000000 -0600
2832 +++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2005-04-28 01:10:27.000000000 -0500
2834 +// Locale support -*- C++ -*-
2836 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
2837 +// Free Software Foundation, Inc.
2839 +// This file is part of the GNU ISO C++ Library. This library is free
2840 +// software; you can redistribute it and/or modify it under the
2841 +// terms of the GNU General Public License as published by the
2842 +// Free Software Foundation; either version 2, or (at your option)
2843 +// any later version.
2845 +// This library is distributed in the hope that it will be useful,
2846 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2847 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2848 +// GNU General Public License for more details.
2850 +// You should have received a copy of the GNU General Public License along
2851 +// with this library; see the file COPYING. If not, write to the Free
2852 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2855 +// As a special exception, you may use this file as part of a free software
2856 +// library without restriction. Specifically, if other files instantiate
2857 +// templates or use macros or inline functions from this file, or you compile
2858 +// this file and link it with other files to produce an executable, this
2859 +// file does not by itself cause the resulting executable to be covered by
2860 +// the GNU General Public License. This exception does not however
2861 +// invalidate any other reasons why the executable file might be covered by
2862 +// the GNU General Public License.
2865 +// ISO C++ 14882: 22.1 Locales
2868 +// Information as gleaned from /usr/include/ctype.h
2870 + const ctype_base::mask*
2871 + ctype<char>::classic_table() throw()
2872 + { return __C_ctype_b; }
2874 + ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
2876 + : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
2877 + _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
2879 + _M_toupper = __C_ctype_toupper;
2880 + _M_tolower = __C_ctype_tolower;
2881 + _M_table = __table ? __table : __C_ctype_b;
2882 + memset(_M_widen, 0, sizeof(_M_widen));
2883 + memset(_M_narrow, 0, sizeof(_M_narrow));
2886 + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
2887 + : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
2888 + _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
2890 + _M_toupper = __C_ctype_toupper;
2891 + _M_tolower = __C_ctype_tolower;
2892 + _M_table = __table ? __table : __C_ctype_b;
2893 + memset(_M_widen, 0, sizeof(_M_widen));
2894 + memset(_M_narrow, 0, sizeof(_M_narrow));
2898 + ctype<char>::do_toupper(char __c) const
2899 + { return _M_toupper[static_cast<unsigned char>(__c)]; }
2902 + ctype<char>::do_toupper(char* __low, const char* __high) const
2904 + while (__low < __high)
2906 + *__low = _M_toupper[static_cast<unsigned char>(*__low)];
2913 + ctype<char>::do_tolower(char __c) const
2914 + { return _M_tolower[static_cast<unsigned char>(__c)]; }
2917 + ctype<char>::do_tolower(char* __low, const char* __high) const
2919 + while (__low < __high)
2921 + *__low = _M_tolower[static_cast<unsigned char>(*__low)];
2926 diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h
2927 --- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 18:00:00.000000000 -0600
2928 +++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h 2005-04-28 01:10:27.000000000 -0500
2930 +// Specific definitions for GNU/Linux -*- C++ -*-
2932 +// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2934 +// This file is part of the GNU ISO C++ Library. This library is free
2935 +// software; you can redistribute it and/or modify it under the
2936 +// terms of the GNU General Public License as published by the
2937 +// Free Software Foundation; either version 2, or (at your option)
2938 +// any later version.
2940 +// This library is distributed in the hope that it will be useful,
2941 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
2942 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2943 +// GNU General Public License for more details.
2945 +// You should have received a copy of the GNU General Public License along
2946 +// with this library; see the file COPYING. If not, write to the Free
2947 +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2950 +// As a special exception, you may use this file as part of a free software
2951 +// library without restriction. Specifically, if other files instantiate
2952 +// templates or use macros or inline functions from this file, or you compile
2953 +// this file and link it with other files to produce an executable, this
2954 +// file does not by itself cause the resulting executable to be covered by
2955 +// the GNU General Public License. This exception does not however
2956 +// invalidate any other reasons why the executable file might be covered by
2957 +// the GNU General Public License.
2959 +#ifndef _GLIBCXX_OS_DEFINES
2960 +#define _GLIBCXX_OS_DEFINES 1
2962 +// System-specific #define, typedefs, corrections, etc, go here. This
2963 +// file will come before all others.
2965 +// This keeps isanum, et al from being propagated as macros.
2966 +#define __NO_CTYPE 1
2968 +#include <features.h>
2970 +// We must not see the optimized string functions GNU libc defines.
2971 +#define __NO_STRING_INLINES
2974 diff -urN gcc-4.0.0-100/libstdc++-v3/configure gcc-4.0.0/libstdc++-v3/configure
2975 --- gcc-4.0.0-100/libstdc++-v3/configure 2005-04-30 13:06:53.683055232 -0500
2976 +++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 12:24:24.000000000 -0500
2977 @@ -3998,6 +3998,11 @@
2978 lt_cv_deplibs_check_method=pass_all
2982 + lt_cv_deplibs_check_method=pass_all
2983 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
2986 netbsd* | knetbsd*-gnu)
2987 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2988 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2989 @@ -5672,7 +5677,7 @@
2990 enableval="$enable_clocale"
2992 case "$enableval" in
2993 - generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
2994 + generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
2995 *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
2996 echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
2997 { (exit 1); exit 1; }; } ;;
2998 @@ -5697,6 +5702,9 @@
2999 # Default to "generic".
3000 if test $enable_clocale_flag = auto; then
3001 case ${target_os} in
3003 + enable_clocale_flag=uclibc
3005 linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
3006 cat >conftest.$ac_ext <<_ACEOF
3008 @@ -5927,6 +5935,76 @@
3009 CTIME_CC=config/locale/generic/time_members.cc
3010 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
3013 + echo "$as_me:$LINENO: result: uclibc" >&5
3014 +echo "${ECHO_T}uclibc" >&6
3016 + # Declare intention to use gettext, and add support for specific
3018 + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
3019 + ALL_LINGUAS="de fr"
3021 + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
3022 + # Extract the first word of "msgfmt", so it can be a program name with args.
3023 +set dummy msgfmt; ac_word=$2
3024 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3025 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3026 +if test "${ac_cv_prog_check_msgfmt+set}" = set; then
3027 + echo $ECHO_N "(cached) $ECHO_C" >&6
3029 + if test -n "$check_msgfmt"; then
3030 + ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
3032 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3033 +for as_dir in $PATH
3036 + test -z "$as_dir" && as_dir=.
3037 + for ac_exec_ext in '' $ac_executable_extensions; do
3038 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3039 + ac_cv_prog_check_msgfmt="yes"
3040 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3046 + test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
3049 +check_msgfmt=$ac_cv_prog_check_msgfmt
3050 +if test -n "$check_msgfmt"; then
3051 + echo "$as_me:$LINENO: result: $check_msgfmt" >&5
3052 +echo "${ECHO_T}$check_msgfmt" >&6
3054 + echo "$as_me:$LINENO: result: no" >&5
3055 +echo "${ECHO_T}no" >&6
3058 + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
3061 + # Export the build objects.
3062 + for ling in $ALL_LINGUAS; do \
3063 + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
3064 + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
3069 + CLOCALE_H=config/locale/uclibc/c_locale.h
3070 + CLOCALE_CC=config/locale/uclibc/c_locale.cc
3071 + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
3072 + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
3073 + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
3074 + CMESSAGES_H=config/locale/uclibc/messages_members.h
3075 + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
3076 + CMONEY_CC=config/locale/uclibc/monetary_members.cc
3077 + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
3078 + CTIME_H=config/locale/uclibc/time_members.h
3079 + CTIME_CC=config/locale/uclibc/time_members.cc
3080 + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
3084 # This is where the testsuite looks for locale catalogs, using the
3085 diff -urN gcc-4.0.0-100/libstdc++-v3/configure.host gcc-4.0.0/libstdc++-v3/configure.host
3086 --- gcc-4.0.0-100/libstdc++-v3/configure.host 2005-04-30 13:06:53.688054472 -0500
3087 +++ gcc-4.0.0/libstdc++-v3/configure.host 2005-04-28 20:20:32.000000000 -0500
3088 @@ -249,6 +249,12 @@
3092 +# Override for uClibc since linux-uclibc gets mishandled above.
3093 +case "${host_os}" in
3095 + os_include_dir="os/uclibc"
3099 # Set any OS-dependent and CPU-dependent bits.
3100 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
3101 diff -urN gcc-4.0.0-100/libstdc++-v3/crossconfig.m4 gcc-4.0.0/libstdc++-v3/crossconfig.m4
3102 --- gcc-4.0.0-100/libstdc++-v3/crossconfig.m4 2005-04-30 13:06:53.689054320 -0500
3103 +++ gcc-4.0.0/libstdc++-v3/crossconfig.m4 2005-04-28 20:27:15.000000000 -0500
3104 @@ -142,6 +142,98 @@
3109 +# Temporary hack until we implement the float versions of the libm funcs
3110 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
3111 + machine/endian.h machine/param.h sys/machine.h sys/types.h \
3112 + fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
3113 + SECTION_FLAGS='-ffunction-sections -fdata-sections'
3114 + AC_SUBST(SECTION_FLAGS)
3115 + GLIBCXX_CHECK_LINKER_FEATURES
3116 + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
3117 + GLIBCXX_CHECK_WCHAR_T_SUPPORT
3120 + AC_DEFINE(HAVE_INT64_T)
3123 + # Don't enable LFS with uClinux
3126 + AC_DEFINE(_GLIBCXX_USE_LFS)
3129 + # For showmanyc_helper().
3130 + AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
3131 + GLIBCXX_CHECK_POLL
3132 + GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
3135 + AC_CHECK_HEADERS(sys/uio.h)
3136 + GLIBCXX_CHECK_WRITEV
3138 +# AC_DEFINE(HAVE_ACOSF)
3139 +# AC_DEFINE(HAVE_ASINF)
3140 +# AC_DEFINE(HAVE_ATANF)
3141 +# AC_DEFINE(HAVE_ATAN2F)
3142 + AC_DEFINE(HAVE_CEILF)
3143 + AC_DEFINE(HAVE_COPYSIGN)
3144 +# AC_DEFINE(HAVE_COPYSIGNF)
3145 +# AC_DEFINE(HAVE_COSF)
3146 +# AC_DEFINE(HAVE_COSHF)
3147 +# AC_DEFINE(HAVE_EXPF)
3148 +# AC_DEFINE(HAVE_FABSF)
3149 + AC_DEFINE(HAVE_FINITE)
3150 + AC_DEFINE(HAVE_FINITEF)
3151 + AC_DEFINE(HAVE_FLOORF)
3152 +# AC_DEFINE(HAVE_FMODF)
3153 +# AC_DEFINE(HAVE_FREXPF)
3154 + AC_DEFINE(HAVE_HYPOT)
3155 +# AC_DEFINE(HAVE_HYPOTF)
3156 + AC_DEFINE(HAVE_ISINF)
3157 + AC_DEFINE(HAVE_ISINFF)
3158 + AC_DEFINE(HAVE_ISNAN)
3159 + AC_DEFINE(HAVE_ISNANF)
3160 +# AC_DEFINE(HAVE_LOGF)
3161 +# AC_DEFINE(HAVE_LOG10F)
3162 +# AC_DEFINE(HAVE_MODFF)
3163 +# AC_DEFINE(HAVE_SINF)
3164 +# AC_DEFINE(HAVE_SINHF)
3165 +# AC_DEFINE(HAVE_SINCOS)
3166 +# AC_DEFINE(HAVE_SINCOSF)
3167 + AC_DEFINE(HAVE_SQRTF)
3168 +# AC_DEFINE(HAVE_TANF)
3169 +# AC_DEFINE(HAVE_TANHF)
3170 + if test x"long_double_math_on_this_cpu" = x"yes"; then
3171 +# AC_DEFINE(HAVE_ACOSL)
3172 +# AC_DEFINE(HAVE_ASINL)
3173 +# AC_DEFINE(HAVE_ATANL)
3174 +# AC_DEFINE(HAVE_ATAN2L)
3175 +# AC_DEFINE(HAVE_CEILL)
3176 +# AC_DEFINE(HAVE_COPYSIGNL)
3177 +# AC_DEFINE(HAVE_COSL)
3178 +# AC_DEFINE(HAVE_COSHL)
3179 +# AC_DEFINE(HAVE_EXPL)
3180 +# AC_DEFINE(HAVE_FABSL)
3181 +# AC_DEFINE(HAVE_FINITEL)
3182 +# AC_DEFINE(HAVE_FLOORL)
3183 +# AC_DEFINE(HAVE_FMODL)
3184 +# AC_DEFINE(HAVE_FREXPL)
3185 +# AC_DEFINE(HAVE_HYPOTL)
3186 +# AC_DEFINE(HAVE_ISINFL)
3187 +# AC_DEFINE(HAVE_ISNANL)
3188 +# AC_DEFINE(HAVE_LOGL)
3189 +# AC_DEFINE(HAVE_LOG10L)
3190 +# AC_DEFINE(HAVE_MODFL)
3191 +# AC_DEFINE(HAVE_POWL)
3192 +# AC_DEFINE(HAVE_SINL)
3193 +# AC_DEFINE(HAVE_SINHL)
3194 +# AC_DEFINE(HAVE_SINCOSL)
3195 +# AC_DEFINE(HAVE_SQRTL)
3196 +# AC_DEFINE(HAVE_TANL)
3197 +# AC_DEFINE(HAVE_TANHL)
3200 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
3201 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
3202 machine/endian.h machine/param.h sys/machine.h sys/types.h \
3204 AC_DEFINE(HAVE_INT64_T)
3207 - # Don't enable LFS with uClibc
3208 + # Don't enable LFS with uClinux
3211 AC_DEFINE(_GLIBCXX_USE_LFS)
3212 diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h
3213 --- gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h 2005-04-30 13:06:53.690054168 -0500
3214 +++ gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h 2005-04-28 20:15:56.000000000 -0500
3217 using std::wmemmove;
3219 +#if _GLIBCXX_HAVE_WCSFTIME
3220 using std::wcsftime;
3223 #if _GLIBCXX_USE_C99
3225 diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h
3226 --- gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h 2005-04-30 13:06:53.691054016 -0500
3227 +++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h 2005-04-28 20:15:56.000000000 -0500
3232 +#if _GLIBCXX_HAVE_WCSFTIME