Remove old contrib/libstdc++, unused since r358454

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2020-03-02 14:04:09 +00:00
parent 543b9d5960
commit 465454ebad
853 changed files with 0 additions and 393609 deletions

View File

@ -1,479 +0,0 @@
2008-05-19 Release Manager
* GCC 4.2.4 released.
2008-03-13 David Edelsohn <edelsohn@gnu.org>
Backport from mainline:
2008-01-26 David Edelsohn <edelsohn@gnu.org>
PR target/34794
* config/os/aix/os_defines.h: Define __COMPATMATH__.
2008-02-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* testsuite/27_io/fpos/14320-1.cc: Check for "long long" and
remove XFAIL.
2008-02-01 Release Manager
* GCC 4.2.3 released.
2008-01-06 Ted Phelps <phelps@gnusto.com>
PR c++/34152
* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Check
_GLIBCXX_HAVE_GETIPINFO instead of HAVE_GETIPINFO.
2008-01-05 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/34680
Revert:
2007-12-17 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/bits/locale_facets.tcc (has_facet, use_facet): Simplify
RTTI checks.
2007-12-14 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/30127
PR libstdc++/34449
* include/bits/locale_facets.tcc (use_facet): Check facet hierarchy.
(has_facet): Same.
* testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New.
* testsuite/22_locale/global_templates/
standard_facet_hierarchies.cc: New.
2007-12-17 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/bits/locale_facets.tcc (has_facet, use_facet): Simplify
RTTI checks.
2007-12-17 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/22_locale/global_templates/
standard_facet_hierarchies.cc: Fix for generic locale model.
2007-12-14 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/30127
PR libstdc++/34449
* include/bits/locale_facets.tcc (use_facet): Check facet hierarchy.
(has_facet): Same.
* testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New.
* testsuite/22_locale/global_templates/
standard_facet_hierarchies.cc: New.
2007-11-26 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_put<>::_M_insert_int): When
ios_base::showpos and the type is signed and the value is zero,
prepend +.
* testsuite/22_locale/num_put/put/char/12.cc: New.
* testsuite/22_locale/num_put/put/wchar_t/12.cc: Likewise.
2007-10-20 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random
(uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type,
result_type, true_type)): Fix small thinko.
2007-10-19 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/33815
* include/tr1/random
(uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type,
result_type, true_type)): Avoid the modulo (which uses the low-order
bits).
2007-10-18 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/33807
* include/bits/allocator.h (operator==(const allocator<_Tp>&,
const allocator<_Tp>&), operator!=(const allocator<_Tp>&,
const allocator<_Tp>&)): Add.
* testsuite/20_util/memory/allocator/33807.cc: New.
2007-10-14 Jonathan Wakely <jwakely.gcc@gmail.com>
* docs/html/Makefile: Follow up to libstdc++/14991, remove target.
2007-10-14 Jonathan Wakely <jwakely.gcc@gmail.com>
* src/valarray-inst.cc, include/ext/atomicity.h,
include/ext/concurrence.h, include/bits/basic_string.h,
include/bits/fstream.tcc, include/ext/vstring.h: Fix comment typos.
2007-10-14 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/tr1_impl/boost_shared_ptr.h: (__weak_ptr::lock()): Add
missing template argument.
* testsuite/tr1/2_general_utilities/memory/shared_ptr/
explicit_instantiation/2.cc: New.
* testsuite/tr1/2_general_utilities/memory/weak_ptr/
explicit_instantiation/2.cc: New.
2007-10-11 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/33734
* include/ext/codecvt_specializations.h (encoding_state::good,
init, destroy): Use cast notation instead of reinterpret_cast.
2007-10-07 Release Manager
* GCC 4.2.2 released.
2007-10-06 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/33678
* libsupc++/typeinfo (typeinfo): Revert ordering of virtual components.
2007-08-28 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/33128
* include/tr1/random (uniform_int<>::_M_call): Deal with
__urng() returning negative values.
* testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc:
New.
2007-08-17 Johannes Willkomm <willkomm@sc.rwth-aachen.de>
PR libstdc++/33084
* include/std/valarray (operator _Op(const _Tp&,
const valarray<>&)): Fix typo.
* testsuite/26_numerics/numeric_arrays/valarray/33084.cc: New.
2007-07-19 Release Manager
* GCC 4.2.1 released.
2007-07-05 Joerg Richter <joerg.richter@pdv-fs.de>
PR libstdc++/31957
* include/Makefile.am: Work around an AIX sed oddity.
* include/Makefile.in: Regenerate.
2007-06-28 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/32509
* acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Carry out the checks
involving the de_DE locale only if an auto locale config is
used for a target suitable for the gnu locale model.
* docs/html/install.html: Update.
* configure: Regenerated.
2007-06-26 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/throw_allocator.h: Fixes for -fno-exceptions.
* testsuite/util/testsuite_shared.cc: Same.
* testsuite/util/io/illegal_input_error.hpp: Same.
* testsuite/util/io/verified_cmd_line_input.cc: Same.
* libsupc++/typeinfo (type_info): Correct comment formatting,
clarify member access and public interface.
* libsupc++/exception: Less compressed comments.
* libsupc++/new: Same.
2007-06-08 Paolo Carlini <pcarlini@suse.de>
* docs/html/install.html: Adjust consistently with libstdc++/31717.
2007-06-08 Francesco Palagi <palagi@arcetri.astro.it>
* include/std/std_fstream.h: Add Table 92 in comment.
2007-06-06 Benjamin Kosnik <bkoz@redhat.com>
Frank Mori Hess <frank.hess@nist.gov>
* docs/html/debug.html: Correct link.
2007-05-28 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/31717
* acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Re-organize. Sanity check
gnu locale model requests to make sure it will work for the requested
target. Add checks for strxfrm_l, strerror_l when in gnu locale,
and strerror_r everywhere.
* aclocal.m4: Regenerated.
* configure: Regenerated.
* config.h.in: Regenerated.
2007-05-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/ostream.tcc: Do not inhibit implicit instantiation
of __ostream_insert here...
* include/bits/ostream_insert.h: ... do it here.
2007-05-21 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31621
* acinclude.m4 ([GLIBCXX_CHECK_LINKER_FEATURES]): Use the C compiler.
* configure: Regenerate.
2007-05-13 Release Manager
* GCC 4.2.0 released.
2007-04-12 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/28277 (partial: vstring bits)
* include/bits/ostream_insert.h: New.
* include/Makefile.am: Add.
* include/ext/vstring.h (operator<<(basic_ostream<>&,
const __versa_string<>&): Forward to __ostream_insert.
* include/bits/basic_string.h (operator<<(basic_ostream<>&,
const string<>&)): Likewise.
* include/std/std_ostream.h (operator<<(basic_ostream<>&, _CharT),
operator<<(basic_ostream<char,>&, char), operator<<(basic_ostream<>&,
const _CharT*), operator<<(basic_ostream<char,>&, const char*)):
Likewise.
* include/ext/vstring.tcc (operator<<(basic_ostream<>&,
const __versa_string<>&)): Remove.
(class basic_ostream): Remove friend declarations.
(basic_ostream<>::_M_write(char_type, streamsize),
_M_insert(const char_type*, streamsize)): Remove.
* include/bits/ostream.tcc (_M_insert(const char_type*, streamsize)):
Remove definition.
(operator<<(basic_ostream<>&, const char*)): Use __ostream_insert.
* include/ext/vstring_util.h: Include <bits/ostream_insert.h>.
* include/std/std_string.h: Likewise.
* config/abi/pre/gnu.ver: Adjust.
* src/ostream-inst.cc: Add __ostream_insert instantiations.
* include/Makefile.in: Rebuild.
* testsuite/ext/vstring/inserters_extractors/char/28277.cc: New.
* testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc: New.
2007-04-07 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31481
* include/ext/type_traits.h (__numeric_traits): Move...
* include/ext/numeric_traits.h: ... here; fix type of
__max_digits10.
* include/Makefile.am: Add.
* include/ext/pb_ds/detail/type_utils.hpp: Include
<ext/numeric_traits.h> too.
* include/tr1/random: Likewise.
* testsuite/ext/type_traits/numeric_traits.cc: Move...
* testsuite/ext/numeric_traits/numeric_traits.cc: ... here.
* include/Makefile.in: Regenerate.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc:
Adjust dg-error line number.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc:
Likewise.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc:
Likewise.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc:
Likewise.
2007-04-03 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_map.h (map<>::insert(iterator, const value_type&):
Uglify parameter.
2007-04-02 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31401 (vstring bits)
* include/ext/vstring.tcc (find(const _CharT*, size_type,
size_type)): Avoid unsigned overflow.
2007-03-30 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31401
* include/bits/basic_string.tcc (find(const _CharT*, size_type,
size_type)): Avoid unsigned overflow.
* testsuite/21_strings/basic_string/find/char/4.cc: New.
* testsuite/21_strings/basic_string/find/wchar_t/4.cc: Likewise.
2007-03-06 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/28080 (partial)
* include/tr1/random (class random_device): Rework to use simple
<cstdio> input, do not include <fstream>.
* include/tr1/random.tcc (all inserters and extractors): Refer
to ios_base as base class of basic_istream or basic_ostream.
2007-03-05 Joseph Myers <joseph@codesourcery.com>
PR libstdc++/30675
* testsuite/lib/libstdc++.exp (v3-build_support): Use [transform
"ar"] and [transform "ranlib"].
2007-03-05 Richard Guenther <rguenther@suse.de>
Backport from mainline:
2007-02-27 Richard Guenther <rguenther@suse.de>
* acinclude.m4: Adjust regular expression for ld version extraction.
* configure: Regenerate.
2007-03-05 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31031
* include/bits/istream.tcc: Inhibit implicit instantiation of
the _M_insert helpers.
* include/bits/ostream.tcc: Likewise for _M_extract.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/
31031.cc: New.
* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/
31031.cc: Likewise.
2007-03-03 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/28080 (partial)
* include/tr1/functional: Split out hash bits to...
* include/tr1/functional_hash.h: ...here.
* include/Makefile.am: Add.
* include/tr1/unordered_set: Include the latter instead.
* include/tr1/unordered_map: Likewise.
* include/Makefile.in: Regenerate.
* include/tr1/utility (get(std::pair<>&), get(const std::pair<>&)):
Mark inline.
2007-02-21 Mark Mitchell <mark@codesourcery.com>
* testsuite/lib/libstdc++.exp (libstdc++_init): Compile testglue
with -fexceptions.
2007-02-07 Hans-Peter Nilsson <hp@axis.com>
PR testsuite/28870
* testsuite/27_io/basic_stringbuf/overflow/char/1.cc: Use only
10000 iterations for simulator targets.
* testsuite/ext/pb_ds/regression/tree_data_map_rand.cc: Use only 5
iterations for simulator targets.
* testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc: Ditto.
* testsuite/ext/pb_ds/regression/trie_data_map_rand.cc: Ditto.
* testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc: Ditto.
* testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc: Ditto.
* testsuite/ext/pb_ds/regression/hash_data_map_rand.cc: Ditto.
* testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Ditto.
* testsuite/23_containers/set/modifiers/16728.cc: Use only 10
iterations for simulator targets.
2007-02-05 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_deque.h (operator<): Qualify call.
2007-02-01 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/14493
* libsupc++/typeinfo (bad_cast::what, bad_typeid::what): Declare.
* libsupc++/tinfo.cc: Define.
* libsupc++/exception (bad_exception::what): Declare.
* libsupc++/eh_exception.cc: Define.
(exception::what): Adjust, don't use typeid.
* libsupc++/new (bad_alloc::what): Declare.
* libsupc++/new_handler.cc: Define.
* config/abi/pre/gnu.ver: Export the new methods @3.4.9.
* testsuite/18_support/14493.cc: New.
2007-02-01 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/29496
* include/debug/safe_base.h (_Safe_sequence_base::_M_get_mutex,
_Safe_iterator_base::_M_get_mutex, _M_attach_single, _M_detach_single):
New.
* src/debug.cc: Define the latter.
(_Safe_sequence_base::_M_detach_all, _M_detach_singular,
_M_revalidate_singular, _M_swap): Use the mutex.
(_Safe_iterator_base::_M_attach, _M_detach): Adjust, forward to the
*_single version.
* include/debug/safe_iterator.h (_Safe_iterator<>::_M_attach_single,
_M_invalidate_single): New.
* include/debug/safe_iterator.tcc: Define.
(_Safe_iterator<>::_M_invalidate): Adjust, forward to
_M_invalidate_single.
* include/debug/safe_sequence.h (_Safe_sequence<>::_M_invalidate_if,
_M_transfer_iter): Use the mutex, adjust, forward to the *_single
versions of _M_invalidate and _M_attach.
* config/abi/pre/gnu.ver (_Safe_sequence_base::_M_get_mutex,
_Safe_iterator_base::_M_get_mutex, _M_attach_single, _M_detach_single):
Add @GLIBCXX_3.4.9; adjust.
2007-01-27 Steve LoBasso <slobasso@yahoo.com>
Paolo Carlini <pcarlini@suse.de>
* include/bits/deque.tcc (deque<>::erase(iterator, iterator)):
Fix condition.
* testsuite/23_containers/deque/modifiers/erase/3.cc: New.
2007-01-26 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/30586
* config/cpu/ia64/atomic_word.h: Just include <bits/cxxabi_tweaks.h>.
* testsuite/abi/30586.cc: New.
2007-01-26 Benjamin Kosnik <bkoz@redhat.com>
Revert.
2006-12-11 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/28125
* acinclude.m4 (GLIBCXX_CHECK_ICONV_SUPPORT): Remove link test, ie
AC_CHECK_LIB for libiconv. Instead, use bits of AM_ICONV.
* configure: Regenerate.
* scripts/testsuite_flags.in (cxxflags): Add LIBICONV bits.
2007-01-24 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/29722 continued
* testsuite/lib/libstdc++.exp (v3_target_compile_as_c): Add
libsupc++ library directory.
* testsuite/abi/cxx_runtime_only_linkage.cc: Remove hard-coded
path specification.
2007-01-21 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/29989
* include/bits/c++config: #undef min and max.
* include/bits/stl_algobase.h: Remove min and max #undefs.
* testsuite/18_support/numeric_limits/29989.cc: New.
2007-01-15 Paolo Carlini <pcarlini@suse.de>
* include/std/std_valarray.h (valarray<>::cshift): Fix typo.
2007-01-14 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_algobase.h (fill_n(char*, _Size,
const signed char&)): Fix signature.
* testsuite/25_algorithms/fill/3.cc: New.
2007-01-13 John David Anglin <dave.anglin@nrc-cnrc.gc>
* config/cpu/hppa/atomicity.h (__exchange_and_add): Don't use ordered
store.
(__atomic_add): Likewise.
2007-01-13 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/14991
* docs/html/17_intro/porting-howto.html ([3]): Mention stdio_filebuf.
* docs/html/17_intro/porting-howto.xml: Remove.
* docs/html/17_intro/porting-howto.html: Remove spurious end tags
pointed out by validator.w3.org.
2007-01-12 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/30416 (continued)
* include/std/std_valarray.h (valarray<>::shift, valarray<>::cshift):
Allways return the same variable, thus facilitating NRVO.
2007-01-12 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/30416
* include/std/std_valarray.h (valarray<>::shift, valarray<>::cshift):
Do not segfault when |n| > size.
* testsuite/26_numerics/valarray/30416.cc: New.
2007-01-06 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/30365
* crossconfig.m4 (case *-linux*): Run GLIBCXX_CHECK_LFS.
* configure: Regenerate.
2007-01-06 Matthias Klose <doko@debian.org>
* include/tr1/random (gamma_distribution): Fix typo in formula.
* docs/doxygen/user.cfg.in: Use package amsmath.

View File

@ -1,942 +0,0 @@
1998-12-31 Benjamin Kosnik <bkoz@lunatic.cygnus.com>
* bits/fstream.tcc: Add fstream ctor for cin/cout/etc.
* bits/std_fstream.h: Ditto.
* src/stdstreams.cc: Ditto.
* math/cpowl.c: Fix header typo with last change.
1998-12-31 Benjamin Kosnik <bkoz@loony.cygnus.com>
* COPYING: New file (GPL v 2).
* LICENSE.STD: Remove.
* ./*: Change license.
1998-12-30 Benjamin Kosnik <bkoz@haight.constant.com>
* bits/std_streambuf.h (std): Remove static on _M_init.
* bits/streambuf.tcc (std): Ditto.
* bits/std_fstream.h: Add changes as discussed with Nathan, including
state_type and codecvt_type members, the allocation of an internal
buffer, the streamlined codecvt calls, etc.
1998-12-21 Benjamin Kosnik <bkoz@haight.constant.com>
* bits/std_sstream.h: Tweak.
* bits/fstream.tcc: Remove unused stubs.
* bits/std_fstream.h: Tweak.
1998-12-17 Benjamin Kosnik <bkoz@tintin.cygnus.com>
* bits/std_streambuf.h: Move _IO_file_flags into basic_filebuf.
Remove unused _IO_* members, possibly put into filebuf, which may
need them.
* bits/std_fstream.h: Add _M_flag.
* bits/sbuf_iter.h: Tweak.
* bits/std_cstdio.h: Add SEEK_SET, SEEK_END, SEEK_CUR.
* bits/ios_base.h: Use.
* src/stdstreams.cc: Modify to reflect standard ctors for
filebuf.
* src/misc-inst.cc: Ditto.
* bits/os_raw.h: Wrap in std namespace. Model parameters on
underlying C library calls instead of the underlying unix
filesystem.
* src/os_raw.cc (_S_os_open): Use fopen, and compute a mode
string as per p.659.
(_S_os_close): Model on fopen.
(_S_os_read): Model on fread.
(_S_os_write): Model on fwrite.
(_S_os_seek): Model on fseek.
* bits/ios_base.h: Tweak.
* bits/std_iosfwd.h: Wrap libio.h include with extern "C".
* bits/std_sstream.h: Tweak.
* bits/sstream.tcc: Remove old, uncalled code.
* bits/std_fstream.h: Major reconstruction.
* bits/fstream.tcc: Disable for the time being.
1998-12-11 Benjamin Kosnik <bkoz@haight.constant.com>
* bits/basic_string.h: Fix insert method.
* stl/bits/stl_iterator.h: Remove previous hack.
* bits/std_streambuf.h (sbumpc): Correct increment/return oddness.
* bits/std_sstream.h: Fix more regressions.
* testsuite/27/27stringbuf.C: Add (almost) complete tests.
1998-12-09 Benjamin Kosnik <bkoz@loony.cygnus.com>
* bits/basic_string.h: Tweak.
* stl/bits/stl_iterator.h: Specialize iterator_traits for int so
that string::append can be instantiated. HACK--checkin
basic_string::iterator class.
1998-12-07 Benjamin Kosnik <bkoz@haight.constant.com>
* bits/std_sstream.h: Tweak.
* bits/sstream.tcc: Tweak ctors.
FIXME invalid friend defs. . WHERE ARE THEY??
* bits/sbuf_iter.h (istreambuf_iterator::equal): Change to new
names for basic_streambuf data members.
* bits/std_streambuf.h: Add getloc() initialization bits.
basic_streambuf(): Initialize with global locale data.
imbue(): Set _M_init.
* bits/std_streambuf.h(seekoff, seekpos): Complete with invalid
stream pos == pos_type(off_type(-1)).
in_avail(): Complete default implementation.
snextc, sbumpc, sputbackc, sungetc, sputc, setg, xsputn,
underflow, uflow, xsgetn, showmany, sync: Ditto.
* bits/std_streambuf.h: _M_snextc_helper(): Remove.
* bits/streambuf.tcc (sputbackc): Temporarily remove, need to
re-populate with in-line member functions that are too big. Add
initialization for _M_init.
1998-12-03 Benjamin Kosnik <bkoz@cygnus.com>
* bits/sstream.tcc: Convert _Allocator to _Alloc. Add typedefs
for basic_string and basic_streambuf. Scope _IO_buf_* pointers to
streambuf_type.
* src/stdstreams.cc (std): Disable wchar_t instantiations.
* bits/c++config.h (_G_DEPRICATED): Add.
(_G_USE_WCHAR_T): Add.
* bits/std_streambuf.h: Radical reconstruction of basic_streambuf.
Take out _Streambuf_base. Put _IO_FILE data member in basic_filebuf.
* bits/streambuf.tcc (sputbackc): Remove ctor anti-def, Tweak.
* bits/std_fstream.h: Add comment for implementation.
* src/streambuf.cc: Remove.
* src/Makefile.in: Remove streambuf.lo.
* src/misc-inst.cc: Tweak.
1998-12-02 Benjamin Kosnik <bkoz@cygnus.com>
* bits/std_sstream.h: Add const_cast to rdbuf returns.
* testsuite/27stringstream.C: Modify.
1998-11-25 Benjamin Kosnik <bkoz@haight.constant.com>
* src/Makefile.in (libstdc___la_OBJECTS): Add streambuf.lo.
(libstdc___la_SOURCES): Ditto.
* bits/streambuf.tcc: Tweak.
* src/streambuf.cc: New file, add out-of-line definitions for
_Streambuf_base.
* src/misc-inst.cc: Remove _Streambuf_base instantiations.
Comment out wchar_t versions of the buffer instantiations, for now.
* bits/std_streambuf.h: Wrap libio.h include with extern "C".
Remove template wrapper around _Streambuf_base.
Move IO_* data members into _Streambuf_base.
Move _Streambuf_base members into streambuf.tcc.
* bits/c++config.h (_G_USE_LIBIO): Enable.
1998-11-02 Nathan Myers <ncm@cantrip.org>
* CHECKLIST: downgrade iterator implementations
* DESIGN: fill out notes about unimplemented features
1998-10-31 Nathan Myers <ncm@cantrip.org>
* CHECKLIST: itemized list of all interfaces, and status of each.
1998-10-30 Nathan Myers <ncm@cantrip.org>
* RELEASE-NOTES: add notes about optional includes, linking, running
* src/Makefile.am: handle header installs properly
* src/Makefile.in: regenerate from new src/Makefile.am
1998-10-30 Benjamin Kosnik <bkoz@loony.cygnus.com>
* bits/basic_string.h: Revert npos pending ciso646.
* src/Makefile.am: Revert CXX flags for now.
* src/Makefile.in: Ditto.
1998-10-30 Brendan Kehoe <brendan@cygnus.com>
* bits/std_sstream.h: Re-order ctors to put base before member
inits.
1998-10-30 Ryszard Kabatek <kabatek@chemie.uni-halle.de>
* stl/bits/std_memory.h: Fix typo.
1998-10-30 Nathan Myers <ncm@cantrip.org>
* src/string[A-Z]+.cc: change back to include "string.cc".
* src/Makefile.am: revert filename changes. We need a different
way to keep filenames in std/ from confusing Make.
* bits/basic_string.h: define _S_max_size right, return it from
string::max_size(); churn definition of npos again.
* bits/string.tcc: fix _S_frob_size to avoid uint overflow.
* bits/ios.cc: remove #ifdef on ios_base locale member initialization
* BUGS: clear cruft.
* C++STYLE: Touchup for release.
* CHECKLIST: Touchup for release.
* DESIGN: New file.
* LICENSE.STD: Add requirement to retain copyrights and to provide
the license with any copies.
* README: Update for release.
* TODO: Minor touchup for release.
* RELEASE-NOTES: prepare for release
1998-10-29 Ulrich Drepper <drepper@cygnus.com>
* src/string[A-Z]+.cc: Include stdstring.cc, not string.cc.
* src/Makefile.am (CXXFLAGS): Define _GNU_SOURCE.
* src/Makefile.am (CXXLINK): New variable. Make sure we don't use
CXX to generate the shared object.
* src/Makefile.am (headers): Remove duplicated char_traits.h.
1998-10-29 Brendan Kehoe <brendan@cygnus.com>
* bits/basic_string.h (basic_string<>::max_size): Subtract 1, not
2, from npos, solving infinite loop problems.
1998-10-29 18:41 Ulrich Drepper <drepper@cygnus.com>
* src/Makefile.am: Add rules to install headers.
1998-10-29 Nathan Myers <ncm@cantrip.org>
* bits/std_ostream.h: Remove #ifdef on operator<< for long double
* bits/ostream.tcc: Remove #ifdef on operator<< for long double
* shadow/libio.h:
* shadow/unistd.h:
* shadow/bits/wrap_libio.h:
* shadow/bits/wrap_unistd.h: New files.
1998-10-29 Brendan Kehoe <brendan@cygnus.com>
* bits/ostream.tcc (operator<<): Wrap with #ifdef
_G_HAVE_LONG_DOUBLE_IO, to match bits/std_ostream.h.
1998-10-29 Ulrich Drepper <drepper@cygnus.com>
* src/Makefile.am: Add temporarily rules to make sure misc-inst.cc
is not compiled with -fno-implicit-templates in effect.
* src/Makefile.am (EXTRA_SOURCES): Add string.cc and wstring.cc here.
(libstdc___la_SOURCES): Add all the string*.cc and wstring*.cc files.
* src/stringADDCS.cc: Wrapper around string.cc to define individual
function.
* src/stringADDPS.cc: Likewise.
* src/stringADDSC.cc: Likewise.
* src/stringADDSP.cc: Likewise.
* src/stringADDSS.cc: Likewise.
* src/stringBIST.cc: Likewise.
* src/stringBOST.cc: Likewise.
* src/stringCHTR.cc: Likewise.
* src/stringEQPS.cc: Likewise.
* src/stringEQSP.cc: Likewise.
* src/stringEQSS.cc: Likewise.
* src/stringEXTRA.cc: Likewise.
* src/stringGEPS.cc: Likewise.
* src/stringGESP.cc: Likewise.
* src/stringGESS.cc: Likewise.
* src/stringGETLI.cc: Likewise.
* src/stringGTPS.cc: Likewise.
* src/stringGTSP.cc: Likewise.
* src/stringGTSS.cc: Likewise.
* src/stringINSER.cc: Likewise.
* src/stringLEPS.cc: Likewise.
* src/stringLESP.cc: Likewise.
* src/stringLESS.cc: Likewise.
* src/stringLTPS.cc: Likewise.
* src/stringLTSP.cc: Likewise.
* src/stringLTSS.cc: Likewise.
* src/stringMAIN.cc: Likewise.
* src/stringNEPS.cc: Likewise.
* src/stringNESP.cc: Likewise.
* src/stringNESS.cc: Likewise.
* src/stringSCOPY.cc: Likewise.
* src/wstringADDCS.cc: Wrapper around wstring.cc to define individual
functions.
* src/wstringADDPS.cc: Likewise.
* src/wstringADDSC.cc: Likewise.
* src/wstringADDSP.cc: Likewise.
* src/wstringADDSS.cc: Likewise.
* src/wstringBIST.cc: Likewise.
* src/wstringBOST.cc: Likewise.
* src/wstringCHTR.cc: Likewise.
* src/wstringEQPS.cc: Likewise.
* src/wstringEQSP.cc: Likewise.
* src/wstringEQSS.cc: Likewise.
* src/wstringEXTRA.cc: Likewise.
* src/wstringGEPS.cc: Likewise.
* src/wstringGESP.cc: Likewise.
* src/wstringGESS.cc: Likewise.
* src/wstringGETLI.cc: Likewise.
* src/wstringGTPS.cc: Likewise.
* src/wstringGTSP.cc: Likewise.
* src/wstringGTSS.cc: Likewise.
* src/wstringINSER.cc: Likewise.
* src/wstringLEPS.cc: Likewise.
* src/wstringLESP.cc: Likewise.
* src/wstringLESS.cc: Likewise.
* src/wstringLTPS.cc: Likewise.
* src/wstringLTSP.cc: Likewise.
* src/wstringLTSS.cc: Likewise.
* src/wstringMAIN.cc: Likewise.
* src/wstringNEPS.cc: Likewise.
* src/wstringNESP.cc: Likewise.
* src/wstringNESS.cc: Likewise.
* src/wstringSCOPY.cc: Likewise.
* src/string.cc: Remove now unneeded #defines now.
1998-10-29 Nathan Myers <ncm@cantrip.org>
* bits/locfacets.tcc: Define num_put::put(... const void*), improve
integer formatting.
* bits/ostream.tcc: Delete cruft, rewrite various op<< as members,
add definitions for double, long double, const void*.
* bits/std_ostream.h: Move op<<'s back into class ostream,
define some in-line.
* bits/string.tcc: fix unnecessary-copying bug in op[], typos in
string construction from input iterators that Brendan reported.
1998-10-28 Brendan Kehoe <brendan@cygnus.com>
* stl/bits/stl_pair.h (op!=, op>, p<=, op>=): Add missing definitions.
* bits/valarray_meta.h (class _Constant): Move declaration to the
top, so the rest of the file can grok it.
(_ApplyBinaryFunction::operator[]): Add missing parenthesis.
* bits/std_sstream.h (basic_ostringstream::str): Fix typo of extra
semicolon.
(basic_stringstream::str, both instances): Likewise.
1998-10-28 Nathan Myers <ncm@cantrip.org>
* bits/locfacets.h: fix num_put<>::falsename()
* bits/locfacets.tcc: fix _Format_cache<>::_M_populate bool name init
* testsuite/27/27octfmt.C, testsuite/27/27octfmt.C: new tests
* bits/locfacets.tcc: touch up _S_group_digits.
* src/misc-inst.cc: adjust _S_group_digits insts to match.
1998-10-27 Nathan Myers <ncm@cantrip.org>
* stl/bits/stl_config.h: Turn off long long support, for now.
* src/locale-inst.cc: Instantiate num_put<> only for
ostreambuf_iterator, num_get only for istreambuf_iterator.
* src/misc-inst.cc: Delete duplicate locale-related instantiations,
add lots of new instantiations for num_put support function templates;
remove junk about __match_parallel for ostreambuf_iterator.
1998-10-27 Nathan Myers <ncm@cantrip.org>
* bits/locfacets.tcc: Make num_put's digit grouping work.
* bits/string.tcc: More uglification.
* src/ios.cc: initialize format cache right
1998-10-26 Nathan Myers <ncm@cantrip.org>
* bits/basic_string.h: Uglify more names.
* bits/fstream.tcc: Rewrite some filebut output handling.
* bits/ios_base.h: Cosmetic.
* bits/locfacets.h: Changes to _Format_cache for support of num_put.
Also, specialize its default ctor for optimal default case.
#ifdef out "long long" prototypes for now.
* bits/locfacets.tcc: Do complete, optimized num_put<>::do_put
implementation for integer types. (Still needs optimized
std::copy() applied to ostreambuf_iterator to be optimal.)
* bits/ostream.tcc: Write operator<< for long, bool types.
Make other operators<< non-members, per spec. (Many still
not implemented.) Identify those that fail to create a sentry.
* bits/sbuf_iter: Cosmetic.
* bits/std_fstream.h: Add some filebuf members.
* bits/std_locale.h: Include <limits> for use in bits/locfacets.h
* bits/std_ostream.h: Make member operators<< global, per spec.
(Should do the same in std_istream.h.)
* bits/std_string.h: Include <limits> for use in bits/locfacets.h
* bits/string.tcc: Uglify names
* shadow/bits/std_cstdlib.h: Optimize std::div and std::ldiv.
* src/ios.cc: Specialize _Format_cache<> for char and wchar_t,
for optimal default behavior.
1998-10-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
* src/Makefile.in (libstdc___la_SOURCES): Add misc-inst.cc again.
1998-10-21 Nathan Myers <ncm@cantrip.org>
* src/locale.cc: make ctype operations actually work for glibc
* CHECKLIST: add a comprehensive (i.e. huge) implementation
checklist of stdlib facilities. Not filled in yet.
1998-10-20 Nathan Myers <ncm@cantrip.org>
* bits/string.tcc: fix patching NULs on string ends.
1998-10-19 Nathan Myers <ncm@cantrip.org>
* bits/std_iosfwd.h: eliminate "basic_" prefix on streambuf
iterator forward declarations
* bits/sbuf_iter.h: eliminate default template argument definitions
on streambuf iterators (rely on <iosfwd> decls).
* TODO: add note about lazy facet construction
* bits/basic_ios.h: hit operator void* again. This should be the
last time we need to touch it.
* bits/basic_ios.h: copyfmt now returns *this.
* bits/basic_string.h: fix npos again. npos cannot be defined as zero.
* bits/basic_string.h: put back overloaded constructors; adjust
behavior for default allocator on copy constructor.
* bits/char_traits.h: make not_eof return correct type.
* bits/loccore.h: remove call to bits/std_stdexcept.h; subincludes
cannot be in non-standard headers or we get include loops (bad)
* bits/loccore.h: delete ifdef'd out workarounds for old compiler bugs.
* bits/loccore.h: add apparatus to support lazy construction of
facets.
* bits/locfacets.tcc: Uglify names in __match_parallel decl.
* bits/std_ios.h: add include of <typeinfo> to get bad_cast for
locale use_facet<> failure.
* bits/std_locale.h: same.
* bits/std_string.h: same.
* bits/std_stdexcept.h: change exception member __msg from a
reference to a regular object.
* bits/string.tcc: add pasting a NUL on the end of strings after
each operation. We had already left room for it, but previously
plugged it only on a call to c_str(), but the WG changed the
requirement when I wasn't looking. (Can't leave them alone for
a second without they break something else.)
* bits/valarray_meta.h: add Gaby's changes from 981018.
* src/locale.cc: add new type _Bad_use_facet to be thrown on
failure of use_facet<>().
* src/stdexcept.cc: remove pragma, remove bkoz's #if 0,
comment out leftover member definitions
1998-10-16 Ulrich Drepper <drepper@cygnus.com>
* string/Makefile.am: Revert last change.
* math/Makefile.am: Likewise.
1998-10-15 Benjamin Kosnik <bkoz@haight.constant.com>
* bits/std_sstream.h: Fix typo.
1998-10-15 Benjamin Kosnik <bkoz@haight.constant.com>
* src/Makefile.am (libstdc___la_SOURCES): Add misc-inst.cc.
* bits/std_sstream.h: Add typedefs, member definitions. Clean.
* bits/std_stdexcept.h: Remove.
1998-10-15 Benjamin Kosnik <bkoz@haight.constant.com>
* src/misc-inst.cc: Tweak again.
* bits/std_sstream.h: Move out-of-line definitions to sstream.tcc.
* bits/sstream.tcc: New file.
1998-10-15 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Test for machine/param.h, sys/machine.h and fp.h.
Don't run AC_C_BIGENDIAN if machine/param.h or sys/machine.h are
available.
* math/mathconf.h: Include sys/machine.h, machine/param.h and fp.h
if available.
(INFINITE_P): Use IS_INF macro if available.
1998-10-15 Ulrich Drepper <drepper@cygnus.com>
* math/Makefile.am (EXTRA_LTLIBRARIES): Renamed from
noinst_LTLIBRARIES.
* string/Makefile.am: Likewise.
1998-10-15 Ulrich Drepper <drepper@cygnus.com>
* configure.in (AC_CHECK_FUNCS): Add finite, qfinite, fpclass, and
qfpclass.
(AC_CHECK_HEADERS): Add machine/endian.h. If no header specifying
endianess is available run AC_C_BIGENDIAN.
* math/clog10l.c: Add ugly hack around bug in Irix 6.2 header until
fixincludes is fixed.
* math/clogl.c: Likewise.
* math/csqrtl.c: Likewise.
* math/mycabsl.c: Likewise.
* math/mathconf.h: Include machine/endian.h if possible. If no
header describing endianess is available rely on WORDS_BIGENDIAN
macro.
(FINITE_P, FINITEF_P, FINITEL_P): Use finite functino if available.
(INFINITE_P, INFINITEF_P, INFINITEL_P): Use fpclass function if
available.
* src/complex.cc (polar): Don't use sincos on OSF machines.
1998-10-09 Benjamin Kosnik <bkoz@loony.cygnus.com>
* src/locale-inst.cc: Don't instantiate time_get for
ostreambuf_iterators as time_get::do_get_weekday and
time_get::do_get_monthname use __match_parallel, which is illegal
for ostreambuf_iterators to use, as they don't have operator== or
operator!=.
* bits/std_stdexcept.h: Add dtor definitions.
Use stl/bits/std_stdexcept.h instead of this file?
* bits/sbuf_iter.h : Tweak.
* src/misc-inst.cc: Tweak.
1998-10-09 Benjamin Kosnik <bkoz@haight.constant.com>
* bits/std_stdexcept.h: New file.
* src/stdexcept.cc: Define the following:
logic_error::what()
runtime_error::what()
* src/misc-inst.cc: New file.
* src/Makefile.in (libstdc___la_SOURCES): Add misc-inst.cc.
(libstdc___la_OBJECTS): Add misc-inst.lo.
* bits/basic_string.h: Disable non-standard ctor declarations.
* bits/string.tcc: Disable definitions as well.
* src/string.cc: Disable <ios> dependencies.
* bits/sbuf_iter.h (std): Add default to template parameter for
ostreambuf_iterator and istreambuf_iterator.
* bits/std_iosfwd.h: Change istreambuf_iterator to
basic_istreambuf_iterator. Likewise for ostreambuf.
* bits/locfacets.tcc (__match_parallel): Fix typo.
* src/ios.cc (imbue): Remove the _G_HAVE_LOCALE guards around
ios_base::imbue.
* bits/std_streambuf.h: Define _Streambuf_base::getloc().
* bits/std_istream.h: Define the following:
get (basic_streambuf<char_type,_Traits>& __sb, char_type __delim)
get (char_type* __s, streamsize __n, char_type __delim);
getline (char_type* __s, streamsize __n, char_type __delim)
* bits/loccore.h : FIXME friend template code for use_facet.
Add std_stdexcept.h include so that range_error will be defined.
Add explicit conversion to string for range_error throws. (HACK?)
1998-10-8 Ulrich Drepper <drepepr@cygnus.com>
* configure.in: Check for sincos, sincosf, and sincosl.
* src/complex.cc (polar): Use sincos if available.
* bits/c++config.h: Fix hack to get LONG_LONG* definitions on Linux.
* stl/bits/std_limits.h: Include bits/c++config.h. HACK!!!
* math/clog10.c: Fix typo (FP_INIFITE_P -> INFINITE_P).
* math/cpow.c: Use c_log, not clog.
* math/cpowf.c: Likewise.
* math/cpowl.c: Likewise.
* math/cexp.c: Remove unused fpclassify calls. Use FINITE_P instead
of isfinite call.
* math/mathconf.h (FINITE_P, FINITEF_P, FINITEL_P): Define using
isfinite macro if it is available.
(INFINITE_P, INFINITEF_P, INFINITEL_P): Define using isinf macro.
* math/ccosf.c: Use appropriate test macros for this type.
* math/ccoshf.c: Likewise.
* math/ccoshl.c: Likewise.
* math/ccosl.c: Likewise.
* math/cexpf.c: Likewise.
* math/cexpl.c: Likewise.
* math/clog10f.c: Likewise.
* math/clog10l.c: Likewise.
* math/clogf.c: Likewise.
* math/clogl.c: Likewise.
* math/csinf.c: Likewise.
* math/csinhf.c: Likewise.
* math/csinhl.c: Likewise.
* math/csinl.c: Likewise.
* math/csqrtf.c: Likewise.
* math/csqrtl.c: Likewise.
* math/ctanf.c: Likewise.
* math/ctanhf.c: Likewise.
* math/ctanhl.c: Likewise.
* math/ctanl.c: Likewise.
1998-10-06 Benjamin Kosnik <bkoz@bliss.nabi.net>
* bits/basic_ios.h: Fix previous change.
1998-10-06 Benjamin Kosnik <bkoz@bliss.nabi.net>
* bits/basic_ios.h: Add const_cast<basic_ios&>
(operator void*): As per 5.2.9 p 2, make sure static_cast is
well-formed.
* bits/char_traits.h: No _CharT for specialization, change to 0.
* bits/basic_string.h: As per 9.4.2 p4, initialize with
constant-initializer.
* bits/locfacets.tcc: Add template parameter to initialization list.
1998-10-02 Benjamin Kosnik <bkoz@loony.cygnus.com>
* bits/basic_string.h: Should just be <, not <=.
1998-10-01 Benjamin Kosnik <bkoz@bliss.nabi.net>
* bits/string.tcc (compare): Fix for strings that are similar, but
not the same length.
1998-09-04 Brendan Kehoe <brendan@cygnus.com>
* bits/c++config.h: For __linux__, define _GNU_SOURCE. This is
required for us to get LONG_LONG_{MIN,MAX} out of gcc's limits.h.
We can't check for __GLIBC__ here, since this header can be read
before any system one (that would lead to features.h) being used.
* stl/bits/stl_config.h (__STL_LONG_LONG): Re-enabled
* stl/bits/std_limits.h [__STL_LONG_LONG]: Fix usage to use
LONG_LONG_MIN, LONG_LONG_MAX, and ULONG_LONG_MAX.
* stl/bits/stl_config.h: Don't do __STL_LONG_LONG, it uses
LONGLONG_{MIN,MAX} which I can't find the origin of.
1998-09-03 Brendan Kehoe <brendan@cygnus.com>
* stl/bits/stl_iterator.h: Add extern decl of cin for now; where
should this come from, if not iostream.h?
(class istream_iterator): Make the new operator!= a friend also.
* stl/bits/stl_config.h: Define __STL_HAS_WCHAR_T,
__STL_MEMBER_TEMPLATE_CLASSES, and __STL_LONG_LONG. Don't include
_G_config.h like the egcs one does.
1998-09-01 Brendan Kehoe <brendan@cygnus.com>
* bits/string.tcc: Call `_M_destroy' instead of `destroy'.
* bits/valarray_meta.h: Throughout, rename _Expr typedefs to be
_Expr1 (or _Expr_def if it's taken), and change definitions.
Avoids redecl of the template parm.
* bits/string.tcc (basic_string copy ctor): Fix typo in declaration.
(operator>>): Initialize __ERROR with ios_base::goodbit, not 0.
* bits/std_streambuf.h (_POSIX_SOURCE): Only define if it's not
already done.
* src/locale-inst.cc: New file, **TOTAL HACK**. There has GOT to
be a better way to do this.
* src/stlinst.cc: New file.
* BUGS: New file, with various discovered bugs that need to be
fixed.
* Makefile.in, math/Makefile.in, string/Makefile.in,
src/Makefile.in: Reran automake.
Workarounds, these may not all be the final fixes:
* bits/basic_ios.h (class basic_ios): Make _M_strbuf be protected,
not private, for basic_istream::get() in std_istream.h to be able
to use it.
(basic_ios::operator void*): Don't use static_cast for the false
case.
(basic_ios::copyfmt): Fix `rhs.except' to be `rhs.exceptions ()'.
This appears to have been in sep94, but didn't get corrected
afterwards.
* bits/basic_string.h (npos): Don't init here.
* bits/string.tcc: Instead, do initialization here, to -1 instead
of the size_type destructor.
* src/traits.cc, src/wtraits.cc: New files.
* bits/char_traits.h: For char_traits<char> and
char_traits<wchar_t>, declare static, but define over in the src
files.
* bits/gslice.h: Comment out forward decls of _Array, valarray,
gslice_array, and _GsliceExpression.
* bits/std_cstdio.h [__sparc__ && __svr4__]: #undef all of
clearerr, feof, ferror, getc, getchar, putc, putchar, stdin,
stdout, and stderr. Note we do get unresolved refs to stdin, but
that'll get fixed by the "true" solution.
* bits/std_ios.h: Include <bits/std_streambuf.h> to get the
definition of basic_streambuf.h, which is used in basic_ios.h to
call pubimbue.
* bits/std_streambuf.h: Don't include libio.h for now.
(class basic_streambuf): Define missing methods pubimbue and
getloc.
* src/Makefile.am (libstdc___la_SOURCES): Add stdexcept.cc,
ios.cc, os_raw.cc, stdstreams.cc, locale.cc, localename.cc,
locale-inst.cc, stlinst.cc, traits.cc, wtraits.cc.
* src/ios.cc: Instantiate basic_ios<char> and basic_ios<wchar_t>.
* src/locale.cc: Come up with munged versions of _S_toupper,
_S_tolower, and _S_table instead of the glibc-specific ones, so
they're at least defined, if not necessarily usable. The glibc
ones on any other system will yield unresolved refs to
__ctype_{b,toupper,tolower}.
* src/string.cc: Define all of ADDCS, ADDPS, et al. Add
basic_ios, basic_istream, basic_ostream. Don't do char_traits
anymore cuz of the explicit specialization in char_traits.h.
Also add _S_string_copy, but this doesn't fix it -- cf the BUGS
file for the details.
* stl/bits/stl_algobase.h (equal): Fix to do `! (x==y)'.
* stl/bits/stl_iterator.h (__distance): Likewise.
* stl/bits/stl_iterator.h: As with 8/18 set, define missing op!=,
op>, op<=, and op>= for reverse_iterator. Also add op!= for
istream_iterator.
1998-08-26 Brendan Kehoe <brendan@cygnus.com>
* bits/string.tcc (basic_string::compare (const char*)): Fix to
return 0, not 1.
1998-08-25 Brendan Kehoe <brendan@cygnus.com>
This should really be fixed with __asm__ directives renaming the
symbol, but keeping the function.
* math/clogf.c (c_logf): Renamed from `clogf'.
* math/clogl.c (c_logl): Renamed from `clogl'.
* math/complex-stub.h (c_logf, c_logl): Change decls.
* bits/locfacets.h (class _Numeric_get): For friend decls, rename
_CharT and _InIter parms, since they duplicate the enclosing ones.
1998-08-19 Brendan Kehoe <brendan@cygnus.com>
Deal with conflict of the iostreams `clog' and our internal
complex number `clog'.
* src/complex.cc: Call `c_log' instead of `clog'.
* math/clog.c (c_log):: Renamed from clog.
* math/complex-stub.h (c_log): Renamed from clog decl.
* bits/locfacets.h (class _Numeric_get): Tweak fwd decls of the
get/put classes.
(num_put::put): #if 0 long long version, since we don't declare or
define the long long version of do_put.
1998-08-18 Nathan Myers <ncm@cantrip.org>
* bits/basic_string.h: add basic_string<>::push_back(), fix return
type of get_allocator (thanks to Ryszard Kabatek).
* bits/char_traits.h: make init order of fpos<> members
match decl order.
* bits/ios_base.h: fix decls of ios_base bitmask & enum types, add
flags _S_fd_in etc. for special filebuf ctor.
* bits/locfacets.h: make _Numeric_get and _Format_cache public
to work around problems in friend declarations.
* bits/locfacets.tcc: qualify _S_get_cache in num_get<>::get(..bool&),
fix random type errors & typos
* bits/std_fstream.h: major refitting to bypass libio (for now),
instrument to use bits/fstream.tcc template definitions
* bits/std_iosfwd.h: mess with wrappers
* bits/std_istream.h: remove meaningless comment
* bits/std_ostream.h: instrument to work with ostream.tcc.
* bits/std_streambuf.h: instrument to work with streambuf.tcc
* bits/fstream.tcc: template defs for <fstream>
* bits/ostream.tcc: template defs for <ostream>
* bits/streambuf.tcc: template defs for <streambuf>
* bits/os_raw.h: thin OS interface wrapper, to bypass libio (for now).
* Delete .cc files, replace with bits/*.tcc
src/fstream.cc
src/istream.cc
src/ostream.cc
src/streambuf.cc
* Add files:
src/os_raw.cc: thin interface to OS, to bypass libio (for now).
src/stdstreams.cc: cout, cin, etc. definitions
(these still need work: must be init'd before user statics.)
1998-08-18 Brendan Kehoe <brendan@cygnus.com>
Sent to SGI before checkin:
* stl/bits/stl_vector.h (operator!=, operator>, operator<=,
operator>=): Define.
* stl/bits/stl_bvector.h (vector<bool>::flip): Define method.
* stl/bits/stl_deque.h (operator!=, operator>, operator<=,
operator>=): Define.
(operator==, operator<): Add inline.
* stl/bits/stl_map.h (operator!=, operator<, operator<=,
operator>=): Define.
* stl/bits/stl_multimap.h (operator!=, operator<, operator<=,
operator>=): Define.
* stl/bits/stl_list.h (operator!=, operator<, operator<=,
operator>=): Define.
* stl/bits/stl_set.h (operator!=, operator<, operator<=,
operator>=): Define.
* stl/bits/stl_multiset.h (operator!=, operator<, operator<=,
operator>=): Define.
* bits/std_valarray.h (_Shift_left, _Shift_right): Inherit from
unary_function.
1998-08-15 Nathan Myers <ncm@cantrip.org>
* bits/ios_base.h: change nominal bitmask and enum types to real enums
* bits/locfacets.h: make _Format_cache bool names usable by num_get
* bits/locfacets.tcc: make num_get<>::get(... bool&) use _Format_cache
* bits/std_fstream.h: minor cleanups: ctors delegate to open()
* bits/std_iosfwd.h: more bitmask changes, for ios_base::iostate
* bits/std_sstream.h: formatting cleanups
1998-08-14 Nathan Myers <ncm@cantrip.org>
* bits/locfacets.tcc: implement num_get<>::do_get(..., bool&)
* bits/locfacets.tcc: implement time_get<>::do_get_weekday
* bits/locfacets.tcc: implement time_get<>::do_get_monthname
* bits/locfacets.h: fix missing argument in do_get_monthname
(this is a bug in the standard, ref. 36 in my list.)
* bits/locfacets.h: make month and day name caches mutable
* bits/locfacets.tcc: various typos in get() functions
* bits/sbuf_iter.h: fix omission in istreambuf_iterator::op++().
* bits/std_streambuf.h: fix typo in sgetn (Brendan)
1998-08-12 Nathan Myers <ncm@cantrip.org>
* move streambuf iterators to bits/sbuf_iter.h
* optimize streambuf iterators
* begin generalizing streambuf
* begin implementing num_get<>::get (starting with bool)
* patch stl/bits/stl_config.h so that relops operators are
contained properly, out of the way.
1998-07-24 Nathan Myers <ncm@cantrip.org>
* Fold in SGI 3.11 changes (uglified names, some algorithm
improvements, very minor bug fixes.)
* Uglify names elsewhere to match (s/_T/_Tp/).
* Begin work on optimized streambuf
* Put complex.cc in namespace std:: (thanks Martin)
1998-07-17 Nathan Myers <ncm@cantrip.org>
* bits/char_traits.h: add _Char_traits_match template.
* bits/string.tcc: fix bugs in various find_last* members.
* bits/basic_string.h: redeclare member _S_find.
* stl/bits/stl_iterator.h: change member names in nonstandard
templates bidirectional_reverse_iterator and
random_access_reverse_iterator to match expected changes
in upstream source.
* src/string.cc: fix definitions of stream operators.
1998-07-14 16:06 Ulrich Drepper <drepper@cygnus.com>
* Makefile.am (SUBDIRS): Add string.
* configure.in: Test for long double functions separately. Test for
ISO C 89 float functions. Test for endian.h and sys/isa_defs.h.
Generate string/Makefile.
* bits/c++config.h: Define mbstate_t for Solaris.
* bits/char_traits.h: Remove unused #if.
* bits/std_cwchar.h: Declare wide char string functions.
* m4/stringfcts.m4: New file.
* math/complex-stub.h: Declare nan.
* math/nan.c: New file.
* math/mathconf.h: Hack around missing endian.h file.
Handle missing NAN definition.
Handle missing float math functions.
* src/Makefile.am (libstdc___la_LIBADD): Add libstring.la.
(libstdc___la_LDFLAGS): Set version information.
* src/complexl.cc: Don't compile any code if no long double functions
are available.
* string/Makefile.am: New file.
* string/dummy.c: New file.
* string/wmemchr.c: New file.
* string/wmemcmp.c: New file.
* string/wmemcpy.c: New file.
* string/wmemmove.c: New file.
* string/wmemset.c: New file.
1998-07-14 10:45 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Make it work.
* install-sh: New file.
* missing: New file.
* mkinstalldirs: New file.
* m4/mathfcts.m4: New file.
* math/Makefile.am: New file.
* bits/std_complex.h (conj): Mark specializations as inline.
* math/carg.c: New file.
* math/cargf.c: New file.
* math/cargl.c: New file.
* math/mycabs.c: New file.
* math/mycabsf.c: New file.
* math/mycabsl.c: New file.
* math/signbit.c: New file.
* math/signbitf.c: New file.
* math/signbitl.c: New file.
* math/ccos.c: Avoid ISO C 9x functionality.
* math/ccosf.c: Likewise.
* math/ccosh.c: Likewise.
* math/ccoshf.c: Likewise.
* math/ccoshl.c: Likewise.
* math/ccosl.c: Likewise.
* math/cexp.c: Likewise.
* math/cexpf.c: Likewise.
* math/cexpl.c: Likewise.
* math/clog.c: Likewise.
* math/clog10.c: Likewise.
* math/clog10f.c: Likewise.
* math/clog10l.c: Likewise.
* math/clogf.c: Likewise.
* math/clogl.c: Likewise.
* math/cpow.c: Likewise.
* math/cpowf.c: Likewise.
* math/cpowl.c: Likewise.
* math/csin.c: Likewise.
* math/csinf.c: Likewise.
* math/csinh.c: Likewise.
* math/csinhf.c: Likewise.
* math/csinhl.c: Likewise.
* math/csinl.c: Likewise.
* math/csqrt.c: Likewise.
* math/csqrtf.c: Likewise.
* math/csqrtl.c: Likewise.
* math/ctan.c: Likewise.
* math/ctanf.c: Likewise.
* math/ctanh.c: Likewise.
* math/ctanhf.c: Likewise.
* math/ctanhl.c: Likewise.
* math/ctanl.c: Likewise.
* math/complex-stub.h: New file.
* math/mathconf.h: New file.
* src/Makefile.am: New file.
* src/complex.cc: Use mathconf.h instead of complex.h.
Don't use cabs, always use __mycabs.
1998-02-13 Brendan Kehoe <brendan@cygnus.com>
* iterator (class reverse_iterator): Do some tweaks to be in sync
w/ the FDIS.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,118 +0,0 @@
## Makefile for the toplevel directory of the GNU C++ Standard library.
##
## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
## Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
## This file is part of the GNU ISO C++ Library. This library is free
## software; you can redistribute it and/or modify it under the
## terms of the GNU General Public License as published by the
## Free Software Foundation; either version 2, or (at your option)
## any later version.
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License along
## with this library; see the file COPYING. If not, write to the Free
## Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
## USA.
include $(top_srcdir)/fragment.am
if GLIBCXX_HOSTED
hosted_source = libmath src po testsuite
endif
## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
SUBDIRS = include libsupc++ $(hosted_source)
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
# These rules are messy, but are hella worth it.
doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--host_alias=${host_alias} \
--mode=user $${srcdir} $${builddir})
doxygen-maint:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--host_alias=${host_alias} \
--mode=maint $${srcdir} $${builddir})
doxygen-man:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--host_alias=${host_alias} \
--mode=man $${srcdir} $${builddir})
.PHONY: doxygen doxygen-maint doxygen-man
# Handy forwarding targets.
check-%:
cd testsuite && $(MAKE) $@
# Multilib support.
MAKEOVERRIDES=
# All the machinations with string instantiations messes up the
# automake-generated TAGS rule. Make a simple one here.
TAGS: tags-recursive $(LISP)
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"includedir=$(includedir)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
"gxx_include_dir=$(gxx_include_dir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"LD=$(LD)" \
"RANLIB=$(RANLIB)" \
"NM=$(NM)" \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)"
# Subdir rules rely on $(FLAGS_TO_PASS)
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
# Installation of distribution html documentation not yet supported
# TODO: Write custom install-html rule.
.PHONY: install-html
install-html:

View File

@ -1,800 +0,0 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/../config.guess \
$(srcdir)/../config.sub $(srcdir)/../install-sh \
$(srcdir)/../ltmain.sh $(srcdir)/../missing \
$(srcdir)/../mkinstalldirs $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure $(top_srcdir)/fragment.am \
$(top_srcdir)/scripts/testsuite_flags.in ChangeLog
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/no-executables.m4 \
$(top_srcdir)/../config/unwind_ipinfo.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \
$(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = scripts/testsuite_flags
depcomp =
am__depfiles_maybe =
SOURCES =
DIST_SOURCES =
MULTISRCTOP =
MULTIBUILDTOP =
MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = include libsupc++ libmath src po testsuite
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
ALLOCATOR_NAME = @ALLOCATOR_NAME@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@
CCODECVT_CC = @CCODECVT_CC@
CCOLLATE_CC = @CCOLLATE_CC@
CCTYPE_CC = @CCTYPE_CC@
CFLAGS = @CFLAGS@
CLOCALE_CC = @CLOCALE_CC@
CLOCALE_H = @CLOCALE_H@
CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
CMESSAGES_CC = @CMESSAGES_CC@
CMESSAGES_H = @CMESSAGES_H@
CMONEY_CC = @CMONEY_CC@
CNUMERIC_CC = @CNUMERIC_CC@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
CSTDIO_H = @CSTDIO_H@
CTIME_CC = @CTIME_CC@
CTIME_H = @CTIME_H@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
ENABLE_SYMVERS_GNU_FALSE = @ENABLE_SYMVERS_GNU_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LDBL_COMPAT_FALSE = @GLIBCXX_LDBL_COMPAT_FALSE@
GLIBCXX_LDBL_COMPAT_TRUE = @GLIBCXX_LDBL_COMPAT_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBICONV = @LIBICONV@
LIBMATHOBJS = @LIBMATHOBJS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
baseline_dir = @baseline_dir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
check_msgfmt = @check_msgfmt@
datadir = @datadir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
glibcxx_MOFILES = @glibcxx_MOFILES@
glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
glibcxx_POFILES = @glibcxx_POFILES@
glibcxx_builddir = @glibcxx_builddir@
glibcxx_localedir = @glibcxx_localedir@
glibcxx_prefixdir = @glibcxx_prefixdir@
glibcxx_srcdir = @glibcxx_srcdir@
glibcxx_thread_h = @glibcxx_thread_h@
glibcxx_toolexecdir = @glibcxx_toolexecdir@
glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@
oldincludedir = @oldincludedir@
port_specific_symbol_files = @port_specific_symbol_files@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
toplevel_srcdir = @toplevel_srcdir@
# May be used by various substitution variables.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
MAINT_CHARSET = latin1
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
PWD_COMMAND = $${PWDCMD-pwd}
STAMP = echo timestamp >
toolexecdir = $(glibcxx_toolexecdir)
toolexeclibdir = $(glibcxx_toolexeclibdir)
# These bits are all figured out from configure. Look in acinclude.m4
# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
CONFIG_CXXFLAGS = \
$(SECTION_FLAGS) $(EXTRA_CXX_FLAGS)
WARN_CXXFLAGS = \
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
# -I/-D flags to pass when compiling.
AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
@GLIBCXX_HOSTED_TRUE@hosted_source = libmath src po testsuite
SUBDIRS = include libsupc++ $(hosted_source)
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
# Multilib support.
MAKEOVERRIDES =
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"includedir=$(includedir)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
"gxx_include_dir=$(gxx_include_dir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"LD=$(LD)" \
"RANLIB=$(RANLIB)" \
"NM=$(NM)" \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)"
# Subdir rules rely on $(FLAGS_TO_PASS)
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/fragment.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps'; \
cd $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign --ignore-deps Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
scripts/testsuite_flags: $(top_builddir)/config.status $(top_srcdir)/scripts/testsuite_flags.in
cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
# GNU Make needs to see an explicit $(MAKE) variable in the command it
# runs to enable its job server during parallel builds. Hence the
# comments below.
all-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
install-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
mostlyclean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
clean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
distclean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
maintainer-clean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE)
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/.. $(distdir)/../config $(distdir)/scripts
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile all-multi config.h
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-multi clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-multi distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-exec-am: install-multi
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-multi maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-multi mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-multi \
am--refresh check check-am clean clean-generic clean-libtool \
clean-multi clean-recursive ctags ctags-recursive dist \
dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
distcheck distclean distclean-generic distclean-hdr \
distclean-libtool distclean-multi distclean-recursive \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-multi \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
maintainer-clean-multi maintainer-clean-recursive mostlyclean \
mostlyclean-generic mostlyclean-libtool mostlyclean-multi \
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-info-am
# These rules are messy, but are hella worth it.
doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--host_alias=${host_alias} \
--mode=user $${srcdir} $${builddir})
doxygen-maint:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--host_alias=${host_alias} \
--mode=maint $${srcdir} $${builddir})
doxygen-man:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`${PWD_COMMAND}`; \
${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
--host_alias=${host_alias} \
--mode=man $${srcdir} $${builddir})
.PHONY: doxygen doxygen-maint doxygen-man
# Handy forwarding targets.
check-%:
cd testsuite && $(MAKE) $@
# All the machinations with string instantiations messes up the
# automake-generated TAGS rule. Make a simple one here.
TAGS: tags-recursive $(LISP)
# Installation of distribution html documentation not yet supported
# TODO: Write custom install-html rule.
.PHONY: install-html
install-html:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,96 +0,0 @@
file: libstdc++-v3/README
New users may wish to point their web browsers to the file
documentation.html in the 'docs/html' subdirectory. It contains brief
building instructions and notes on how to configure the library in
interesting ways.
Instructions for configuring and building appear in
docs/html/install.html.
This directory contains the files needed to create an ISO Standard C++
Library.
It has subdirectories:
docs
Files in HTML and text format that document usage, quirks of the
implementation, and contributor checklists.
include
All header files for the C++ library are within this directory,
modulo specific runtime-related files that are in the libsupc++
directory.
include/std
Files meant to be found by #include <name> directives in
standard-conforming user programs.
include/c
Headers intended to directly include standard C headers.
[NB: this can be enabled via --enable-cheaders=c]
include/c_std
Headers intended to include standard C headers, and put select
names into the std:: namespace.
[NB: this is the default, and is the same as --enable-cheaders=c_std]
include/bits
Files included by standard headers and by other files in
the bits directory.
include/backward
Headers provided for backward compatibility, such as <iostream.h>.
They are not used in this library.
include/ext
Headers that define extensions to the standard library. No
standard header refers to any of them.
scripts
Scripts that are used during the configure, build, make, or test
process.
src
Files that are used in constructing the library, but are not
installed.
testsuites/[backward, demangle, ext, performance, thread, 17_* to 27_*]
Test programs are here, and may be used to begin to exercise the
library. Support for "make check" and "make check-install" is
complete, and runs through all the subdirectories here when this
command is issued from the build directory. Please note that
"make check" requires DejaGNU 1.4 or later to be installed. Please
note that "make check-script" calls the script mkcheck, which
requires bash, and which may need the paths to bash adjusted to
work properly, as /bin/bash is assumed.
Other subdirectories contain variant versions of certain files
that are meant to be copied or linked by the configure script.
Currently these are:
config/abi
config/cpu
config/io
config/locale
config/os
In addition, two subdirectories are convenience libraries:
libmath
Support routines needed for C++ math. Only needed if the
underlying "C" implementation is non-existent, in particular
required or optimal long double, long long, and C99 functionality.
libsupc++
Contains the runtime library for C++, including exception
handling and memory allocation and deallocation, RTTI, terminate
handlers, etc.
Note that glibc also has a bits/ subdirectory. We will either
need to be careful not to collide with names in its bits/
directory; or rename bits to (e.g.) cppbits/.
In files throughout the system, lines marked with an "XXX" indicate
a bug or incompletely-implemented feature. Lines marked "XXX MT"
indicate a place that may require attention for multi-thread safety.

File diff suppressed because it is too large Load Diff

View File

@ -1,591 +0,0 @@
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.6])])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 7
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 12
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.58])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$1 | $1:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is disabled by default
AC_ARG_ENABLE(maintainer-mode,
[ --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST(MAINT)dnl
]
)
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
#
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
# This was a mistake. There are at least two reasons why we must not
# use `-m 0755':
# - it causes special bits like SGID to be ignored,
# - it may be too restrictive (some setups expect 775 directories).
#
# Do not use -m 0755 and let people choose whatever they expect by
# setting umask.
#
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
# Some implementations (such as Solaris 8's) are not thread-safe: if a
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
# concurrently, both version can detect that a/ is missing, but only
# one can create it and the other will error out. Consequently we
# restrict ourselves to GNU make (using the --version option ensures
# this.)
AC_DEFUN([AM_PROG_MKDIR_P],
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# We used to keeping the `.' as first argument, in order to
# allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. However this is wrong
# for two reasons:
# 1. if the package is installed by a user who cannot write `.'
# make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
for d in ./-p ./--version;
do
test -d $d && rmdir $d
done
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
if test -f "$ac_aux_dir/mkinstalldirs"; then
mkdir_p='$(mkinstalldirs)'
else
mkdir_p='$(install_sh) -d'
fi
fi
AC_SUBST([mkdir_p])])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../config/enable.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/multi.m4])
m4_include([../config/no-executables.m4])
m4_include([../config/unwind_ipinfo.m4])
m4_include([../libtool.m4])
m4_include([crossconfig.m4])
m4_include([linkage.m4])
m4_include([acinclude.m4])

File diff suppressed because it is too large Load Diff

View File

@ -1,219 +0,0 @@
// Compatibility symbols for previous versions -*- C++ -*-
// Copyright (C) 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file compatibility.h
* This is an internal header file, included by other library sources.
* You should not attempt to use it directly.
*/
// Switch for symbol version macro.
#ifndef _GLIBCXX_APPLY_SYMVER
#error must define _GLIBCXX_APPLY_SYMVER before including __FILE__
#endif
/* gcc-3.4.4
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv
*/
namespace
{
_GLIBCXX_APPLY_SYMVER(_ZNSt21istreambuf_iteratorXXIcSt11char_traitsIcEEppEv,
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv)
#ifdef _GLIBCXX_USE_WCHAR_T
_GLIBCXX_APPLY_SYMVER(_ZNSt21istreambuf_iteratorXXIwSt11char_traitsIwEEppEv,
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv)
#endif
} // anonymous namespace
/* gcc-4.0.0
_ZNSs4_Rep26_M_set_length_and_sharableEj
_ZNSs7_M_copyEPcPKcj
_ZNSs7_M_moveEPcPKcj
_ZNSs9_M_assignEPcjc
_ZNKSs11_M_disjunctEPKc
_ZNKSs15_M_check_lengthEjjPKc
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEj
_ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwj
_ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwj
_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwjw
_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw
_ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEjjPKc
_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv
_ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv
_ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv
_ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv
_ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv
_ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv
_ZNSi6ignoreEi
_ZNSi6ignoreEv
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv
_ZNSt11char_traitsIcE2eqERKcS2_
_ZNSt11char_traitsIwE2eqERKwS2_
*/
namespace
{
_GLIBCXX_APPLY_SYMVER(_ZNSt11char_traitsIcE4eqXXERKcS2_,
_ZNSt11char_traitsIcE2eqERKcS2_)
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNSs9_M_copyXXEPcPKcj,
_ZNSs7_M_copyEPcPKcj)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSs9_M_copyXXEPcPKcm,
_ZNSs7_M_copyEPcPKcm)
#endif
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNSs9_M_moveXXEPcPKcj,
_ZNSs7_M_moveEPcPKcj)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSs9_M_moveXXEPcPKcm,
_ZNSs7_M_moveEPcPKcm)
#endif
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNSs11_M_assignXXEPcjc,
_ZNSs9_M_assignEPcjc)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSs11_M_assignXXEPcmc,
_ZNSs9_M_assignEPcmc)
#endif
_GLIBCXX_APPLY_SYMVER(_ZNKSs13_M_disjunctXXEPKc,
_ZNKSs11_M_disjunctEPKc)
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNKSs17_M_check_lengthXXEjjPKc,
_ZNKSs15_M_check_lengthEjjPKc)
#else
_GLIBCXX_APPLY_SYMVER(_ZNKSs17_M_check_lengthXXEmmPKc,
_ZNKSs15_M_check_lengthEmmPKc)
#endif
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNSs4_Rep28_M_set_length_and_sharableXXEj,
_ZNSs4_Rep26_M_set_length_and_sharableEj)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSs4_Rep28_M_set_length_and_sharableXXEm,
_ZNSs4_Rep26_M_set_length_and_sharableEm)
#endif
_GLIBCXX_APPLY_SYMVER(_ZNSi8ignoreXXEv, _ZNSi6ignoreEv)
#ifdef _GLIBCXX_PTRDIFF_T_IS_INT
_GLIBCXX_APPLY_SYMVER(_ZNSi8ignoreXXEi, _ZNSi6ignoreEi)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSi8ignoreXXEl, _ZNSi6ignoreEl)
#endif
_GLIBCXX_APPLY_SYMVER(_ZNKSt15basic_fstreamXXIcSt11char_traitsIcEE7is_openEv,
_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv)
_GLIBCXX_APPLY_SYMVER(_ZNKSt16basic_ifstreamXXIcSt11char_traitsIcEE7is_openEv,
_ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv)
_GLIBCXX_APPLY_SYMVER(_ZNKSt16basic_ofstreamXXIcSt11char_traitsIcEE7is_openEv,
_ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv)
// Support for wchar_t.
#ifdef _GLIBCXX_USE_WCHAR_T
_GLIBCXX_APPLY_SYMVER(_ZNSt11char_traitsIwE4eqXXERKwS2_,
_ZNSt11char_traitsIwE2eqERKwS2_)
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNSbIwSt11char_traitsIwESaIwEE9_M_copyXXEPwPKwj,
_ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwj)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSbIwSt11char_traitsIwESaIwEE9_M_copyXXEPwPKwm,
_ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwm)
#endif
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNSbIwSt11char_traitsIwESaIwEE9_M_moveXXEPwPKwj,
_ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwj)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSbIwSt11char_traitsIwESaIwEE9_M_moveXXEPwPKwm,
_ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwm)
#endif
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNSbIwSt11char_traitsIwESaIwEE11_M_assignXXEPwjw,
_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwjw)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSbIwSt11char_traitsIwESaIwEE11_M_assignXXEPwmw,
_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwmw)
#endif
_GLIBCXX_APPLY_SYMVER(_ZNKSbIwSt11char_traitsIwESaIwEE13_M_disjunctXXEPKw,
_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw)
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNKSbIwSt11char_traitsIwESaIwEE17_M_check_lengthXXEjjPKc,
_ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEjjPKc)
#else
_GLIBCXX_APPLY_SYMVER(_ZNKSbIwSt11char_traitsIwESaIwEE17_M_check_lengthXXEmmPKc,
_ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEmmPKc)
#endif
#ifdef _GLIBCXX_SIZE_T_IS_UINT
_GLIBCXX_APPLY_SYMVER(_ZNSbIwSt11char_traitsIwESaIwEE4_Rep28_M_set_length_and_sharableXXEj,
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEj)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSbIwSt11char_traitsIwESaIwEE4_Rep28_M_set_length_and_sharableXXEm,
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEm)
#endif
_GLIBCXX_APPLY_SYMVER(_ZNSt13basic_istreamIwSt11char_traitsIwEE8ignoreXXEv,
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv)
#ifdef _GLIBCXX_PTRDIFF_T_IS_INT
_GLIBCXX_APPLY_SYMVER(_ZNSt13basic_istreamIwSt11char_traitsIwEE8ignoreXXEi,
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi)
#else
_GLIBCXX_APPLY_SYMVER(_ZNSt13basic_istreamIwSt11char_traitsIwEE8ignoreXXEl,
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEl)
#endif
_GLIBCXX_APPLY_SYMVER(_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv,
_ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv)
_GLIBCXX_APPLY_SYMVER(_ZNKSt16basic_ifstreamXXIwSt11char_traitsIwEE7is_openEv,
_ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv)
_GLIBCXX_APPLY_SYMVER(_ZNKSt16basic_ofstreamXXIwSt11char_traitsIwEE7is_openEv,
_ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv)
#endif
} // anonymous namespace

View File

@ -1,202 +0,0 @@
## Linker script for GNU namespace versioning.
##
## Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
##
## This file is part of the GNU ISO C++ Library. This library is free
## software; you can redistribute it and/or modify it under the
## terms of the GNU General Public License as published by the
## Free Software Foundation; either version 2, or (at your option)
## any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License along
## with this library; see the file COPYING. If not, write to the Free
## Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
## USA.
GLIBCXX_3.7 {
global:
# Names inside the 'extern' block are demangled names.
extern "C++"
{
std::_6::*;
std::*
};
# operator new(size_t)
_Znw[jm];
# operator new(size_t, std::nothrow_t const&)
_Znw[jm]RKSt9nothrow_t;
# operator delete(void*)
_ZdlPv;
# operator delete(void*, std::nothrow_t const&)
_ZdlPvRKSt9nothrow_t;
# operator new[](size_t)
_Zna[jm];
# operator new[](size_t, std::nothrow_t const&)
_Zna[jm]RKSt9nothrow_t;
# operator delete[](void*)
_ZdaPv;
# operator delete[](void*, std::nothrow_t const&)
_ZdaPvRKSt9nothrow_t;
# function-scope static objects requires a guard variable.
_ZGVNSt*;
_ZTT*;
_ZTV*;
_ZTI*;
_ZTS*;
_ZTv0_n*;
# std::__convert_to_v
_ZNSt2_614__convert_to_v*;
# std::__copy_streambufs
_ZNSt2_617__copy_streambufsI[cw]NS_11char_traitsI[cw]EEEEiPNS_15basic_streambufIT_T0_EES7_;
# __gnu_cxx::__atomic_add
# __gnu_cxx::__exchange_and_add
_ZN9__gnu_cxx2_612__atomic_addEPV[il][il];
_ZN9__gnu_cxx2_618__exchange_and_addEPV[li][il];
# __gnu_cxx::__pool
_ZN9__gnu_cxx2_66__poolILb[01]EE13_M_initializeEv;
_ZN9__gnu_cxx2_66__poolILb[01]EE16_M_reserve_blockE[jm][jm];
_ZN9__gnu_cxx2_66__poolILb[01]EE16_M_reclaim_blockEPc[jm];
_ZN9__gnu_cxx2_66__poolILb[01]EE10_M_destroyEv;
_ZN9__gnu_cxx2_66__poolILb1EE16_M_get_thread_idEv;
_ZN9__gnu_cxx2_617__pool_alloc_base9_M_refillE[jm];
_ZN9__gnu_cxx2_617__pool_alloc_base16_M_get_free_listE[jm];
_ZN9__gnu_cxx2_617__pool_alloc_base12_M_get_mutexEv;
_ZN9__gnu_cxx2_69free_list6_M_getE[jm];
_ZN9__gnu_cxx2_69free_list8_M_clearEv;
local:
*;
};
# Symbols in the support library (libsupc++) have their own tag.
CXXABI_1.7 {
global:
__cxa_allocate_exception;
__cxa_bad_cast;
__cxa_bad_typeid;
__cxa_begin_catch;
__cxa_begin_cleanup;
__cxa_call_unexpected;
__cxa_current_exception_type;
__cxa_demangle;
__cxa_end_catch;
__cxa_end_cleanup;
__cxa_free_exception;
__cxa_get_exception_ptr;
__cxa_get_globals;
__cxa_get_globals_fast;
__cxa_guard_abort;
__cxa_guard_acquire;
__cxa_guard_release;
__cxa_pure_virtual;
__cxa_rethrow;
__cxa_throw;
__cxa_type_match;
__cxa_vec_cctor;
__cxa_vec_cleanup;
__cxa_vec_ctor;
__cxa_vec_delete2;
__cxa_vec_delete3;
__cxa_vec_delete;
__cxa_vec_dtor;
__cxa_vec_new2;
__cxa_vec_new3;
__cxa_vec_new;
__gxx_personality_v0;
__gxx_personality_sj0;
__dynamic_cast;
# *_type_info classes, ctor and dtor
_ZN10__cxxabiv117__array_type_info*;
_ZN10__cxxabiv117__class_type_info*;
_ZN10__cxxabiv116__enum_type_info*;
_ZN10__cxxabiv120__function_type_info*;
_ZN10__cxxabiv123__fundamental_type_info*;
_ZN10__cxxabiv117__pbase_type_info*;
_ZN10__cxxabiv129__pointer_to_member_type_info*;
_ZN10__cxxabiv119__pointer_type_info*;
_ZN10__cxxabiv120__si_class_type_info*;
_ZN10__cxxabiv121__vmi_class_type_info*;
# *_type_info classes, member functions
_ZNK10__cxxabiv117__class_type_info*;
_ZNK10__cxxabiv120__function_type_info*;
_ZNK10__cxxabiv117__pbase_type_info*;
_ZNK10__cxxabiv129__pointer_to_member_type_info*;
_ZNK10__cxxabiv119__pointer_type_info*;
_ZNK10__cxxabiv120__si_class_type_info*;
_ZNK10__cxxabiv121__vmi_class_type_info*;
# virtual table
_ZTVN10__cxxabiv117__array_type_infoE;
_ZTVN10__cxxabiv117__class_type_infoE;
_ZTVN10__cxxabiv116__enum_type_infoE;
_ZTVN10__cxxabiv120__function_type_infoE;
_ZTVN10__cxxabiv123__fundamental_type_infoE;
_ZTVN10__cxxabiv117__pbase_type_infoE;
_ZTVN10__cxxabiv129__pointer_to_member_type_infoE;
_ZTVN10__cxxabiv119__pointer_type_infoE;
_ZTVN10__cxxabiv120__si_class_type_infoE;
_ZTVN10__cxxabiv121__vmi_class_type_infoE;
# typeinfo structure (and some names)
_ZTI[a-z];
_ZTIP[a-z];
_ZTIPK[a-z];
_ZTIN10__cxxabiv117__array_type_infoE;
_ZTIN10__cxxabiv117__class_type_infoE;
_ZTIN10__cxxabiv116__enum_type_infoE;
_ZTIN10__cxxabiv120__function_type_infoE;
_ZTIN10__cxxabiv123__fundamental_type_infoE;
_ZTIN10__cxxabiv117__pbase_type_infoE;
_ZTIN10__cxxabiv129__pointer_to_member_type_infoE;
_ZTIN10__cxxabiv119__pointer_type_infoE;
_ZTIN10__cxxabiv120__si_class_type_infoE;
_ZTIN10__cxxabiv121__vmi_class_type_infoE;
# typeinfo name
_ZTS[a-z];
_ZTSP[a-z];
_ZTSPK[a-z];
_ZTSN10__cxxabiv117__array_type_infoE;
_ZTSN10__cxxabiv117__class_type_infoE;
_ZTSN10__cxxabiv116__enum_type_infoE;
_ZTSN10__cxxabiv120__function_type_infoE;
_ZTSN10__cxxabiv123__fundamental_type_infoE;
_ZTSN10__cxxabiv117__pbase_type_infoE;
_ZTSN10__cxxabiv129__pointer_to_member_type_infoE;
_ZTSN10__cxxabiv119__pointer_type_infoE;
_ZTSN10__cxxabiv120__si_class_type_infoE;
_ZTSN10__cxxabiv121__vmi_class_type_infoE;
# __gnu_cxx::_verbose_terminate_handler()
_ZN9__gnu_cxx2_627__verbose_terminate_handlerEv;
local:
*;
};

View File

@ -1,776 +0,0 @@
## Linker script for GNU versioning (GNU ld 2.13.91+ only.)
##
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
## Free Software Foundation, Inc.
##
## This file is part of the GNU ISO C++ Library. This library is free
## software; you can redistribute it and/or modify it under the
## terms of the GNU General Public License as published by the
## Free Software Foundation; either version 2, or (at your option)
## any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License along
## with this library; see the file COPYING. If not, write to the Free
## Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
## USA.
GLIBCXX_3.4 {
global:
# Names inside the 'extern' block are demangled names.
extern "C++"
{
std::[A-Za]*;
# std::ba[a-r]*;
std::basic_[a-e]*;
std::basic_f[a-r]*;
# std::basic_fstream;
std::basic_f[t-z]*;
std::basic_[g-h]*;
std::basic_i[a-e]*;
# std::basic_ifstream;
std::basic_i[g-r]*;
std::basic_istr[a-d]*;
# std::basic_istream;
std::basic_istr[f-z]*;
std::basic_i[t-z]*;
std::basic_[j-n]*;
std::basic_o[a-e]*;
# std::basic_ofstream;
# std::basic_o[g-z]*;
std::basic_o[g-r]*;
std::basic_ostr[a-d]*;
std::basic_ostr[f-z]*;
std::basic_[p-r]*;
std::basic_streambuf*;
# std::basic_string
# std::basic_stringbuf
std::basic_stringstream*;
std::basic_[t-z]*;
std::ba[t-z]*;
std::b[b-z]*;
std::c[a-g]*;
# std::char_traits;
std::c[i-z]*;
std::[d-h]*;
std::i[a-n]*;
std::ios_base::[A-Ha-z]*;
std::ios_base::_M_grow_words*;
std::ios_base::_M_init*;
std::ios_base::Init::[A-Za-z]*;
std::ios_base::[J-Za-z]*;
std::i[p-r]*;
# std::istream
# std::istreambuf_iterator
std::istringstream*;
std::istrstream*;
std::i[t-z]*;
std::[A-Zj-k]*;
std::length_error*;
std::logic_error*;
std::locale::[A-Za-e]*;
std::locale::facet::[A-Za-z]*;
std::locale::facet::_S_get_c_locale*;
std::locale::facet::_S_clone_c_locale*;
std::locale::facet::_S_create_c_locale*;
std::locale::facet::_S_destroy_c_locale*;
std::locale::[A-Zg-h]*;
std::locale::id::[A-Za-z]*;
std::locale::id::_M_id*;
std::locale::[A-Zj-z]*;
std::locale::_[A-Ha-z]*;
std::locale::_Impl::[A-Za-z]*;
# std::locale::_Impl::_M_[A-Za-z]*;
std::locale::_[J-Ra-z]*;
std::locale::_S_normalize_category*;
std::locale::_[T-Za-z]*;
# std::[A-Zm-r]*;
std::[A-Zm]*;
std::n[^u]*;
std::nu[^m]*;
std::num[^e]*;
std::[p-r]*;
std::ostrstream*;
std::out_of_range*;
std::overflow_error*;
std::set_new_handler*;
std::set_terminate*;
std::set_unexpected*;
# std::string
std::strstream*;
std::strstreambuf*;
std::[A-Zt-z]*;
std::_List_node_base::hook*;
std::_List_node_base::swap*;
std::_List_node_base::unhook*;
std::_List_node_base::reverse*;
std::_List_node_base::transfer*;
std::__throw_*;
std::__timepunct*;
std::__numeric_limits_base*;
std::__num_base::_S_format_float*;
std::__num_base::_S_format_int*;
std::__num_base::_S_atoms_in;
std::__num_base::_S_atoms_out;
std::__moneypunct_cache*;
std::__numpunct_cache*;
std::__timepunct_cache*;
__gnu_debug::_Error_formatter*;
};
# Names not in an 'extern' block are mangled names.
# __gnu_debug::_Safe_sequence_base and _Safe_iterator_base
_ZN11__gnu_debug19_Safe_sequence_base13_M_detach_allEv;
_ZN11__gnu_debug19_Safe_sequence_base18_M_detach_singularEv;
_ZN11__gnu_debug19_Safe_sequence_base22_M_revalidate_singularEv;
_ZN11__gnu_debug19_Safe_sequence_base7_M_swapERS0_;
_ZN11__gnu_debug19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb;
_ZN11__gnu_debug19_Safe_iterator_base9_M_detachEv;
_ZNK11__gnu_debug19_Safe_iterator_base11_M_singularEv;
_ZNK11__gnu_debug19_Safe_iterator_base14_M_can_compareERKS0_;
# std::string
_ZNSsC*;
_ZNSsD*;
_ZNSs[0-9][a-z]*;
_ZNSs12_Alloc_hiderC*;
_ZNSs12_M_leak_hardEv;
_ZNSs12_S_constructE[jm]cRKSaIcE;
_ZNSs12_S_empty_repEv;
_ZNSs13_S_copy_chars*;
_ZNSs[0-9][0-9]_M_replace*;
_ZNSs4_Rep10_M_destroy*;
_ZNSs4_Rep10_M_dispose*;
_ZNSs4_Rep10_M_refcopyEv;
_ZNSs4_Rep10_M_refdataEv;
_ZNSs4_Rep12_S_empty_repEv;
_ZNSs4_Rep13_M_set_leakedEv;
_ZNSs4_Rep15_M_set_sharableEv;
_ZNSs4_Rep7_M_grab*;
_ZNSs4_Rep8_M_clone*;
_ZNSs4_Rep9_S_createE[jm][jm]*;
_ZNSs7_M_dataEPc;
_ZNSs7_M_leakEv;
_ZNSs9_M_mutateE[jm][jm][jm];
_ZNSs4_Rep20_S_empty_rep_storageE;
_ZNSs4_Rep11_S_max_sizeE;
_ZNSs4_Rep11_S_terminalE;
_ZNSsaSE*;
_ZNSsixE*;
_ZNSspLE*;
_ZNKSs[0-9][a-z]*;
_ZNKSs[0-9][0-9][a-z]*;
_ZNKSs[a-z]*;
_ZNKSs4_Rep12_M_is_leakedEv;
_ZNKSs4_Rep12_M_is_sharedEv;
_ZNKSs6_M_repEv;
_ZNKSs7_M_dataEv;
_ZNKSs7_M_iendEv;
_ZNKSs8_M_check*;
_ZNKSs8_M_limit*;
_ZNKSs9_M_ibeginEv;
_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_E*;
# std::wstring
_ZNSbIwSt11char_traitsIwESaIwEEC*;
_ZNSbIwSt11char_traitsIwESaIwEED*;
_ZNSbIwSt11char_traitsIwESaIwEE[0-9][a-z]*;
_ZNSbIwSt11char_traitsIwESaIwEE12_Alloc_hiderC*;
_ZNSbIwSt11char_traitsIwESaIwEE12_M_leak_hardEv;
_ZNSbIwSt11char_traitsIwESaIwEE12_S_constructE[jm]wRKS1_;
_ZNSbIwSt11char_traitsIwESaIwEE12_S_empty_repEv;
_ZNSbIwSt11char_traitsIwESaIwEE13_S_copy_chars*;
_ZNSbIwSt11char_traitsIwESaIwEE[0-9][0-9]_M_replace*;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep10_M_destroy*;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep10_M_dispose*;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep10_M_refcopyEv;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep10_M_refdataEv;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep12_S_empty_repEv;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep13_M_set_leakedEv;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep15_M_set_sharableEv;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep7_M_grab*;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep8_M_clone*;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep9_S_createE[jm][jm]*;
_ZNSbIwSt11char_traitsIwESaIwEE7_M_dataEPw;
_ZNSbIwSt11char_traitsIwESaIwEE7_M_leakEv;
_ZNSbIwSt11char_traitsIwESaIwEE9_M_mutateE[jm][jm][jm];
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep11_S_max_sizeE;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep11_S_terminalE;
_ZNSbIwSt11char_traitsIwESaIwEEaSE*;
_ZNSbIwSt11char_traitsIwESaIwEEixE*;
_ZNSbIwSt11char_traitsIwESaIwEEpLE*;
_ZNKSbIwSt11char_traitsIwESaIwEE[0-9][a-z]*;
_ZNKSbIwSt11char_traitsIwESaIwEE[0-9][0-9][a-z]*;
_ZNKSbIwSt11char_traitsIwESaIwEE[a-z]*;
_ZNKSbIwSt11char_traitsIwESaIwEE4_Rep12_M_is_leakedEv;
_ZNKSbIwSt11char_traitsIwESaIwEE4_Rep12_M_is_sharedEv;
_ZNKSbIwSt11char_traitsIwESaIwEE6_M_repEv;
_ZNKSbIwSt11char_traitsIwESaIwEE7_M_dataEv;
_ZNKSbIwSt11char_traitsIwESaIwEE7_M_iendEv;
_ZNKSbIwSt11char_traitsIwESaIwEE8_M_check*;
_ZNKSbIwSt11char_traitsIwESaIwEE8_M_limit*;
_ZNKSbIwSt11char_traitsIwESaIwEE9_M_ibeginEv;
_ZStplIwSt11char_traitsIwESaIwEESbIT_T0_T1_E*;
# std::basic_stringbuf
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[CD]*;
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][a-r]*;
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9]seek*;
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9]set*;
_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv;
_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv;
_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strERKSs;
_ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strERKSbIwS1_S2_E;
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][t-z]*;
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9]_M_[a-z]*;
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][0-9]_M_[a-z]*;
# std::basic_iostream constructors, destructors
_ZNSdC*;
_ZNSdD*;
# std::basic_fstream
_ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EEC*;
_ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EED*;
_ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EE5closeEv;
_ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
_ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EE4open*;
_ZNKSt13basic_fstreamI[cw]St11char_traitsI[cw]EE5rdbufEv;
# std::basic_ifstream
_ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EEC*;
_ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EED*;
_ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE5closeEv;
_ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
_ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE4open*;
_ZNKSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE5rdbufEv;
# std::basic_ofstream
_ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EEC*;
_ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EED*;
_ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE5closeEv;
_ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
_ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE4open*;
_ZNKSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE5rdbufEv;
# std::basic_istream<char>
_ZNSiC*;
_ZNSiD*;
_ZNKSi[0-9][a-z]*;
_ZNSi[0-9][a-h]*;
_ZNSi[0-9][j-z]*;
_ZNSi6ignoreE[il][il];
_ZNSirsE*[^g];
# std::basic_istream<wchar_t>
_ZNSt13basic_istreamIwSt11char_traitsIwEEC*;
_ZNSt13basic_istreamIwSt11char_traitsIwEED*;
_ZNKSt13basic_istreamIwSt11char_traitsIwEE[0-9][a-z]*;
_ZNSt13basic_istreamIwSt11char_traitsIwEE[0-9][a-h]*;
_ZNSt13basic_istreamIwSt11char_traitsIwEE[0-9][j-z]*;
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[il][ijlm];
_ZNSt13basic_istreamIwSt11char_traitsIwEErsE*[^g];
# std::istream operators and extractors
_ZSt7getlineI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istream*;
_ZSt2wsI[cw]St11char_traitsI[cw]EE*;
_ZStrsI[cw]St11char_traitsI[cw]EERSt13basic_istream*;
_ZStrsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istream*;
_ZStrsISt11char_traitsI[cw]EERSt13basic_istream*;
_ZStrsId[cw]St11char_traitsI[cw]EERSt13basic_istream*;
_ZStrsIe[cw]St11char_traitsI[cw]EERSt13basic_istream*;
_ZStrsIf[cw]St11char_traitsI[cw]EERSt13basic_istream*;
# std::basic_ostream<char>
_ZNSoC*;
_ZNSoD*;
_ZNKSo6sentrycvbEv;
_ZNSo8_M_writeEPKc[il];
_ZNSo[0-9][a-z]*;
_ZNSolsE*[^g];
# std::basic_ostream<wchar_t>
_ZNSt13basic_ostreamIwSt11char_traitsIwEEC*;
_ZNSt13basic_ostreamIwSt11char_traitsIwEED*;
_ZNKSt13basic_ostreamIwSt11char_traitsIwEE[0-9][a-z]*;
_ZNSt13basic_ostreamIwSt11char_traitsIwEE3putEw;
_ZNSt13basic_ostreamIwSt11char_traitsIwEE5flushEv;
_ZNSt13basic_ostreamIwSt11char_traitsIwEE5seekpE*;
_ZNSt13basic_ostreamIwSt11char_traitsIwEE5tellpEv;
_ZNSt13basic_ostreamIwSt11char_traitsIwEE5writeEPKw*;
_ZNSt13basic_ostreamIwSt11char_traitsIwEE6sentry*;
_ZNSt13basic_ostreamIwSt11char_traitsIwEE8_M_writeEPKw[il];
_ZNSt13basic_ostreamIwSt11char_traitsIwEElsE*[^g];
# std::ostream operators and inserters
_ZSt4end[ls]I[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
_ZSt5flushI[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
_ZStlsI[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
_ZStlsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_ostream*;
_ZStlsISt11char_traitsI[cw]EERSt13basic_ostream*;
_ZStlsId[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
_ZStlsIe[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
_ZStlsIf[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
# std::locale destructors
_ZNSt6localeD*;
# std::locale::facet destructors
_ZNSt6locale5facetD*;
# std::locale::_Impl constructors, destructors
_ZNSt6locale5_ImplC*;
_ZNSt6locale5_ImplD*;
# std::ios_base, std::ios_base::Init destructors
_ZNSt8ios_baseD*;
_ZNSt8ios_base4InitD*;
# bool std::has_facet
_ZSt9has_facetIS*;
# std::num_get
_ZNKSt7num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
# std::num_put
_ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
# std::money_get
_ZNKSt9money_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
# std::money_put
_ZNKSt9money_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
# std::numeric_limits
_ZNSt14numeric_limitsI[^g]*;
# std::_Rb_tree
_ZSt18_Rb_tree_decrementPKSt18_Rb_tree_node_base;
_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base;
_ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base;
_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base;
_ZSt20_Rb_tree_black_countPKSt18_Rb_tree_node_baseS1_;
_ZSt20_Rb_tree_rotate_leftPSt18_Rb_tree_node_baseRS0_;
_ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_;
_ZSt28_Rb_tree_rebalance_for_erasePSt18_Rb_tree_node_baseRS_;
_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_;
# std::__basic_file
_ZNKSt12__basic_fileIcE7is_openEv;
_ZNSt12__basic_fileIcE2fdEv;
_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei;
_ZNSt12__basic_fileIcE4syncEv;
_ZNSt12__basic_fileIcE5closeEv;
_ZNSt12__basic_fileIcE6xsgetn*;
_ZNSt12__basic_fileIcE6xsputn*;
_ZNSt12__basic_fileIcE7seekoff*;
_ZNSt12__basic_fileIcE8sys_openE*St13_Ios_Openmode;
_ZNSt12__basic_fileIcE8xsputn_2*;
_ZNSt12__basic_fileIcE9showmanycEv;
_ZNSt12__basic_fileIcEC*;
_ZNSt12__basic_fileIcED*;
# std::__convert_to_v
_ZSt14__convert_to_vI[^g]*;
# __gnu_cxx::stdio_sync_filebuf
_ZTVN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEE;
# __gnu_cxx::__atomic_add
# __gnu_cxx::__exchange_and_add
_ZN9__gnu_cxx12__atomic_addEPV[il]i;
_ZN9__gnu_cxx18__exchange_and_addEPV[il]i;
# debug mode
_ZN10__gnu_norm15_List_node_base4hook*;
_ZN10__gnu_norm15_List_node_base4swap*;
_ZN10__gnu_norm15_List_node_base6unhookEv;
_ZN10__gnu_norm15_List_node_base7reverseEv;
_ZN10__gnu_norm15_List_node_base8transfer*;
# operator new(size_t)
_Znw[jm];
# operator new(size_t, std::nothrow_t const&)
_Znw[jm]RKSt9nothrow_t;
# operator delete(void*)
_ZdlPv;
# operator delete(void*, std::nothrow_t const&)
_ZdlPvRKSt9nothrow_t;
# operator new[](size_t)
_Zna[jm];
# operator new[](size_t, std::nothrow_t const&)
_Zna[jm]RKSt9nothrow_t;
# operator delete[](void*)
_ZdaPv;
# operator delete[](void*, std::nothrow_t const&)
_ZdaPvRKSt9nothrow_t;
# virtual table
_ZTVNSt8ios_base7failureE;
_ZTVNSt6locale5facetE;
_ZTVS[a-z];
_ZTVSt[0-9][A-Za-z]*;
_ZTVSt[0-9][0-9][A-Za-z]*;
_ZTVSt11__timepunctI[cw]E;
_ZTVSt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
_ZTVSt21__ctype_abstract_baseI[cw]E;
# VTT structure
_ZTTS[a-z];
_ZTTSt[0-9][A-Za-z]*;
_ZTTSt[0-9][0-9][A-Za-z]*;
# typeinfo structure
_ZTIS[a-z];
_ZTINSt8ios_base7failureE;
_ZTINSt6locale5facetE;
_ZTISt[0-9][A-Za-z]*;
_ZTISt[0-9][0-9][A-Za-z]*;
_ZTISt11__timepunctI[cw]E;
_ZTISt10__num_base;
_ZTISt21__ctype_abstract_baseI[cw]E;
_ZTISt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
_ZTIN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEE;
_ZTIN9__gnu_cxx13stdio_filebufI[cw]St11char_traitsI[cw]EEE;
# typeinfo name
_ZTSNSt8ios_base7failureE;
_ZTSNSt6locale5facetE;
_ZTSS[a-z];
_ZTSSt[0-9][A-Za-z]*;
_ZTSSt[0-9][0-9][A-Za-z]*;
_ZTSSt11__timepunctI[cw]E;
_ZTSSt10__num_base;
_ZTSSt21__ctype_abstract_baseI[cw]E;
_ZTSSt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
_ZTSN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEE;
_ZTSN9__gnu_cxx13stdio_filebufI[cw]St11char_traitsI[cw]EEE;
# std::bad_alloc::~bad_alloc, std::bad_cast::~bad_cast,
# std::bad_typeid::~bad_typeid, std::bad_exception::~bad_exception
_ZNSt9bad_allocD*;
_ZNSt8bad_castD*;
_ZNSt10bad_typeidD*;
_ZNSt13bad_exceptionD*;
# function-scope static objects requires a guard variable.
_ZGVNSt[^1]*;
_ZGVNSt1[^7]*;
# virtual function thunks
_ZThn8_NS*;
_ZThn16_NS*;
_ZTv0_n12_NS*;
_ZTv0_n24_NS*;
# stub functions from libmath
sinf;
sinl;
sinhf;
sinhl;
cosf;
cosl;
coshf;
coshl;
tanf;
tanl;
tanhf;
tanhl;
atan2f;
atan2l;
expf;
expl;
hypotf;
hypotl;
hypot;
logf;
logl;
log10f;
log10l;
powf;
powl;
sqrtf;
sqrtl;
copysignf;
__signbit;
__signbitf;
__signbitl;
# GLIBCXX_ABI compatibility only.
# std::string
_ZNKSs11_M_disjunctEPKc;
_ZNKSs15_M_check_lengthE[jm][jm]PKc;
_ZNSs4_Rep26_M_set_length_and_sharableE*;
_ZNSs7_M_copyEPcPKc[jm];
_ZNSs7_M_moveEPcPKc[jm];
_ZNSs9_M_assignEPc[jm]c;
# std::wstring
_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw;
_ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthE[jm][jm]PKc;
_ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableE*;
_ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKw[jm];
_ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKw[jm];
_ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPw[jm]w;
_ZNKSt13basic_fstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
_ZNKSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
_ZNKSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
_ZNSi6ignoreE[ilv];
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[ilv];
_ZNSt11char_traitsI[cw]E2eqERK[cw]S2_;
_ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv;
# std::locale::Impl _M_ members
_ZNSt6locale5_Impl16_M_install_facetEPKNS_2idEPKNS_5facetE;
_ZNSt6locale5_Impl16_M_replace_facetEPKS0_PKNS_2idE;
_ZNSt6locale5_Impl19_M_replace_categoryEPKS0_PKPKNS_2idE;
_ZNSt6locale5_Impl21_M_replace_categoriesEPKS0_i;
# DO NOT DELETE THIS LINE. Port-specific symbols, if any, will be here.
local:
*;
};
GLIBCXX_3.4.1 {
_ZNSt12__basic_fileIcE4fileEv;
} GLIBCXX_3.4;
GLIBCXX_3.4.2 {
_ZN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EE4fileEv;
_ZN9__gnu_cxx17__pool_alloc_base9_M_refillE[jm];
_ZN9__gnu_cxx17__pool_alloc_base16_M_get_free_listE[jm];
_ZN9__gnu_cxx17__pool_alloc_base12_M_get_mutexEv;
} GLIBCXX_3.4.1;
GLIBCXX_3.4.3 {
# stub functions from libmath
acosf;
acosl;
asinf;
asinl;
atanf;
atanl;
ceilf;
ceill;
floorf;
floorl;
fmodf;
fmodl;
frexpf;
frexpl;
ldexpf;
ldexpl;
modff;
modfl;
} GLIBCXX_3.4.2;
GLIBCXX_3.4.4 {
_ZN9__gnu_cxx6__poolILb0EE13_M_initializeEv;
_ZN9__gnu_cxx6__poolILb1EE13_M_initializeEPFvPvE;
_ZN9__gnu_cxx6__poolILb1EE21_M_destroy_thread_keyEPv;
_ZN9__gnu_cxx6__poolILb1EE16_M_get_thread_idEv;
_ZN9__gnu_cxx6__poolILb[01]EE16_M_reserve_blockE[jm][jm];
_ZN9__gnu_cxx6__poolILb[01]EE16_M_reclaim_blockEPc[jm];
_ZN9__gnu_cxx6__poolILb[01]EE10_M_destroyEv;
_ZN9__gnu_cxx9free_list6_M_getE*;
_ZN9__gnu_cxx9free_list8_M_clearEv;
} GLIBCXX_3.4.3;
GLIBCXX_3.4.5 {
} GLIBCXX_3.4.4;
GLIBCXX_3.4.6 {
_ZSt17__copy_streambufsI[cw]St11char_traitsI[cw]EEiPSt15basic_streambuf*;
_ZNSt8ios_base17_M_call_callbacksENS_5eventE;
_ZNSt8ios_base20_M_dispose_callbacksEv;
_ZNSt6locale5facet13_S_get_c_nameEv;
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE9showmanycEv;
_ZN9__gnu_cxx6__poolILb1EE13_M_initializeEv;
} GLIBCXX_3.4.5;
GLIBCXX_3.4.7 {
_ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetE[jm];
} GLIBCXX_3.4.6;
GLIBCXX_3.4.8 {
_ZSt17__copy_streambufsI[cw]St11char_traitsI[cw]EElPSt15basic_streambuf*;
} GLIBCXX_3.4.7;
GLIBCXX_3.4.9 {
_ZNSt6__norm15_List_node_base4hook*;
_ZNSt6__norm15_List_node_base4swap*;
_ZNSt6__norm15_List_node_base6unhookEv;
_ZNSt6__norm15_List_node_base7reverseEv;
_ZNSt6__norm15_List_node_base8transfer*;
_ZNSo9_M_insertI[^g]*;
_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertI[^g]*;
_ZNSi10_M_extractI[^g]*;
_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractI[^g]*;
_ZSt21__copy_streambufs_eofI[cw]St11char_traitsI[cw]EE[il]PSt15basic_streambuf*;
_ZSt16__ostream_insert*;
_ZN11__gnu_debug19_Safe_sequence_base12_M_get_mutexEv;
_ZN11__gnu_debug19_Safe_iterator_base16_M_attach_singleEPNS_19_Safe_sequence_baseEb;
_ZN11__gnu_debug19_Safe_iterator_base16_M_detach_singleEv;
_ZN11__gnu_debug19_Safe_iterator_base12_M_get_mutexEv;
_ZNKSt9bad_alloc4whatEv;
_ZNKSt8bad_cast4whatEv;
_ZNKSt10bad_typeid4whatEv;
_ZNKSt13bad_exception4whatEv;
} GLIBCXX_3.4.8;
# Symbols in the support library (libsupc++) have their own tag.
CXXABI_1.3 {
global:
__cxa_allocate_exception;
__cxa_bad_cast;
__cxa_bad_typeid;
__cxa_begin_catch;
__cxa_begin_cleanup;
__cxa_call_unexpected;
__cxa_current_exception_type;
__cxa_demangle;
__cxa_end_catch;
__cxa_end_cleanup;
__cxa_free_exception;
__cxa_get_globals;
__cxa_get_globals_fast;
__cxa_guard_abort;
__cxa_guard_acquire;
__cxa_guard_release;
__cxa_pure_virtual;
__cxa_rethrow;
__cxa_throw;
__cxa_type_match;
__cxa_vec_cctor;
__cxa_vec_cleanup;
__cxa_vec_ctor;
__cxa_vec_delete2;
__cxa_vec_delete3;
__cxa_vec_delete;
__cxa_vec_dtor;
__cxa_vec_new2;
__cxa_vec_new3;
__cxa_vec_new;
__gxx_personality_v0;
__gxx_personality_sj0;
__dynamic_cast;
# *_type_info classes, ctor and dtor
_ZN10__cxxabiv117__array_type_info*;
_ZN10__cxxabiv117__class_type_info*;
_ZN10__cxxabiv116__enum_type_info*;
_ZN10__cxxabiv120__function_type_info*;
_ZN10__cxxabiv123__fundamental_type_info*;
_ZN10__cxxabiv117__pbase_type_info*;
_ZN10__cxxabiv129__pointer_to_member_type_info*;
_ZN10__cxxabiv119__pointer_type_info*;
_ZN10__cxxabiv120__si_class_type_info*;
_ZN10__cxxabiv121__vmi_class_type_info*;
# *_type_info classes, member functions
_ZNK10__cxxabiv117__class_type_info*;
_ZNK10__cxxabiv120__function_type_info*;
_ZNK10__cxxabiv117__pbase_type_info*;
_ZNK10__cxxabiv129__pointer_to_member_type_info*;
_ZNK10__cxxabiv119__pointer_type_info*;
_ZNK10__cxxabiv120__si_class_type_info*;
_ZNK10__cxxabiv121__vmi_class_type_info*;
# virtual table
_ZTVN10__cxxabiv117__array_type_infoE;
_ZTVN10__cxxabiv117__class_type_infoE;
_ZTVN10__cxxabiv116__enum_type_infoE;
_ZTVN10__cxxabiv120__function_type_infoE;
_ZTVN10__cxxabiv123__fundamental_type_infoE;
_ZTVN10__cxxabiv117__pbase_type_infoE;
_ZTVN10__cxxabiv129__pointer_to_member_type_infoE;
_ZTVN10__cxxabiv119__pointer_type_infoE;
_ZTVN10__cxxabiv120__si_class_type_infoE;
_ZTVN10__cxxabiv121__vmi_class_type_infoE;
# typeinfo structure (and some names)
_ZTI[a-fh-z];
_ZTIP[a-fh-z];
_ZTIPK[a-fh-z];
_ZTIN10__cxxabiv117__array_type_infoE;
_ZTIN10__cxxabiv117__class_type_infoE;
_ZTIN10__cxxabiv116__enum_type_infoE;
_ZTIN10__cxxabiv120__function_type_infoE;
_ZTIN10__cxxabiv123__fundamental_type_infoE;
_ZTIN10__cxxabiv117__pbase_type_infoE;
_ZTIN10__cxxabiv129__pointer_to_member_type_infoE;
_ZTIN10__cxxabiv119__pointer_type_infoE;
_ZTIN10__cxxabiv120__si_class_type_infoE;
_ZTIN10__cxxabiv121__vmi_class_type_infoE;
# typeinfo name
_ZTS[a-fh-z];
_ZTSP[a-fh-z];
_ZTSPK[a-fh-z];
_ZTSN10__cxxabiv117__array_type_infoE;
_ZTSN10__cxxabiv117__class_type_infoE;
_ZTSN10__cxxabiv116__enum_type_infoE;
_ZTSN10__cxxabiv120__function_type_infoE;
_ZTSN10__cxxabiv123__fundamental_type_infoE;
_ZTSN10__cxxabiv117__pbase_type_infoE;
_ZTSN10__cxxabiv129__pointer_to_member_type_infoE;
_ZTSN10__cxxabiv119__pointer_type_infoE;
_ZTSN10__cxxabiv120__si_class_type_infoE;
_ZTSN10__cxxabiv121__vmi_class_type_infoE;
# __gnu_cxx::_verbose_terminate_handler()
_ZN9__gnu_cxx27__verbose_terminate_handlerEv;
local:
*;
};
CXXABI_1.3.1 {
__cxa_get_exception_ptr;
} CXXABI_1.3;

View File

@ -1,7 +0,0 @@
#
# This is a placeholder file. It does nothing and is not used.
#
# If you are seeing this file as your linker script (named
# libstdc++-symbols.ver), then either 1) the configuration process
# determined that symbol versioning should not be done, or 2) you
# specifically turned it off. (ie, --disable-symvers).

View File

@ -1,42 +0,0 @@
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++allocator.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _CXX_ALLOCATOR_H
#define _CXX_ALLOCATOR_H 1
// Define bitmap_allocator as the base class to std::allocator.
#include <ext/bitmap_allocator.h>
#define __glibcxx_base_allocator __gnu_cxx::bitmap_allocator
#endif

View File

@ -1,42 +0,0 @@
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++allocator.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _CXX_ALLOCATOR_H
#define _CXX_ALLOCATOR_H 1
// Define new_allocator as the base class to std::allocator.
#include <ext/malloc_allocator.h>
#define __glibcxx_base_allocator __gnu_cxx::malloc_allocator
#endif

View File

@ -1,42 +0,0 @@
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++allocator.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _CXX_ALLOCATOR_H
#define _CXX_ALLOCATOR_H 1
// Define mt_allocator as the base class to std::allocator.
#include <ext/mt_allocator.h>
#define __glibcxx_base_allocator __gnu_cxx::__mt_alloc
#endif

View File

@ -1,42 +0,0 @@
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++allocator.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _CXX_ALLOCATOR_H
#define _CXX_ALLOCATOR_H 1
// Define new_allocator as the base class to std::allocator.
#include <ext/new_allocator.h>
#define __glibcxx_base_allocator __gnu_cxx::new_allocator
#endif

View File

@ -1,42 +0,0 @@
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++allocator.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _CXX_ALLOCATOR_H
#define _CXX_ALLOCATOR_H 1
// Define new_allocator as the base class to std::allocator.
#include <ext/pool_allocator.h>
#define __glibcxx_base_allocator __gnu_cxx::__pool_alloc
#endif

View File

@ -1,38 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("mb":::"memory")
#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("wmb":::"memory")
#endif

View File

@ -1,80 +0,0 @@
// Control various target specific ABI tweaks. ARM version.
// Copyright (C) 2004, 2006 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file cxxabi_tweaks.h
* The header provides an CPU-variable interface to the C++ ABI.
*/
#ifndef _CXXABI_TWEAKS_H
#define _CXXABI_TWEAKS_H 1
#ifdef __cplusplus
namespace __cxxabiv1
{
extern "C"
{
#endif
#ifdef __ARM_EABI__
// The ARM EABI uses the least significant bit of a 32-bit
// guard variable. */
#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0)
#define _GLIBCXX_GUARD_SET(x) *(x) = 1
typedef int __guard;
// We also want the element size in array cookies.
#define _GLIBCXX_ELTSIZE_IN_COOKIE 1
// __cxa_vec_ctor should return a pointer to the array.
typedef void * __cxa_vec_ctor_return_type;
#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x
// Constructors and destructors return the "this" pointer.
typedef void * __cxa_cdtor_return_type;
#else // __ARM_EABI__
// The generic ABI uses the first byte of a 64-bit guard variable.
#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
__extension__ typedef int __guard __attribute__((mode (__DI__)));
// __cxa_vec_ctor has void return type.
typedef void __cxa_vec_ctor_return_type;
#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return
// Constructors and destructors do not return a value.
typedef void __cxa_cdtor_return_type;
#endif //!__ARM_EABI__
#ifdef __cplusplus
}
} // namespace __cxxabiv1
#endif
#endif

View File

@ -1,36 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
// This entity must not cross a page boundary.
typedef int _Atomic_word __attribute__ ((__aligned__ (4)));
#endif

View File

@ -1,78 +0,0 @@
// Low-level functions for atomic operations: CRIS version -*- C++ -*-
// Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#include <ext/atomicity.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Atomic_word
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
int __tmp;
_Atomic_word __result;
#if (__CRIS_arch_version >= 10)
__asm__ __volatile__ (" clearf \n"
"0: \n"
" move.d %4,%2 \n"
" move.d [%3],%0 \n"
" add.d %0,%2 \n"
" ax \n"
" move.d %2,[%3] \n"
" bwf 0b \n"
" clearf \n"
: "=&r" (__result), "=Q" (*__mem), "=&r" (__tmp)
: "r" (__mem), "g" (__val), "Q" (*__mem)
/* The memory clobber must stay, regardless of
current uses of this function. */
: "memory");
#else
__asm__ __volatile__ (" move $ccr,$r9 \n"
" di \n"
" move.d %4,%2 \n"
" move.d [%3],%0 \n"
" add.d %0,%2 \n"
" move.d %2,[%3] \n"
" move $r9,$ccr \n"
: "=&r" (__result), "=Q" (*__mem), "=&r" (__tmp)
: "r" (__mem), "g" (__val), "Q" (*__mem)
: "r9",
/* The memory clobber must stay, regardless of
current uses of this function. */
"memory");
#endif
return __result;
}
void
__atomic_add(volatile _Atomic_word* __mem, int __val)
{ __exchange_and_add(__mem, __val); }
_GLIBCXX_END_NAMESPACE

View File

@ -1,52 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file atomic_word.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
// Define these two macros using the appropriate memory barrier for the target.
// The commented out versions below are the defaults.
// See ia64/atomic_word.h for an alternative approach.
// This one prevents loads from being hoisted across the barrier;
// in other words, this is a Load-Load acquire barrier.
// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.
// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
// This one prevents stores from being sunk across the barrier; in other
// words, a Store-Store release barrier.
// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
#endif

View File

@ -1,50 +0,0 @@
// Low-level functions for atomic operations: version for CPUs providing
// atomic builtins -*- C++ -*-
// Copyright (C) 2006 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file ext/atomicity.h
* This file is a GNU extension to the Standard C++ Library.
*/
#include <bits/c++config.h>
#include <bits/atomic_word.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{ return __sync_fetch_and_add(__mem, __val); }
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{ __sync_fetch_and_add(__mem, __val); }
_GLIBCXX_END_NAMESPACE

View File

@ -1,61 +0,0 @@
// Low-level functions for atomic operations: Generic version -*- C++ -*-
// Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file ext/atomicity.h
* This file is a GNU extension to the Standard C++ Library.
*/
#include <ext/atomicity.h>
#include <ext/concurrence.h>
namespace
{
__gnu_cxx::__mutex atomic_mutex;
} // anonymous namespace
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
__gnu_cxx::__scoped_lock sentry(atomic_mutex);
_Atomic_word __result;
__result = *__mem;
*__mem += __val;
return __result;
}
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{ __exchange_and_add(__mem, __val); }
_GLIBCXX_END_NAMESPACE

View File

@ -1,38 +0,0 @@
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file cpu_defines.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _GLIBCXX_CPU_DEFINES
#define _GLIBCXX_CPU_DEFINES 1
#endif

View File

@ -1,60 +0,0 @@
// Control various target specific ABI tweaks. Generic version.
// Copyright (C) 2004, 2006 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file cxxabi_tweaks.h
* The header provides an CPU-variable interface to the C++ ABI.
*/
#ifndef _CXXABI_TWEAKS_H
#define _CXXABI_TWEAKS_H 1
#ifdef __cplusplus
namespace __cxxabiv1
{
extern "C"
{
#endif
// The generic ABI uses the first byte of a 64-bit guard variable.
#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
__extension__ typedef int __guard __attribute__((mode (__DI__)));
// __cxa_vec_ctor has void return type.
typedef void __cxa_vec_ctor_return_type;
#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return
// Constructors and destructors do not return a value.
typedef void __cxa_cdtor_return_type;
#ifdef __cplusplus
}
} // namespace __cxxabiv1
#endif
#endif

View File

@ -1,96 +0,0 @@
// Low-level functions for atomic operations: PA-RISC version -*- C++ -*-
// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#include <bits/c++config.h>
#include <ext/atomicity.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
template<int _Inst>
struct _Atomicity_lock
{
static volatile int _S_atomicity_lock;
};
template<int _Inst>
volatile int
_Atomicity_lock<_Inst>::_S_atomicity_lock __attribute__ ((aligned (16))) = 1;
// Because of the lack of weak support when using the hpux som
// linker, we explicitly instantiate the atomicity lock.
template volatile int _Atomicity_lock<0>::_S_atomicity_lock;
int
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
_Atomic_word result;
int tmp;
volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock;
__asm__ __volatile__ ("ldcw 0(%1),%0\n\t"
"cmpib,<>,n 0,%0,.+20\n\t"
"ldw 0(%1),%0\n\t"
"cmpib,= 0,%0,.-4\n\t"
"nop\n\t"
"b,n .-20"
: "=&r" (tmp)
: "r" (&lock)
: "memory");
result = *__mem;
*__mem = result + __val;
__asm__ __volatile__ ("stw %1,0(%0)"
: : "r" (&lock), "r" (tmp) : "memory");
return result;
}
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{
int tmp;
volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock;
__asm__ __volatile__ ("ldcw 0(%1),%0\n\t"
"cmpib,<>,n 0,%0,.+20\n\t"
"ldw 0(%1),%0\n\t"
"cmpib,= 0,%0,.-4\n\t"
"nop\n\t"
"b,n .-20"
: "=&r" (tmp)
: "r" (&lock)
: "memory");
*__mem += __val;
__asm__ __volatile__ ("stw %1,0(%0)"
: : "r" (&lock), "r" (tmp) : "memory");
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,75 +0,0 @@
// Low-level functions for atomic operations: x86, x >= 3 version -*- C++ -*-
// Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#include <ext/atomicity.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
template<int __inst>
struct _Atomicity_lock
{
static volatile _Atomic_word _S_atomicity_lock;
};
template<int __inst>
volatile _Atomic_word _Atomicity_lock<__inst>::_S_atomicity_lock = 0;
template volatile _Atomic_word _Atomicity_lock<0>::_S_atomicity_lock;
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
register _Atomic_word __result, __tmp = 1;
// Obtain the atomic exchange/add spin lock.
do
{
__asm__ __volatile__ ("xchg{l} {%0,%1|%1,%0}"
: "=m" (_Atomicity_lock<0>::_S_atomicity_lock),
"+r" (__tmp)
: "m" (_Atomicity_lock<0>::_S_atomicity_lock));
}
while (__tmp);
__result = *__mem;
*__mem += __val;
// Release spin lock.
_Atomicity_lock<0>::_S_atomicity_lock = 0;
return __result;
}
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{ __exchange_and_add(__mem, __val); }
_GLIBCXX_END_NAMESPACE

View File

@ -1,54 +0,0 @@
// Low-level functions for atomic operations: x86, x >= 4 version -*- C++ -*-
// Copyright (C) 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#include <ext/atomicity.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
register _Atomic_word __result;
__asm__ __volatile__ ("lock; xadd{l} {%0,%1|%1,%0}"
: "=r" (__result), "=m" (*__mem)
: "0" (__val), "m" (*__mem));
return __result;
}
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{
__asm__ __volatile__ ("lock; add{l} {%1,%0|%0,%1}"
: "=m" (*__mem) : "ir" (__val), "m" (*__mem));
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,69 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
#include <bits/cxxabi_tweaks.h>
typedef int _Atomic_word;
namespace __gnu_cxx
{
// Test the first byte of __g and ensure that no loads are hoisted across
// the test.
inline bool
__test_and_acquire (__cxxabiv1::__guard *__g)
{
unsigned char __c;
unsigned char *__p = reinterpret_cast<unsigned char *>(__g);
// ldN.acq is a load with an implied hoist barrier.
// would ld8+mask be faster than just doing an ld1?
__asm __volatile ("ld1.acq %0 = %1" : "=r"(__c) : "m"(*__p) : "memory");
return __c != 0;
}
// Set the first byte of __g to 1 and ensure that no stores are sunk
// across the store.
inline void
__set_and_release (__cxxabiv1::__guard *__g)
{
unsigned char *__p = reinterpret_cast<unsigned char *>(__g);
// stN.rel is a store with an implied sink barrier.
// could load word, set flag, and CAS it back
__asm __volatile ("st1.rel %0 = %1" : "=m"(*__p) : "r"(1) : "memory");
}
// We don't define the _BARRIER macros on ia64 because the barriers are
// included in the test and set, above.
#define _GLIBCXX_GUARD_TEST_AND_ACQUIRE(G) __gnu_cxx::__test_and_acquire (G)
#define _GLIBCXX_GUARD_SET_AND_RELEASE(G) __gnu_cxx::__set_and_release (G)
}
#endif

View File

@ -1,134 +0,0 @@
// Low-level functions for atomic operations: m68k version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#include <ext/atomicity.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
#if ( defined(__mc68020__) || defined(__mc68030__) \
|| defined(__mc68040__) || defined(__mc68060__) ) \
&& !defined(__mcpu32__)
// These variants support compare-and-swap.
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
register _Atomic_word __result = *__mem;
register _Atomic_word __temp;
__asm__ __volatile__ ("1: move%.l %0,%1\n\t"
"add%.l %3,%1\n\t"
"cas%.l %0,%1,%2\n\t"
"jne 1b"
: "=d" (__result), "=&d" (__temp), "=m" (*__mem)
: "d" (__val), "0" (__result), "m" (*__mem));
return __result;
}
#elif defined(__rtems__)
// TAS/JBNE is unsafe on systems with strict priority-based scheduling.
// Disable interrupts, which we can do only from supervisor mode.
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
_Atomic_word __result;
short __level, __tmpsr;
__asm__ __volatile__ ("move%.w %%sr,%0\n\tor%.l %0,%1\n\tmove%.w %1,%%sr"
: "=d"(__level), "=d"(__tmpsr) : "1"(0x700));
__result = *__mem;
*__mem = __result + __val;
__asm__ __volatile__ ("move%.w %0,%%sr" : : "d"(__level));
return __result;
}
#else
template<int __inst>
struct _Atomicity_lock
{
static volatile unsigned char _S_atomicity_lock;
};
template<int __inst>
volatile unsigned char _Atomicity_lock<__inst>::_S_atomicity_lock = 0;
template volatile unsigned char _Atomicity_lock<0>::_S_atomicity_lock;
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
_Atomic_word __result;
// bset with no immediate addressing (not SMP-safe)
#if defined(__mcf5200__) || defined(__mcf5300__)
__asm__ __volatile__("1: bset.b #7,%0@\n\tjbne 1b"
: /* no outputs */
: "a"(&_Atomicity_lock<0>::_S_atomicity_lock)
: "cc", "memory");
// CPU32 and MCF5400 support test-and-set (SMP-safe).
#elif defined(__mcpu32__) || defined(__mcf5400__)
__asm__ __volatile__("1: tas %0\n\tjbne 1b"
: "+m"(_Atomicity_lock<0>::_S_atomicity_lock)
: /* none */
: "cc");
// Use bset with immediate addressing for 68000/68010 (not SMP-safe)
// NOTE: TAS is available on the 68000, but unsupported by some Amiga
// memory controllers.
#else
__asm__ __volatile__("1: bset.b #7,%0\n\tjbne 1b"
: "+m"(_Atomicity_lock<0>::_S_atomicity_lock)
: /* none */
: "cc");
#endif
__result = *__mem;
*__mem = __result + __val;
_Atomicity_lock<0>::_S_atomicity_lock = 0;
return __result;
}
#endif /* TAS / BSET */
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{
// Careful: using add.l with a memory destination is not
// architecturally guaranteed to be atomic.
__exchange_and_add(__mem, __val);
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,86 +0,0 @@
// Low-level functions for atomic operations: MIPS version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#include <ext/atomicity.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// NB: MIPS II or above required.
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
_Atomic_word __result, __tmp;
__asm__ __volatile__
("/* Inline exchange & add */\n\t"
"1:\n\t"
".set push\n\t"
#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
"ll %0,0(%2)\n\t"
"addu %1,%3,%0\n\t"
"sc %1,0(%2)\n\t"
".set pop\n\t"
"beqz %1,1b\n\t"
"/* End exchange & add */"
: "=&r"(__result), "=&r"(__tmp)
: "r"(__mem), "r"(__val)
: "memory" );
return __result;
}
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{
_Atomic_word __result;
__asm__ __volatile__
("/* Inline atomic add */\n\t"
"1:\n\t"
".set push\n\t"
#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
"ll %0,0(%1)\n\t"
"addu %0,%2,%0\n\t"
"sc %0,0(%1)\n\t"
".set pop\n\t"
"beqz %0,1b\n\t"
"/* End atomic add */"
: "=&r"(__result)
: "r"(__mem), "r"(__val)
: "memory" );
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,42 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("isync":::"memory")
#ifdef __NO_LWSYNC__
#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("sync":::"memory")
#else
#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("lwsync":::"memory")
#endif
#endif

View File

@ -1,41 +0,0 @@
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file cpu_defines.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _GLIBCXX_CPU_DEFINES
#define _GLIBCXX_CPU_DEFINES 1
// Integer divide instructions don't trap on PowerPC.
#define __glibcxx_integral_traps false
#endif

View File

@ -1,107 +0,0 @@
// Low-level functions for atomic operations: sh version -*- C++ -*-
// Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _BITS_ATOMICITY_H
#define _BITS_ATOMICITY_H 1
#ifdef __SH4A__
typedef int _Atomic_word;
static inline _Atomic_word
__attribute__ ((__unused__))
__exchange_and_add (volatile _Atomic_word* __mem, int __val)
{
_Atomic_word __result;
__asm__ __volatile__
("0:\n"
"\tmovli.l\t@%2,r0\n"
"\tmov\tr0,%1\n"
"\tadd\t%3,r0\n"
"\tmovco.l\tr0,@%2\n"
"\tbf\t0b"
: "+m" (*__mem), "=r" (__result)
: "r" (__mem), "rI08" (__val)
: "r0");
return __result;
}
static inline void
__attribute__ ((__unused__))
__atomic_add (volatile _Atomic_word* __mem, int __val)
{
asm("0:\n"
"\tmovli.l\t@%1,r0\n"
"\tadd\t%2,r0\n"
"\tmovco.l\tr0,@%1\n"
"\tbf\t0b"
: "+m" (*__mem)
: "r" (__mem), "rI08" (__val)
: "r0");
}
#else /* !__SH4A__ */
/* This is generic/atomicity.h */
#include <ext/atomicity.h>
#include <ext/concurrence.h>
namespace
{
__gnu_cxx::__mutex atomic_mutex;
} // anonymous namespace
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
__gnu_cxx::__scoped_lock sentry(atomic_mutex);
_Atomic_word __result;
__result = *__mem;
*__mem += __val;
return __result;
}
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{ __exchange_and_add(__mem, __val); }
_GLIBCXX_END_NAMESPACE
#endif /* !__SH4A__ */
#endif /* atomicity.h */

View File

@ -1,53 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
#ifdef __arch64__
typedef long _Atomic_word;
#else
typedef int _Atomic_word;
#endif
#if defined(__sparc_v9__)
// These are necessary under the V9 RMO model, though it is almost never
// used in userspace.
#define _GLIBCXX_READ_MEM_BARRIER \
__asm __volatile ("membar #LoadLoad":::"memory")
#define _GLIBCXX_WRITE_MEM_BARRIER \
__asm __volatile ("membar #StoreStore":::"memory")
#elif defined(__sparc_v8__)
// This is necessary under the PSO model.
#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("stbar":::"memory")
#endif
#endif

View File

@ -1,127 +0,0 @@
// Low-level functions for atomic operations: Sparc version -*- C++ -*-
// Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#include <ext/atomicity.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
#ifdef __arch64__
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
_Atomic_word __tmp1, __tmp2;
_Atomic_word __val_extended = __val;
__asm__ __volatile__("1: ldx [%3], %0\n\t"
" add %0, %4, %1\n\t"
" casx [%3], %0, %1\n\t"
" sub %0, %1, %0\n\t"
" brnz,pn %0, 1b\n\t"
" nop"
: "=&r" (__tmp1), "=&r" (__tmp2), "=m" (*__mem)
: "r" (__mem), "r" (__val_extended), "m" (*__mem));
return __tmp2;
}
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{
_Atomic_word __tmp1, __tmp2;
_Atomic_word __val_extended = __val;
__asm__ __volatile__("1: ldx [%3], %0\n\t"
" add %0, %4, %1\n\t"
" casx [%3], %0, %1\n\t"
" sub %0, %1, %0\n\t"
" brnz,pn %0, 1b\n\t"
" nop"
: "=&r" (__tmp1), "=&r" (__tmp2), "=m" (*__mem)
: "r" (__mem), "r" (__val_extended), "m" (*__mem));
}
#else /* __arch32__ */
template<int __inst>
struct _Atomicity_lock
{
static unsigned char _S_atomicity_lock;
};
template<int __inst>
unsigned char _Atomicity_lock<__inst>::_S_atomicity_lock = 0;
template unsigned char _Atomicity_lock<0>::_S_atomicity_lock;
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{
_Atomic_word __result, __tmp;
__asm__ __volatile__("1: ldstub [%1], %0\n\t"
" cmp %0, 0\n\t"
" bne 1b\n\t"
" nop"
: "=&r" (__tmp)
: "r" (&_Atomicity_lock<0>::_S_atomicity_lock)
: "memory");
__result = *__mem;
*__mem += __val;
__asm__ __volatile__("stb %%g0, [%0]"
: /* no outputs */
: "r" (&_Atomicity_lock<0>::_S_atomicity_lock)
: "memory");
return __result;
}
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word* __mem, int __val)
{
_Atomic_word __tmp;
__asm__ __volatile__("1: ldstub [%1], %0\n\t"
" cmp %0, 0\n\t"
" bne 1b\n\t"
" nop"
: "=&r" (__tmp)
: "r" (&_Atomicity_lock<0>::_S_atomicity_lock)
: "memory");
*__mem += __val;
__asm__ __volatile__("stb %%g0, [%0]"
: /* no outputs */
: "r" (&_Atomicity_lock<0>::_S_atomicity_lock)
: "memory");
}
#endif /* __arch32__ */
_GLIBCXX_END_NAMESPACE

View File

@ -1,381 +0,0 @@
// Wrapper of C-language FILE struct -*- C++ -*-
// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 27.8 File-based streams
//
#include <bits/basic_file.h>
#include <fcntl.h>
#include <errno.h>
#ifdef _GLIBCXX_HAVE_POLL
#include <poll.h>
#endif
// Pick up ioctl on Solaris 2.8
#ifdef _GLIBCXX_HAVE_UNISTD_H
#include <unistd.h>
#endif
// Pick up FIONREAD on Solaris 2
#ifdef _GLIBCXX_HAVE_SYS_IOCTL_H
#define BSD_COMP
#include <sys/ioctl.h>
#endif
// Pick up FIONREAD on Solaris 2.5.
#ifdef _GLIBCXX_HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif
#ifdef _GLIBCXX_HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG)
# include <sys/stat.h>
# ifdef _GLIBCXX_HAVE_S_ISREG
# define _GLIBCXX_ISREG(x) S_ISREG(x)
# else
# define _GLIBCXX_ISREG(x) (((x) & S_IFMT) == S_IFREG)
# endif
#endif
#include <limits> // For <off_t>::max() and min() and <streamsize>::max()
namespace
{
// Map ios_base::openmode flags to a string for use in fopen().
// Table of valid combinations as given in [lib.filebuf.members]/2.
static const char*
fopen_mode(std::ios_base::openmode mode)
{
enum
{
in = std::ios_base::in,
out = std::ios_base::out,
trunc = std::ios_base::trunc,
app = std::ios_base::app,
binary = std::ios_base::binary
};
switch (mode & (in|out|trunc|app|binary))
{
case ( out ): return "w";
case ( out |app ): return "a";
case ( out|trunc ): return "w";
case (in ): return "r";
case (in|out ): return "r+";
case (in|out|trunc ): return "w+";
// Extension to Table 92.
case (in|out |app ): return "a+";
case ( out |binary): return "wb";
case ( out |app|binary): return "ab";
case ( out|trunc |binary): return "wb";
case (in |binary): return "rb";
case (in|out |binary): return "r+b";
case (in|out|trunc |binary): return "w+b";
// Extension to Table 92.
case (in|out |app|binary): return "a+b";
default: return 0; // invalid
}
}
// Wrapper handling partial write.
static std::streamsize
xwrite(int __fd, const char* __s, std::streamsize __n)
{
std::streamsize __nleft = __n;
for (;;)
{
const std::streamsize __ret = write(__fd, __s, __nleft);
if (__ret == -1L && errno == EINTR)
continue;
if (__ret == -1L)
break;
__nleft -= __ret;
if (__nleft == 0)
break;
__s += __ret;
}
return __n - __nleft;
}
#ifdef _GLIBCXX_HAVE_WRITEV
// Wrapper handling partial writev.
static std::streamsize
xwritev(int __fd, const char* __s1, std::streamsize __n1,
const char* __s2, std::streamsize __n2)
{
std::streamsize __nleft = __n1 + __n2;
std::streamsize __n1_left = __n1;
struct iovec __iov[2];
__iov[1].iov_base = const_cast<char*>(__s2);
__iov[1].iov_len = __n2;
for (;;)
{
__iov[0].iov_base = const_cast<char*>(__s1);
__iov[0].iov_len = __n1_left;
const std::streamsize __ret = writev(__fd, __iov, 2);
if (__ret == -1L && errno == EINTR)
continue;
if (__ret == -1L)
break;
__nleft -= __ret;
if (__nleft == 0)
break;
const std::streamsize __off = __ret - __n1_left;
if (__off >= 0)
{
__nleft -= xwrite(__fd, __s2 + __off, __n2 - __off);
break;
}
__s1 += __ret;
__n1_left -= __ret;
}
return __n1 + __n2 - __nleft;
}
#endif
} // anonymous namespace
_GLIBCXX_BEGIN_NAMESPACE(std)
// Definitions for __basic_file<char>.
__basic_file<char>::__basic_file(__c_lock* /*__lock*/)
: _M_cfile(NULL), _M_cfile_created(false) { }
__basic_file<char>::~__basic_file()
{ this->close(); }
__basic_file<char>*
__basic_file<char>::sys_open(__c_file* __file, ios_base::openmode)
{
__basic_file* __ret = NULL;
if (!this->is_open() && __file)
{
int __err;
errno = 0;
do
__err = this->sync();
while (__err && errno == EINTR);
if (!__err)
{
_M_cfile = __file;
_M_cfile_created = false;
__ret = this;
}
}
return __ret;
}
__basic_file<char>*
__basic_file<char>::sys_open(int __fd, ios_base::openmode __mode)
{
__basic_file* __ret = NULL;
const char* __c_mode = fopen_mode(__mode);
if (__c_mode && !this->is_open() && (_M_cfile = fdopen(__fd, __c_mode)))
{
char* __buf = NULL;
_M_cfile_created = true;
if (__fd == 0)
setvbuf(_M_cfile, __buf, _IONBF, 0);
__ret = this;
}
return __ret;
}
__basic_file<char>*
__basic_file<char>::open(const char* __name, ios_base::openmode __mode,
int /*__prot*/)
{
__basic_file* __ret = NULL;
const char* __c_mode = fopen_mode(__mode);
if (__c_mode && !this->is_open())
{
#ifdef _GLIBCXX_USE_LFS
if ((_M_cfile = fopen64(__name, __c_mode)))
#else
if ((_M_cfile = fopen(__name, __c_mode)))
#endif
{
_M_cfile_created = true;
__ret = this;
}
}
return __ret;
}
bool
__basic_file<char>::is_open() const
{ return _M_cfile != 0; }
int
__basic_file<char>::fd()
{ return fileno(_M_cfile); }
__c_file*
__basic_file<char>::file()
{ return _M_cfile; }
__basic_file<char>*
__basic_file<char>::close()
{
__basic_file* __ret = static_cast<__basic_file*>(NULL);
if (this->is_open())
{
int __err = 0;
if (_M_cfile_created)
{
// In general, no need to zero errno in advance if checking
// for error first. However, C89/C99 (at variance with IEEE
// 1003.1, f.i.) do not mandate that fclose must set errno
// upon error.
errno = 0;
do
__err = fclose(_M_cfile);
while (__err && errno == EINTR);
}
_M_cfile = 0;
if (!__err)
__ret = this;
}
return __ret;
}
streamsize
__basic_file<char>::xsgetn(char* __s, streamsize __n)
{
streamsize __ret;
do
__ret = read(this->fd(), __s, __n);
while (__ret == -1L && errno == EINTR);
return __ret;
}
streamsize
__basic_file<char>::xsputn(const char* __s, streamsize __n)
{ return xwrite(this->fd(), __s, __n); }
streamsize
__basic_file<char>::xsputn_2(const char* __s1, streamsize __n1,
const char* __s2, streamsize __n2)
{
streamsize __ret = 0;
#ifdef _GLIBCXX_HAVE_WRITEV
__ret = xwritev(this->fd(), __s1, __n1, __s2, __n2);
#else
if (__n1)
__ret = xwrite(this->fd(), __s1, __n1);
if (__ret == __n1)
__ret += xwrite(this->fd(), __s2, __n2);
#endif
return __ret;
}
streamoff
__basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way)
{
#ifdef _GLIBCXX_USE_LFS
return lseek64(this->fd(), __off, __way);
#else
if (__off > numeric_limits<off_t>::max()
|| __off < numeric_limits<off_t>::min())
return -1L;
return lseek(this->fd(), __off, __way);
#endif
}
int
__basic_file<char>::sync()
{ return fflush(_M_cfile); }
streamsize
__basic_file<char>::showmanyc()
{
#ifdef FIONREAD
// Pipes and sockets.
#ifdef _GLIBCXX_FIONREAD_TAKES_OFF_T
off_t __num = 0;
#else
int __num = 0;
#endif
int __r = ioctl(this->fd(), FIONREAD, &__num);
if (!__r && __num >= 0)
return __num;
#endif
#ifdef _GLIBCXX_HAVE_POLL
// Cheap test.
struct pollfd __pfd[1];
__pfd[0].fd = this->fd();
__pfd[0].events = POLLIN;
if (poll(__pfd, 1, 0) <= 0)
return 0;
#endif
#if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG)
// Regular files.
#ifdef _GLIBCXX_USE_LFS
struct stat64 __buffer;
const int __err = fstat64(this->fd(), &__buffer);
if (!__err && _GLIBCXX_ISREG(__buffer.st_mode))
{
const streamoff __off = __buffer.st_size - lseek64(this->fd(), 0,
ios_base::cur);
return std::min(__off, streamoff(numeric_limits<streamsize>::max()));
}
#else
struct stat __buffer;
const int __err = fstat(this->fd(), &__buffer);
if (!__err && _GLIBCXX_ISREG(__buffer.st_mode))
return __buffer.st_size - lseek(this->fd(), 0, ios_base::cur);
#endif
#endif
return 0;
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,112 +0,0 @@
// Wrapper of C-language FILE struct -*- C++ -*-
// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 27.8 File-based streams
//
/** @file basic_file.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _BASIC_FILE_STDIO_H
#define _BASIC_FILE_STDIO_H 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <ios>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Generic declaration.
template<typename _CharT>
class __basic_file;
// Specialization.
template<>
class __basic_file<char>
{
// Underlying data source/sink.
__c_file* _M_cfile;
// True iff we opened _M_cfile, and thus must close it ourselves.
bool _M_cfile_created;
public:
__basic_file(__c_lock* __lock = 0);
__basic_file*
open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
__basic_file*
sys_open(__c_file* __file, ios_base::openmode);
__basic_file*
sys_open(int __fd, ios_base::openmode __mode);
__basic_file*
close();
bool
is_open() const;
int
fd();
__c_file*
file();
~__basic_file();
streamsize
xsputn(const char* __s, streamsize __n);
streamsize
xsputn_2(const char* __s1, streamsize __n1,
const char* __s2, streamsize __n2);
streamsize
xsgetn(char* __s, streamsize __n);
streamoff
seekoff(streamoff __off, ios_base::seekdir __way);
int
sync();
streamsize
showmanyc();
};
_GLIBCXX_END_NAMESPACE
#endif

View File

@ -1,54 +0,0 @@
// Underlying io library details -*- C++ -*-
// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++io.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
// c_io_stdio.h - Defines for using "C" stdio.h
#ifndef _C_IO_STDIO_H
#define _C_IO_STDIO_H 1
#include <cstdio>
#include <cstddef>
#include <bits/gthr.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
typedef __gthread_mutex_t __c_lock;
// for basic_file.h
typedef FILE __c_file;
_GLIBCXX_END_NAMESPACE
#endif

View File

@ -1,171 +0,0 @@
// std::ctype implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
#include <bits/c++locale_internal.h>
namespace std
{
// NB: The other ctype<char> specializations are in src/locale.cc and
// various /config/os/* files.
template<>
ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
: ctype<char>(0, false, __refs)
{
if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
{
this->_S_destroy_c_locale(this->_M_c_locale_ctype);
this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
}
}
#ifdef _GLIBCXX_USE_WCHAR_T
ctype<wchar_t>::__wmask_type
ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
{
// Darwin uses the same codes for 'char' as 'wchar_t', so this routine
// never gets called.
return __m;
};
wchar_t
ctype<wchar_t>::do_toupper(wchar_t __c) const
{ return towupper(__c); }
const wchar_t*
ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
{
while (__lo < __hi)
{
*__lo = towupper(*__lo);
++__lo;
}
return __hi;
}
wchar_t
ctype<wchar_t>::do_tolower(wchar_t __c) const
{ return towlower(__c); }
const wchar_t*
ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
{
while (__lo < __hi)
{
*__lo = towlower(*__lo);
++__lo;
}
return __hi;
}
wchar_t
ctype<wchar_t>::
do_widen(char __c) const
{ return _M_widen[static_cast<unsigned char>(__c)]; }
const char*
ctype<wchar_t>::
do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
{
while (__lo < __hi)
{
*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++__lo;
++__dest;
}
return __hi;
}
char
ctype<wchar_t>::
do_narrow(wchar_t __wc, char __dfault) const
{
if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
return _M_narrow[__wc];
const int __c = wctob(__wc);
return (__c == EOF ? __dfault : static_cast<char>(__c));
}
const wchar_t*
ctype<wchar_t>::
do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
char* __dest) const
{
if (_M_narrow_ok)
while (__lo < __hi)
{
if (*__lo >= 0 && *__lo < 128)
*__dest = _M_narrow[*__lo];
else
{
const int __c = wctob(*__lo);
*__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
}
++__lo;
++__dest;
}
else
while (__lo < __hi)
{
const int __c = wctob(*__lo);
*__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++__lo;
++__dest;
}
return __hi;
}
void
ctype<wchar_t>::_M_initialize_ctype()
{
wint_t __i;
for (__i = 0; __i < 128; ++__i)
{
const int __c = wctob(__i);
if (__c == EOF)
break;
else
_M_narrow[__i] = static_cast<char>(__c);
}
if (__i == 128)
_M_narrow_ok = true;
else
_M_narrow_ok = false;
for (size_t __i = 0;
__i < sizeof(_M_widen) / sizeof(wint_t); ++__i)
_M_widen[__i] = btowc(__i);
}
#endif // _GLIBCXX_USE_WCHAR_T
}

View File

@ -1,30 +0,0 @@
// Locale internal implementation header -*- C++ -*-
// Copyright (C) 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
// The generic locale code doesn't need to do anything here (yet)

View File

@ -1,180 +0,0 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.8 Standard locale categories.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <cerrno> // For errno
#include <cmath> // For isinf, finite, finitef, fabs
#include <cstdlib> // For strof, strtold
#include <locale>
#ifdef _GLIBCXX_HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
_GLIBCXX_BEGIN_NAMESPACE(std)
// Specializations for all types used in num_get.
template<>
void
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
const __c_locale&)
{
// Assumes __s formatted for "C" locale.
errno = 0;
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, "C");
char* __sanity;
#if defined(_GLIBCXX_HAVE_STRTOF)
float __f = strtof(__s, &__sanity);
#else
double __d = strtod(__s, &__sanity);
float __f = static_cast<float>(__d);
#ifdef _GLIBCXX_HAVE_FINITEF
if (!finitef (__f))
errno = ERANGE;
#elif defined (_GLIBCXX_HAVE_FINITE)
if (!finite (static_cast<double> (__f)))
errno = ERANGE;
#elif defined (_GLIBCXX_HAVE_ISINF)
if (isinf (static_cast<double> (__f)))
errno = ERANGE;
#else
if (fabs(__d) > numeric_limits<float>::max())
errno = ERANGE;
#endif
#endif
if (__sanity != __s && errno != ERANGE)
__v = __f;
else
__err |= ios_base::failbit;
setlocale(LC_ALL, __old);
free(__old);
}
template<>
void
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
const __c_locale&)
{
// Assumes __s formatted for "C" locale.
errno = 0;
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, "C");
char* __sanity;
double __d = strtod(__s, &__sanity);
if (__sanity != __s && errno != ERANGE)
__v = __d;
else
__err |= ios_base::failbit;
setlocale(LC_ALL, __old);
free(__old);
}
template<>
void
__convert_to_v(const char* __s, long double& __v,
ios_base::iostate& __err, const __c_locale&)
{
// Assumes __s formatted for "C" locale.
errno = 0;
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, "C");
#if defined(_GLIBCXX_HAVE_STRTOLD)
char* __sanity;
long double __ld = strtold(__s, &__sanity);
if (__sanity != __s && errno != ERANGE)
__v = __ld;
#else
typedef char_traits<char>::int_type int_type;
long double __ld;
int __p = sscanf(__s, "%Lf", &__ld);
if (__p && static_cast<int_type>(__p) != char_traits<char>::eof()
&& errno != ERANGE)
__v = __ld;
#endif
else
__err |= ios_base::failbit;
setlocale(LC_ALL, __old);
free(__old);
}
void
locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
__c_locale)
{
// Currently, the generic model only supports the "C" locale.
// See http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html
__cloc = NULL;
if (strcmp(__s, "C"))
__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
"name not valid"));
}
void
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
{ __cloc = NULL; }
__c_locale
locale::facet::_S_clone_c_locale(__c_locale&)
{ return __c_locale(); }
_GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
{
"LC_CTYPE",
"LC_NUMERIC",
"LC_TIME",
"LC_COLLATE",
"LC_MONETARY",
"LC_MESSAGES"
};
_GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(std)
const char* const* const locale::_S_categories = __gnu_cxx::category_names;
_GLIBCXX_END_NAMESPACE
// XXX GLIBCXX_ABI Deprecated
#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
#endif // _GLIBCXX_LONG_DOUBLE_COMPAT

View File

@ -1,97 +0,0 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++locale.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.8 Standard locale categories.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#ifndef _C_LOCALE_H
#define _C_LOCALE_H 1
#pragma GCC system_header
#include <clocale>
#include <cstring> // get std::strlen
#include <cstdio> // get std::vsnprintf or std::vsprintf
#include <cstdarg>
#define _GLIBCXX_NUM_CATEGORIES 0
_GLIBCXX_BEGIN_NAMESPACE(std)
typedef int* __c_locale;
// Convert numeric value of type double and long double to string and
// return length of string. If vsnprintf is available use it, otherwise
// fall back to the unsafe vsprintf which, in general, can be dangerous
// and should be avoided.
inline int
__convert_from_v(const __c_locale&, char* __out,
const int __size __attribute__((__unused__)),
const char* __fmt, ...)
{
char* __old = std::setlocale(LC_NUMERIC, NULL);
char* __sav = NULL;
if (std::strcmp(__old, "C"))
{
__sav = new char[std::strlen(__old) + 1];
std::strcpy(__sav, __old);
std::setlocale(LC_NUMERIC, "C");
}
va_list __args;
va_start(__args, __fmt);
#ifdef _GLIBCXX_USE_C99
const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
#else
const int __ret = std::vsprintf(__out, __fmt, __args);
#endif
va_end(__args);
if (__sav)
{
std::setlocale(LC_NUMERIC, __sav);
delete [] __sav;
}
return __ret;
}
_GLIBCXX_END_NAMESPACE
#endif

View File

@ -1,218 +0,0 @@
// std::codecvt implementation details, generic version -*- C++ -*-
// Copyright (C) 2002, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.1.5 - Template class codecvt
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Specializations.
#ifdef _GLIBCXX_USE_WCHAR_T
codecvt_base::result
codecvt<wchar_t, char, mbstate_t>::
do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const
{
result __ret = ok;
// The conversion must be done using a temporary destination buffer
// since it is not possible to pass the size of the buffer to wcrtomb
state_type __tmp_state(__state);
// The conversion must be done by calling wcrtomb in a loop rather
// than using wcsrtombs because wcsrtombs assumes that the input is
// zero-terminated.
// Either we can upper bound the total number of external characters to
// something smaller than __to_end - __to or the conversion must be done
// using a temporary destination buffer since it is not possible to
// pass the size of the buffer to wcrtomb
if (MB_CUR_MAX * (__from_end - __from) - (__to_end - __to) <= 0)
while (__from < __from_end)
{
const size_t __conv = wcrtomb(__to, *__from, &__tmp_state);
if (__conv == static_cast<size_t>(-1))
{
__ret = error;
break;
}
__state = __tmp_state;
__to += __conv;
__from++;
}
else
{
extern_type __buf[MB_LEN_MAX];
while (__from < __from_end && __to < __to_end)
{
const size_t __conv = wcrtomb(__buf, *__from, &__tmp_state);
if (__conv == static_cast<size_t>(-1))
{
__ret = error;
break;
}
else if (__conv > static_cast<size_t>(__to_end - __to))
{
__ret = partial;
break;
}
memcpy(__to, __buf, __conv);
__state = __tmp_state;
__to += __conv;
__from++;
}
}
if (__ret == ok && __from < __from_end)
__ret = partial;
__from_next = __from;
__to_next = __to;
return __ret;
}
codecvt_base::result
codecvt<wchar_t, char, mbstate_t>::
do_in(state_type& __state, const extern_type* __from,
const extern_type* __from_end, const extern_type*& __from_next,
intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const
{
result __ret = ok;
// This temporary state object is neccessary so __state won't be modified
// if [__from, __from_end) is a partial multibyte character.
state_type __tmp_state(__state);
// Conversion must be done by calling mbrtowc in a loop rather than
// by calling mbsrtowcs because mbsrtowcs assumes that the input
// sequence is zero-terminated.
while (__from < __from_end && __to < __to_end)
{
size_t __conv = mbrtowc(__to, __from, __from_end - __from,
&__tmp_state);
if (__conv == static_cast<size_t>(-1))
{
__ret = error;
break;
}
else if (__conv == static_cast<size_t>(-2))
{
// It is unclear what to return in this case (see DR 382).
__ret = partial;
break;
}
else if (__conv == 0)
{
// XXX Probably wrong for stateful encodings
__conv = 1;
*__to = L'\0';
}
__state = __tmp_state;
__to++;
__from += __conv;
}
// It is not clear that __from < __from_end implies __ret != ok
// (see DR 382).
if (__ret == ok && __from < __from_end)
__ret = partial;
__from_next = __from;
__to_next = __to;
return __ret;
}
int
codecvt<wchar_t, char, mbstate_t>::
do_encoding() const throw()
{
// XXX This implementation assumes that the encoding is
// stateless and is either single-byte or variable-width.
int __ret = 0;
if (MB_CUR_MAX == 1)
__ret = 1;
return __ret;
}
int
codecvt<wchar_t, char, mbstate_t>::
do_max_length() const throw()
{
// XXX Probably wrong for stateful encodings.
int __ret = MB_CUR_MAX;
return __ret;
}
int
codecvt<wchar_t, char, mbstate_t>::
do_length(state_type& __state, const extern_type* __from,
const extern_type* __end, size_t __max) const
{
int __ret = 0;
state_type __tmp_state(__state);
while (__from < __end && __max)
{
size_t __conv = mbrtowc(NULL, __from, __end - __from, &__tmp_state);
if (__conv == static_cast<size_t>(-1))
{
// Invalid source character
break;
}
else if (__conv == static_cast<size_t>(-2))
{
// Remainder of input does not form a complete destination
// character.
break;
}
else if (__conv == 0)
{
// XXX Probably wrong for stateful encodings
__conv = 1;
}
__state = __tmp_state;
__from += __conv;
__ret += __conv;
__max--;
}
return __ret;
}
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,73 +0,0 @@
// std::collate implementation details, generic version -*- C++ -*-
// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
_GLIBCXX_BEGIN_NAMESPACE(std)
// These are basically extensions to char_traits, and perhaps should
// be put there instead of here.
template<>
int
collate<char>::_M_compare(const char* __one, const char* __two) const
{
int __cmp = strcoll(__one, __two);
return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
}
template<>
size_t
collate<char>::_M_transform(char* __to, const char* __from,
size_t __n) const
{ return strxfrm(__to, __from, __n); }
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
int
collate<wchar_t>::_M_compare(const wchar_t* __one,
const wchar_t* __two) const
{
int __cmp = wcscoll(__one, __two);
return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
}
template<>
size_t
collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
size_t __n) const
{ return wcsxfrm(__to, __from, __n); }
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,268 +0,0 @@
// std::ctype implementation details, generic version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
_GLIBCXX_BEGIN_NAMESPACE(std)
// NB: The other ctype<char> specializations are in src/locale.cc and
// various /config/os/* files.
template<>
ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
: ctype<char>(0, false, __refs)
{
if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
{
this->_S_destroy_c_locale(this->_M_c_locale_ctype);
this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
}
}
#ifdef _GLIBCXX_USE_WCHAR_T
ctype<wchar_t>::__wmask_type
ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
{
__wmask_type __ret;
switch (__m)
{
case space:
__ret = wctype("space");
break;
case print:
__ret = wctype("print");
break;
case cntrl:
__ret = wctype("cntrl");
break;
case upper:
__ret = wctype("upper");
break;
case lower:
__ret = wctype("lower");
break;
case alpha:
__ret = wctype("alpha");
break;
case digit:
__ret = wctype("digit");
break;
case punct:
__ret = wctype("punct");
break;
case xdigit:
__ret = wctype("xdigit");
break;
case alnum:
__ret = wctype("alnum");
break;
case graph:
__ret = wctype("graph");
break;
default:
__ret = __wmask_type();
}
return __ret;
};
wchar_t
ctype<wchar_t>::do_toupper(wchar_t __c) const
{ return towupper(__c); }
const wchar_t*
ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
{
while (__lo < __hi)
{
*__lo = towupper(*__lo);
++__lo;
}
return __hi;
}
wchar_t
ctype<wchar_t>::do_tolower(wchar_t __c) const
{ return towlower(__c); }
const wchar_t*
ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
{
while (__lo < __hi)
{
*__lo = towlower(*__lo);
++__lo;
}
return __hi;
}
bool
ctype<wchar_t>::
do_is(mask __m, char_type __c) const
{
bool __ret = false;
// Generically, 15 (instead of 10) since we don't know the numerical
// encoding of the various categories in /usr/include/ctype.h.
const size_t __bitmasksize = 15;
for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
if (__m & _M_bit[__bitcur]
&& iswctype(__c, _M_wmask[__bitcur]))
{
__ret = true;
break;
}
return __ret;
}
const wchar_t*
ctype<wchar_t>::
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
{
for (;__lo < __hi; ++__vec, ++__lo)
{
// Generically, 15 (instead of 10) since we don't know the numerical
// encoding of the various categories in /usr/include/ctype.h.
const size_t __bitmasksize = 15;
mask __m = 0;
for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
if (iswctype(*__lo, _M_wmask[__bitcur]))
__m |= _M_bit[__bitcur];
*__vec = __m;
}
return __hi;
}
const wchar_t*
ctype<wchar_t>::
do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
{
while (__lo < __hi && !this->do_is(__m, *__lo))
++__lo;
return __lo;
}
const wchar_t*
ctype<wchar_t>::
do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
{
while (__lo < __hi && this->do_is(__m, *__lo) != 0)
++__lo;
return __lo;
}
wchar_t
ctype<wchar_t>::
do_widen(char __c) const
{ return _M_widen[static_cast<unsigned char>(__c)]; }
const char*
ctype<wchar_t>::
do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
{
while (__lo < __hi)
{
*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++__lo;
++__dest;
}
return __hi;
}
char
ctype<wchar_t>::
do_narrow(wchar_t __wc, char __dfault) const
{
if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
return _M_narrow[__wc];
const int __c = wctob(__wc);
return (__c == EOF ? __dfault : static_cast<char>(__c));
}
const wchar_t*
ctype<wchar_t>::
do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
char* __dest) const
{
if (_M_narrow_ok)
while (__lo < __hi)
{
if (*__lo >= 0 && *__lo < 128)
*__dest = _M_narrow[*__lo];
else
{
const int __c = wctob(*__lo);
*__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
}
++__lo;
++__dest;
}
else
while (__lo < __hi)
{
const int __c = wctob(*__lo);
*__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++__lo;
++__dest;
}
return __hi;
}
void
ctype<wchar_t>::_M_initialize_ctype()
{
wint_t __i;
for (__i = 0; __i < 128; ++__i)
{
const int __c = wctob(__i);
if (__c == EOF)
break;
else
_M_narrow[__i] = static_cast<char>(__c);
}
if (__i == 128)
_M_narrow_ok = true;
else
_M_narrow_ok = false;
for (size_t __i = 0;
__i < sizeof(_M_widen) / sizeof(wint_t); ++__i)
_M_widen[__i] = btowc(__i);
for (size_t __i = 0; __i <= 15; ++__i)
{
_M_bit[__i] = static_cast<mask>(1 << __i);
_M_wmask[__i] = _M_convert_to_wmask(_M_bit[__i]);
}
}
#endif // _GLIBCXX_USE_WCHAR_T
_GLIBCXX_END_NAMESPACE

View File

@ -1,53 +0,0 @@
// std::messages implementation details, generic version -*- C++ -*-
// Copyright (C) 2001, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Specializations
template<>
string
messages<char>::do_get(catalog, int, int, const string& __dfault) const
{ return __dfault; }
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
wstring
messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
{ return __dfault; }
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,93 +0,0 @@
// std::messages implementation details, generic version -*- C++ -*-
// Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file messages_members.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::messages(size_t __refs)
: facet(__refs)
{ _M_c_locale_messages = _S_get_c_locale(); }
template<typename _CharT>
messages<_CharT>::messages(__c_locale, const char*, size_t __refs)
: facet(__refs)
{ _M_c_locale_messages = _S_get_c_locale(); }
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
const char*) const
{ return this->do_open(__s, __loc); }
// Virtual member functions.
template<typename _CharT>
messages<_CharT>::~messages()
{ _S_destroy_c_locale(_M_c_locale_messages); }
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>&, const locale&) const
{ return 0; }
template<typename _CharT>
typename messages<_CharT>::string_type
messages<_CharT>::do_get(catalog, int, int,
const string_type& __dfault) const
{ return __dfault; }
template<typename _CharT>
void
messages<_CharT>::do_close(catalog) const
{ }
// messages_byname
template<typename _CharT>
messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
: messages<_CharT>(__refs)
{
if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
{
this->_S_destroy_c_locale(this->_M_c_locale_messages);
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
}
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,172 +0,0 @@
// std::moneypunct implementation details, generic version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Construct and return valid pattern consisting of some combination of:
// space none symbol sign value
money_base::pattern
money_base::_S_construct_pattern(char, char, char)
{ return _S_default_pattern; }
template<>
void
moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*)
{
// "C" locale.
if (!_M_data)
_M_data = new __moneypunct_cache<char, true>;
_M_data->_M_decimal_point = '.';
_M_data->_M_thousands_sep = ',';
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_curr_symbol = "";
_M_data->_M_curr_symbol_size = 0;
_M_data->_M_positive_sign = "";
_M_data->_M_positive_sign_size = 0;
_M_data->_M_negative_sign = "";
_M_data->_M_negative_sign_size = 0;
_M_data->_M_frac_digits = 0;
_M_data->_M_pos_format = money_base::_S_default_pattern;
_M_data->_M_neg_format = money_base::_S_default_pattern;
for (size_t __i = 0; __i < money_base::_S_end; ++__i)
_M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
}
template<>
void
moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*)
{
// "C" locale.
if (!_M_data)
_M_data = new __moneypunct_cache<char, false>;
_M_data->_M_decimal_point = '.';
_M_data->_M_thousands_sep = ',';
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_curr_symbol = "";
_M_data->_M_curr_symbol_size = 0;
_M_data->_M_positive_sign = "";
_M_data->_M_positive_sign_size = 0;
_M_data->_M_negative_sign = "";
_M_data->_M_negative_sign_size = 0;
_M_data->_M_frac_digits = 0;
_M_data->_M_pos_format = money_base::_S_default_pattern;
_M_data->_M_neg_format = money_base::_S_default_pattern;
for (size_t __i = 0; __i < money_base::_S_end; ++__i)
_M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
}
template<>
moneypunct<char, true>::~moneypunct()
{ delete _M_data; }
template<>
moneypunct<char, false>::~moneypunct()
{ delete _M_data; }
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
const char*)
{
// "C" locale
if (!_M_data)
_M_data = new __moneypunct_cache<wchar_t, true>;
_M_data->_M_decimal_point = L'.';
_M_data->_M_thousands_sep = L',';
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = 0;
_M_data->_M_positive_sign = L"";
_M_data->_M_positive_sign_size = 0;
_M_data->_M_negative_sign = L"";
_M_data->_M_negative_sign_size = 0;
_M_data->_M_frac_digits = 0;
_M_data->_M_pos_format = money_base::_S_default_pattern;
_M_data->_M_neg_format = money_base::_S_default_pattern;
for (size_t __i = 0; __i < money_base::_S_end; ++__i)
_M_data->_M_atoms[__i] =
static_cast<wchar_t>(money_base::_S_atoms[__i]);
}
template<>
void
moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
const char*)
{
// "C" locale
if (!_M_data)
_M_data = new __moneypunct_cache<wchar_t, false>;
_M_data->_M_decimal_point = L'.';
_M_data->_M_thousands_sep = L',';
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = 0;
_M_data->_M_positive_sign = L"";
_M_data->_M_positive_sign_size = 0;
_M_data->_M_negative_sign = L"";
_M_data->_M_negative_sign_size = 0;
_M_data->_M_frac_digits = 0;
_M_data->_M_pos_format = money_base::_S_default_pattern;
_M_data->_M_neg_format = money_base::_S_default_pattern;
for (size_t __i = 0; __i < money_base::_S_end; ++__i)
_M_data->_M_atoms[__i] =
static_cast<wchar_t>(money_base::_S_atoms[__i]);
}
template<>
moneypunct<wchar_t, true>::~moneypunct()
{ delete _M_data; }
template<>
moneypunct<wchar_t, false>::~moneypunct()
{ delete _M_data; }
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,108 +0,0 @@
// std::numpunct implementation details, generic version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
_GLIBCXX_BEGIN_NAMESPACE(std)
template<>
void
numpunct<char>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
if (!_M_data)
_M_data = new __numpunct_cache<char>;
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_use_grouping = false;
_M_data->_M_decimal_point = '.';
_M_data->_M_thousands_sep = ',';
for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
_M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
for (size_t __i = 0; __i < __num_base::_S_iend; ++__i)
_M_data->_M_atoms_in[__i] = __num_base::_S_atoms_in[__i];
_M_data->_M_truename = "true";
_M_data->_M_truename_size = 4;
_M_data->_M_falsename = "false";
_M_data->_M_falsename_size = 5;
}
template<>
numpunct<char>::~numpunct()
{ delete _M_data; }
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
if (!_M_data)
_M_data = new __numpunct_cache<wchar_t>;
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_use_grouping = false;
_M_data->_M_decimal_point = L'.';
_M_data->_M_thousands_sep = L',';
// Use ctype::widen code without the facet...
for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
_M_data->_M_atoms_out[__i] =
static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
for (size_t __i = 0; __i < __num_base::_S_iend; ++__i)
_M_data->_M_atoms_in[__i] =
static_cast<wchar_t>(__num_base::_S_atoms_in[__i]);
_M_data->_M_truename = L"true";
_M_data->_M_truename_size = 4;
_M_data->_M_falsename = L"false";
_M_data->_M_falsename_size = 5;
}
template<>
numpunct<wchar_t>::~numpunct()
{ delete _M_data; }
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,205 +0,0 @@
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
_GLIBCXX_BEGIN_NAMESPACE(std)
template<>
void
__timepunct<char>::
_M_put(char* __s, size_t __maxlen, const char* __format,
const tm* __tm) const
{
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, _M_name_timepunct);
const size_t __len = strftime(__s, __maxlen, __format, __tm);
setlocale(LC_ALL, __old);
free(__old);
// Make sure __s is null terminated.
if (__len == 0)
__s[0] = '\0';
}
template<>
void
__timepunct<char>::_M_initialize_timepunct(__c_locale)
{
// "C" locale.
if (!_M_data)
_M_data = new __timepunct_cache<char>;
_M_data->_M_date_format = "%m/%d/%y";
_M_data->_M_date_era_format = "%m/%d/%y";
_M_data->_M_time_format = "%H:%M:%S";
_M_data->_M_time_era_format = "%H:%M:%S";
_M_data->_M_date_time_format = "";
_M_data->_M_date_time_era_format = "";
_M_data->_M_am = "AM";
_M_data->_M_pm = "PM";
_M_data->_M_am_pm_format = "";
// Day names, starting with "C"'s Sunday.
_M_data->_M_day1 = "Sunday";
_M_data->_M_day2 = "Monday";
_M_data->_M_day3 = "Tuesday";
_M_data->_M_day4 = "Wednesday";
_M_data->_M_day5 = "Thursday";
_M_data->_M_day6 = "Friday";
_M_data->_M_day7 = "Saturday";
// Abbreviated day names, starting with "C"'s Sun.
_M_data->_M_aday1 = "Sun";
_M_data->_M_aday2 = "Mon";
_M_data->_M_aday3 = "Tue";
_M_data->_M_aday4 = "Wed";
_M_data->_M_aday5 = "Thu";
_M_data->_M_aday6 = "Fri";
_M_data->_M_aday7 = "Sat";
// Month names, starting with "C"'s January.
_M_data->_M_month01 = "January";
_M_data->_M_month02 = "February";
_M_data->_M_month03 = "March";
_M_data->_M_month04 = "April";
_M_data->_M_month05 = "May";
_M_data->_M_month06 = "June";
_M_data->_M_month07 = "July";
_M_data->_M_month08 = "August";
_M_data->_M_month09 = "September";
_M_data->_M_month10 = "October";
_M_data->_M_month11 = "November";
_M_data->_M_month12 = "December";
// Abbreviated month names, starting with "C"'s Jan.
_M_data->_M_amonth01 = "Jan";
_M_data->_M_amonth02 = "Feb";
_M_data->_M_amonth03 = "Mar";
_M_data->_M_amonth04 = "Apr";
_M_data->_M_amonth05 = "May";
_M_data->_M_amonth06 = "Jun";
_M_data->_M_amonth07 = "Jul";
_M_data->_M_amonth08 = "Aug";
_M_data->_M_amonth09 = "Sep";
_M_data->_M_amonth10 = "Oct";
_M_data->_M_amonth11 = "Nov";
_M_data->_M_amonth12 = "Dec";
}
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
__timepunct<wchar_t>::
_M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
const tm* __tm) const
{
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, _M_name_timepunct);
const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
setlocale(LC_ALL, __old);
free(__old);
// Make sure __s is null terminated.
if (__len == 0)
__s[0] = L'\0';
}
template<>
void
__timepunct<wchar_t>::_M_initialize_timepunct(__c_locale)
{
// "C" locale.
if (!_M_data)
_M_data = new __timepunct_cache<wchar_t>;
_M_data->_M_date_format = L"%m/%d/%y";
_M_data->_M_date_era_format = L"%m/%d/%y";
_M_data->_M_time_format = L"%H:%M:%S";
_M_data->_M_time_era_format = L"%H:%M:%S";
_M_data->_M_date_time_format = L"";
_M_data->_M_date_time_era_format = L"";
_M_data->_M_am = L"AM";
_M_data->_M_pm = L"PM";
_M_data->_M_am_pm_format = L"";
// Day names, starting with "C"'s Sunday.
_M_data->_M_day1 = L"Sunday";
_M_data->_M_day2 = L"Monday";
_M_data->_M_day3 = L"Tuesday";
_M_data->_M_day4 = L"Wednesday";
_M_data->_M_day5 = L"Thursday";
_M_data->_M_day6 = L"Friday";
_M_data->_M_day7 = L"Saturday";
// Abbreviated day names, starting with "C"'s Sun.
_M_data->_M_aday1 = L"Sun";
_M_data->_M_aday2 = L"Mon";
_M_data->_M_aday3 = L"Tue";
_M_data->_M_aday4 = L"Wed";
_M_data->_M_aday5 = L"Thu";
_M_data->_M_aday6 = L"Fri";
_M_data->_M_aday7 = L"Sat";
// Month names, starting with "C"'s January.
_M_data->_M_month01 = L"January";
_M_data->_M_month02 = L"February";
_M_data->_M_month03 = L"March";
_M_data->_M_month04 = L"April";
_M_data->_M_month05 = L"May";
_M_data->_M_month06 = L"June";
_M_data->_M_month07 = L"July";
_M_data->_M_month08 = L"August";
_M_data->_M_month09 = L"September";
_M_data->_M_month10 = L"October";
_M_data->_M_month11 = L"November";
_M_data->_M_month12 = L"December";
// Abbreviated month names, starting with "C"'s Jan.
_M_data->_M_amonth01 = L"Jan";
_M_data->_M_amonth02 = L"Feb";
_M_data->_M_amonth03 = L"Mar";
_M_data->_M_amonth04 = L"Apr";
_M_data->_M_amonth05 = L"May";
_M_data->_M_amonth06 = L"Jun";
_M_data->_M_amonth07 = L"Jul";
_M_data->_M_amonth08 = L"Aug";
_M_data->_M_amonth09 = L"Sep";
_M_data->_M_amonth10 = L"Oct";
_M_data->_M_amonth11 = L"Nov";
_M_data->_M_amonth12 = L"Dec";
}
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,88 +0,0 @@
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file time_members.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.2.5.1.2 - time_get functions
// ISO C++ 14882: 22.2.5.3.2 - time_put functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
_GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT>
__timepunct<_CharT>::__timepunct(size_t __refs)
: facet(__refs), _M_data(NULL)
{
_M_name_timepunct = _S_get_c_name();
_M_initialize_timepunct();
}
template<typename _CharT>
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
: facet(__refs), _M_data(__cache)
{
_M_name_timepunct = _S_get_c_name();
_M_initialize_timepunct();
}
template<typename _CharT>
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
size_t __refs)
: facet(__refs), _M_data(NULL)
{
const size_t __len = std::strlen(__s) + 1;
char* __tmp = new char[__len];
std::memcpy(__tmp, __s, __len);
_M_name_timepunct = __tmp;
try
{ _M_initialize_timepunct(__cloc); }
catch(...)
{
delete [] _M_name_timepunct;
__throw_exception_again;
}
}
template<typename _CharT>
__timepunct<_CharT>::~__timepunct()
{
if (_M_name_timepunct != _S_get_c_name())
delete [] _M_name_timepunct;
delete _M_data;
_S_destroy_c_locale(_M_c_locale_timepunct);
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,64 +0,0 @@
// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++locale_internal.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
// Written by Jakub Jelinek <jakub@redhat.com>
#include <bits/c++config.h>
#include <clocale>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
extern "C" __typeof(strcoll_l) __strcoll_l;
extern "C" __typeof(strftime_l) __strftime_l;
extern "C" __typeof(strtod_l) __strtod_l;
extern "C" __typeof(strtof_l) __strtof_l;
extern "C" __typeof(strtold_l) __strtold_l;
extern "C" __typeof(strxfrm_l) __strxfrm_l;
extern "C" __typeof(newlocale) __newlocale;
extern "C" __typeof(freelocale) __freelocale;
extern "C" __typeof(duplocale) __duplocale;
extern "C" __typeof(uselocale) __uselocale;
#ifdef _GLIBCXX_USE_WCHAR_T
extern "C" __typeof(iswctype_l) __iswctype_l;
extern "C" __typeof(towlower_l) __towlower_l;
extern "C" __typeof(towupper_l) __towupper_l;
extern "C" __typeof(wcscoll_l) __wcscoll_l;
extern "C" __typeof(wcsftime_l) __wcsftime_l;
extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
extern "C" __typeof(wctype_l) __wctype_l;
#endif
#endif // GLIBC 2.3 and later

View File

@ -1,150 +0,0 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.8 Standard locale categories.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <cerrno> // For errno
#include <locale>
#include <stdexcept>
#include <langinfo.h>
#include <bits/c++locale_internal.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
template<>
void
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
const __c_locale& __cloc)
{
char* __sanity;
errno = 0;
float __f = __strtof_l(__s, &__sanity, __cloc);
if (__sanity != __s && errno != ERANGE)
__v = __f;
else
__err |= ios_base::failbit;
}
template<>
void
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
const __c_locale& __cloc)
{
char* __sanity;
errno = 0;
double __d = __strtod_l(__s, &__sanity, __cloc);
if (__sanity != __s && errno != ERANGE)
__v = __d;
else
__err |= ios_base::failbit;
}
template<>
void
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
const __c_locale& __cloc)
{
char* __sanity;
errno = 0;
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
// Prefer strtold_l, as __strtold_l isn't prototyped in more recent
// glibc versions.
long double __ld = strtold_l(__s, &__sanity, __cloc);
#else
long double __ld = __strtold_l(__s, &__sanity, __cloc);
#endif
if (__sanity != __s && errno != ERANGE)
__v = __ld;
else
__err |= ios_base::failbit;
}
void
locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
__c_locale __old)
{
__cloc = __newlocale(1 << LC_ALL, __s, __old);
if (!__cloc)
{
// This named locale is not supported by the underlying OS.
__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
"name not valid"));
}
}
void
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
{
if (__cloc && _S_get_c_locale() != __cloc)
__freelocale(__cloc);
}
__c_locale
locale::facet::_S_clone_c_locale(__c_locale& __cloc)
{ return __duplocale(__cloc); }
_GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
{
"LC_CTYPE",
"LC_NUMERIC",
"LC_TIME",
"LC_COLLATE",
"LC_MONETARY",
"LC_MESSAGES",
"LC_PAPER",
"LC_NAME",
"LC_ADDRESS",
"LC_TELEPHONE",
"LC_MEASUREMENT",
"LC_IDENTIFICATION"
};
_GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(std)
const char* const* const locale::_S_categories = __gnu_cxx::category_names;
_GLIBCXX_END_NAMESPACE
// XXX GLIBCXX_ABI Deprecated
#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKP15__locale_struct, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKP15__locale_struct);
#endif // _GLIBCXX_LONG_DOUBLE_COMPAT

View File

@ -1,112 +0,0 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++locale.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.8 Standard locale categories.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#ifndef _C_LOCALE_H
#define _C_LOCALE_H 1
#pragma GCC system_header
#include <cstring> // get std::strlen
#include <cstdio> // get std::vsnprintf or std::vsprintf
#include <clocale>
#include <langinfo.h> // For codecvt
#include <iconv.h> // For codecvt using iconv, iconv_t
#include <libintl.h> // For messages
#include <cstdarg>
#define _GLIBCXX_C_LOCALE_GNU 1
#define _GLIBCXX_NUM_CATEGORIES 6
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
extern "C" __typeof(uselocale) __uselocale;
_GLIBCXX_END_NAMESPACE
#endif
_GLIBCXX_BEGIN_NAMESPACE(std)
typedef __locale_t __c_locale;
// Convert numeric value of type double and long double to string and
// return length of string. If vsnprintf is available use it, otherwise
// fall back to the unsafe vsprintf which, in general, can be dangerous
// and should be avoided.
inline int
__convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)),
char* __out,
const int __size __attribute__ ((__unused__)),
const char* __fmt, ...)
{
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
#else
char* __old = std::setlocale(LC_ALL, NULL);
char* __sav = new char[std::strlen(__old) + 1];
std::strcpy(__sav, __old);
std::setlocale(LC_ALL, "C");
#endif
va_list __args;
va_start(__args, __fmt);
#ifdef _GLIBCXX_USE_C99
const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
#else
const int __ret = std::vsprintf(__out, __fmt, __args);
#endif
va_end(__args);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__gnu_cxx::__uselocale(__old);
#else
std::setlocale(LC_ALL, __sav);
delete [] __sav;
#endif
return __ret;
}
_GLIBCXX_END_NAMESPACE
#endif

View File

@ -1,307 +0,0 @@
// std::codecvt implementation details, GNU version -*- C++ -*-
// Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.1.5 - Template class codecvt
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
#include <bits/c++locale_internal.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Specializations.
#ifdef _GLIBCXX_USE_WCHAR_T
codecvt_base::result
codecvt<wchar_t, char, mbstate_t>::
do_out(state_type& __state, const intern_type* __from,
const intern_type* __from_end, const intern_type*& __from_next,
extern_type* __to, extern_type* __to_end,
extern_type*& __to_next) const
{
result __ret = ok;
state_type __tmp_state(__state);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_codecvt);
#endif
// wcsnrtombs is *very* fast but stops if encounters NUL characters:
// in case we fall back to wcrtomb and then continue, in a loop.
// NB: wcsnrtombs is a GNU extension
for (__from_next = __from, __to_next = __to;
__from_next < __from_end && __to_next < __to_end
&& __ret == ok;)
{
const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
__from_end - __from_next);
if (!__from_chunk_end)
__from_chunk_end = __from_end;
__from = __from_next;
const size_t __conv = wcsnrtombs(__to_next, &__from_next,
__from_chunk_end - __from_next,
__to_end - __to_next, &__state);
if (__conv == static_cast<size_t>(-1))
{
// In case of error, in order to stop at the exact place we
// have to start again from the beginning with a series of
// wcrtomb.
for (; __from < __from_next; ++__from)
__to_next += wcrtomb(__to_next, *__from, &__tmp_state);
__state = __tmp_state;
__ret = error;
}
else if (__from_next && __from_next < __from_chunk_end)
{
__to_next += __conv;
__ret = partial;
}
else
{
__from_next = __from_chunk_end;
__to_next += __conv;
}
if (__from_next < __from_end && __ret == ok)
{
extern_type __buf[MB_LEN_MAX];
__tmp_state = __state;
const size_t __conv2 = wcrtomb(__buf, *__from_next, &__tmp_state);
if (__conv2 > static_cast<size_t>(__to_end - __to_next))
__ret = partial;
else
{
memcpy(__to_next, __buf, __conv2);
__state = __tmp_state;
__to_next += __conv2;
++__from_next;
}
}
}
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
return __ret;
}
codecvt_base::result
codecvt<wchar_t, char, mbstate_t>::
do_in(state_type& __state, const extern_type* __from,
const extern_type* __from_end, const extern_type*& __from_next,
intern_type* __to, intern_type* __to_end,
intern_type*& __to_next) const
{
result __ret = ok;
state_type __tmp_state(__state);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_codecvt);
#endif
// mbsnrtowcs is *very* fast but stops if encounters NUL characters:
// in case we store a L'\0' and then continue, in a loop.
// NB: mbsnrtowcs is a GNU extension
for (__from_next = __from, __to_next = __to;
__from_next < __from_end && __to_next < __to_end
&& __ret == ok;)
{
const extern_type* __from_chunk_end;
__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
__from_end
- __from_next));
if (!__from_chunk_end)
__from_chunk_end = __from_end;
__from = __from_next;
size_t __conv = mbsnrtowcs(__to_next, &__from_next,
__from_chunk_end - __from_next,
__to_end - __to_next, &__state);
if (__conv == static_cast<size_t>(-1))
{
// In case of error, in order to stop at the exact place we
// have to start again from the beginning with a series of
// mbrtowc.
for (;; ++__to_next, __from += __conv)
{
__conv = mbrtowc(__to_next, __from, __from_end - __from,
&__tmp_state);
if (__conv == static_cast<size_t>(-1)
|| __conv == static_cast<size_t>(-2))
break;
}
__from_next = __from;
__state = __tmp_state;
__ret = error;
}
else if (__from_next && __from_next < __from_chunk_end)
{
// It is unclear what to return in this case (see DR 382).
__to_next += __conv;
__ret = partial;
}
else
{
__from_next = __from_chunk_end;
__to_next += __conv;
}
if (__from_next < __from_end && __ret == ok)
{
if (__to_next < __to_end)
{
// XXX Probably wrong for stateful encodings
__tmp_state = __state;
++__from_next;
*__to_next++ = L'\0';
}
else
__ret = partial;
}
}
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
return __ret;
}
int
codecvt<wchar_t, char, mbstate_t>::
do_encoding() const throw()
{
// XXX This implementation assumes that the encoding is
// stateless and is either single-byte or variable-width.
int __ret = 0;
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_codecvt);
#endif
if (MB_CUR_MAX == 1)
__ret = 1;
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
return __ret;
}
int
codecvt<wchar_t, char, mbstate_t>::
do_max_length() const throw()
{
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_codecvt);
#endif
// XXX Probably wrong for stateful encodings.
int __ret = MB_CUR_MAX;
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
return __ret;
}
int
codecvt<wchar_t, char, mbstate_t>::
do_length(state_type& __state, const extern_type* __from,
const extern_type* __end, size_t __max) const
{
int __ret = 0;
state_type __tmp_state(__state);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_codecvt);
#endif
// mbsnrtowcs is *very* fast but stops if encounters NUL characters:
// in case we advance past it and then continue, in a loop.
// NB: mbsnrtowcs is a GNU extension
// A dummy internal buffer is needed in order for mbsnrtocws to consider
// its fourth parameter (it wouldn't with NULL as first parameter).
wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
* __max));
while (__from < __end && __max)
{
const extern_type* __from_chunk_end;
__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
__end
- __from));
if (!__from_chunk_end)
__from_chunk_end = __end;
const extern_type* __tmp_from = __from;
size_t __conv = mbsnrtowcs(__to, &__from,
__from_chunk_end - __from,
__max, &__state);
if (__conv == static_cast<size_t>(-1))
{
// In case of error, in order to stop at the exact place we
// have to start again from the beginning with a series of
// mbrtowc.
for (__from = __tmp_from;; __from += __conv)
{
__conv = mbrtowc(NULL, __from, __end - __from,
&__tmp_state);
if (__conv == static_cast<size_t>(-1)
|| __conv == static_cast<size_t>(-2))
break;
}
__state = __tmp_state;
__ret += __from - __tmp_from;
break;
}
if (!__from)
__from = __from_chunk_end;
__ret += __from - __tmp_from;
__max -= __conv;
if (__from < __end && __max)
{
// XXX Probably wrong for stateful encodings
__tmp_state = __state;
++__from;
++__ret;
--__max;
}
}
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
return __ret;
}
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,74 +0,0 @@
// std::collate implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
#include <bits/c++locale_internal.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
// These are basically extensions to char_traits, and perhaps should
// be put there instead of here.
template<>
int
collate<char>::_M_compare(const char* __one, const char* __two) const
{
int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
}
template<>
size_t
collate<char>::_M_transform(char* __to, const char* __from,
size_t __n) const
{ return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
int
collate<wchar_t>::_M_compare(const wchar_t* __one,
const wchar_t* __two) const
{
int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
}
template<>
size_t
collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
size_t __n) const
{ return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,304 +0,0 @@
// std::ctype implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
#include <bits/c++locale_internal.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
// NB: The other ctype<char> specializations are in src/locale.cc and
// various /config/os/* files.
template<>
ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
: ctype<char>(0, false, __refs)
{
if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
{
this->_S_destroy_c_locale(this->_M_c_locale_ctype);
this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
this->_M_table = this->_M_c_locale_ctype->__ctype_b;
}
}
#ifdef _GLIBCXX_USE_WCHAR_T
ctype<wchar_t>::__wmask_type
ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
{
__wmask_type __ret;
switch (__m)
{
case space:
__ret = __wctype_l("space", _M_c_locale_ctype);
break;
case print:
__ret = __wctype_l("print", _M_c_locale_ctype);
break;
case cntrl:
__ret = __wctype_l("cntrl", _M_c_locale_ctype);
break;
case upper:
__ret = __wctype_l("upper", _M_c_locale_ctype);
break;
case lower:
__ret = __wctype_l("lower", _M_c_locale_ctype);
break;
case alpha:
__ret = __wctype_l("alpha", _M_c_locale_ctype);
break;
case digit:
__ret = __wctype_l("digit", _M_c_locale_ctype);
break;
case punct:
__ret = __wctype_l("punct", _M_c_locale_ctype);
break;
case xdigit:
__ret = __wctype_l("xdigit", _M_c_locale_ctype);
break;
case alnum:
__ret = __wctype_l("alnum", _M_c_locale_ctype);
break;
case graph:
__ret = __wctype_l("graph", _M_c_locale_ctype);
break;
default:
__ret = __wmask_type();
}
return __ret;
}
wchar_t
ctype<wchar_t>::do_toupper(wchar_t __c) const
{ return __towupper_l(__c, _M_c_locale_ctype); }
const wchar_t*
ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
{
while (__lo < __hi)
{
*__lo = __towupper_l(*__lo, _M_c_locale_ctype);
++__lo;
}
return __hi;
}
wchar_t
ctype<wchar_t>::do_tolower(wchar_t __c) const
{ return __towlower_l(__c, _M_c_locale_ctype); }
const wchar_t*
ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
{
while (__lo < __hi)
{
*__lo = __towlower_l(*__lo, _M_c_locale_ctype);
++__lo;
}
return __hi;
}
bool
ctype<wchar_t>::
do_is(mask __m, wchar_t __c) const
{
// The case of __m == ctype_base::space is particularly important,
// due to its use in many istream functions. Therefore we deal with
// it first, exploiting the knowledge that on GNU systems _M_bit[5]
// is the mask corresponding to ctype_base::space. NB: an encoding
// change would not affect correctness!
bool __ret = false;
if (__m == _M_bit[5])
__ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
else
{
// Highest bitmask in ctype_base == 10, but extra in "C"
// library for blank.
const size_t __bitmasksize = 11;
for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
if (__m & _M_bit[__bitcur])
{
if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
{
__ret = true;
break;
}
else if (__m == _M_bit[__bitcur])
break;
}
}
return __ret;
}
const wchar_t*
ctype<wchar_t>::
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
{
for (; __lo < __hi; ++__vec, ++__lo)
{
// Highest bitmask in ctype_base == 10, but extra in "C"
// library for blank.
const size_t __bitmasksize = 11;
mask __m = 0;
for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
__m |= _M_bit[__bitcur];
*__vec = __m;
}
return __hi;
}
const wchar_t*
ctype<wchar_t>::
do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
{
while (__lo < __hi && !this->do_is(__m, *__lo))
++__lo;
return __lo;
}
const wchar_t*
ctype<wchar_t>::
do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
{
while (__lo < __hi && this->do_is(__m, *__lo) != 0)
++__lo;
return __lo;
}
wchar_t
ctype<wchar_t>::
do_widen(char __c) const
{ return _M_widen[static_cast<unsigned char>(__c)]; }
const char*
ctype<wchar_t>::
do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
{
while (__lo < __hi)
{
*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++__lo;
++__dest;
}
return __hi;
}
char
ctype<wchar_t>::
do_narrow(wchar_t __wc, char __dfault) const
{
if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
return _M_narrow[__wc];
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_ctype);
#endif
const int __c = wctob(__wc);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
return (__c == EOF ? __dfault : static_cast<char>(__c));
}
const wchar_t*
ctype<wchar_t>::
do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
char* __dest) const
{
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_ctype);
#endif
if (_M_narrow_ok)
while (__lo < __hi)
{
if (*__lo >= 0 && *__lo < 128)
*__dest = _M_narrow[*__lo];
else
{
const int __c = wctob(*__lo);
*__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
}
++__lo;
++__dest;
}
else
while (__lo < __hi)
{
const int __c = wctob(*__lo);
*__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++__lo;
++__dest;
}
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
return __hi;
}
void
ctype<wchar_t>::_M_initialize_ctype()
{
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_ctype);
#endif
wint_t __i;
for (__i = 0; __i < 128; ++__i)
{
const int __c = wctob(__i);
if (__c == EOF)
break;
else
_M_narrow[__i] = static_cast<char>(__c);
}
if (__i == 128)
_M_narrow_ok = true;
else
_M_narrow_ok = false;
for (size_t __j = 0;
__j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
_M_widen[__j] = btowc(__j);
for (size_t __k = 0; __k <= 11; ++__k)
{
_M_bit[__k] = static_cast<mask>(_ISbit(__k));
_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
}
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#endif
}
#endif // _GLIBCXX_USE_WCHAR_T
_GLIBCXX_END_NAMESPACE

View File

@ -1,82 +0,0 @@
// std::messages implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
#include <bits/c++locale_internal.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Specializations.
template<>
string
messages<char>::do_get(catalog, int, int, const string& __dfault) const
{
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_messages);
const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
__uselocale(__old);
return string(__msg);
#else
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, _M_name_messages);
const char* __msg = gettext(__dfault.c_str());
setlocale(LC_ALL, __old);
free(__old);
return string(__msg);
#endif
}
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
wstring
messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
{
# if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(_M_c_locale_messages);
char* __msg = gettext(_M_convert_to_char(__dfault));
__uselocale(__old);
return _M_convert_from_char(__msg);
# else
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, _M_name_messages);
char* __msg = gettext(_M_convert_to_char(__dfault));
setlocale(LC_ALL, __old);
free(__old);
return _M_convert_from_char(__msg);
# endif
}
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,116 +0,0 @@
// std::messages implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file messages_members.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.2.7.1.2 messages functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::messages(size_t __refs)
: facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
_M_name_messages(_S_get_c_name())
{ }
template<typename _CharT>
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
size_t __refs)
: facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
{
const size_t __len = std::strlen(__s) + 1;
char* __tmp = new char[__len];
std::memcpy(__tmp, __s, __len);
_M_name_messages = __tmp;
// Last to avoid leaking memory if new throws.
_M_c_locale_messages = _S_clone_c_locale(__cloc);
}
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
const char* __dir) const
{
bindtextdomain(__s.c_str(), __dir);
return this->do_open(__s, __loc);
}
// Virtual member functions.
template<typename _CharT>
messages<_CharT>::~messages()
{
if (_M_name_messages != _S_get_c_name())
delete [] _M_name_messages;
_S_destroy_c_locale(_M_c_locale_messages);
}
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>& __s,
const locale&) const
{
// No error checking is done, assume the catalog exists and can
// be used.
textdomain(__s.c_str());
return 0;
}
template<typename _CharT>
void
messages<_CharT>::do_close(catalog) const
{ }
// messages_byname
template<typename _CharT>
messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
: messages<_CharT>(__refs)
{
if (this->_M_name_messages != locale::facet::_S_get_c_name())
delete [] this->_M_name_messages;
char* __tmp = new char[std::strlen(__s) + 1];
std::strcpy(__tmp, __s);
this->_M_name_messages = __tmp;
if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
{
this->_S_destroy_c_locale(this->_M_c_locale_messages);
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
}
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,656 +0,0 @@
// std::moneypunct implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
#include <bits/c++locale_internal.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Construct and return valid pattern consisting of some combination of:
// space none symbol sign value
money_base::pattern
money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
{
pattern __ret;
// This insanely complicated routine attempts to construct a valid
// pattern for use with monyepunct. A couple of invariants:
// if (__precedes) symbol -> value
// else value -> symbol
// if (__space) space
// else none
// none == never first
// space never first or last
// Any elegant implementations of this are welcome.
switch (__posn)
{
case 0:
case 1:
// 1 The sign precedes the value and symbol.
__ret.field[0] = sign;
if (__space)
{
// Pattern starts with sign.
if (__precedes)
{
__ret.field[1] = symbol;
__ret.field[3] = value;
}
else
{
__ret.field[1] = value;
__ret.field[3] = symbol;
}
__ret.field[2] = space;
}
else
{
// Pattern starts with sign and ends with none.
if (__precedes)
{
__ret.field[1] = symbol;
__ret.field[2] = value;
}
else
{
__ret.field[1] = value;
__ret.field[2] = symbol;
}
__ret.field[3] = none;
}
break;
case 2:
// 2 The sign follows the value and symbol.
if (__space)
{
// Pattern either ends with sign.
if (__precedes)
{
__ret.field[0] = symbol;
__ret.field[2] = value;
}
else
{
__ret.field[0] = value;
__ret.field[2] = symbol;
}
__ret.field[1] = space;
__ret.field[3] = sign;
}
else
{
// Pattern ends with sign then none.
if (__precedes)
{
__ret.field[0] = symbol;
__ret.field[1] = value;
}
else
{
__ret.field[0] = value;
__ret.field[1] = symbol;
}
__ret.field[2] = sign;
__ret.field[3] = none;
}
break;
case 3:
// 3 The sign immediately precedes the symbol.
if (__precedes)
{
__ret.field[0] = sign;
__ret.field[1] = symbol;
if (__space)
{
__ret.field[2] = space;
__ret.field[3] = value;
}
else
{
__ret.field[2] = value;
__ret.field[3] = none;
}
}
else
{
__ret.field[0] = value;
if (__space)
{
__ret.field[1] = space;
__ret.field[2] = sign;
__ret.field[3] = symbol;
}
else
{
__ret.field[1] = sign;
__ret.field[2] = symbol;
__ret.field[3] = none;
}
}
break;
case 4:
// 4 The sign immediately follows the symbol.
if (__precedes)
{
__ret.field[0] = symbol;
__ret.field[1] = sign;
if (__space)
{
__ret.field[2] = space;
__ret.field[3] = value;
}
else
{
__ret.field[2] = value;
__ret.field[3] = none;
}
}
else
{
__ret.field[0] = value;
if (__space)
{
__ret.field[1] = space;
__ret.field[2] = symbol;
__ret.field[3] = sign;
}
else
{
__ret.field[1] = symbol;
__ret.field[2] = sign;
__ret.field[3] = none;
}
}
break;
default:
__ret = pattern();
}
return __ret;
}
template<>
void
moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
const char*)
{
if (!_M_data)
_M_data = new __moneypunct_cache<char, true>;
if (!__cloc)
{
// "C" locale
_M_data->_M_decimal_point = '.';
_M_data->_M_thousands_sep = ',';
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_curr_symbol = "";
_M_data->_M_curr_symbol_size = 0;
_M_data->_M_positive_sign = "";
_M_data->_M_positive_sign_size = 0;
_M_data->_M_negative_sign = "";
_M_data->_M_negative_sign_size = 0;
_M_data->_M_frac_digits = 0;
_M_data->_M_pos_format = money_base::_S_default_pattern;
_M_data->_M_neg_format = money_base::_S_default_pattern;
for (size_t __i = 0; __i < money_base::_S_end; ++__i)
_M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
}
else
{
// Named locale.
_M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
__cloc));
_M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
__cloc));
_M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
_M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
_M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
_M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
if (!__nposn)
_M_data->_M_negative_sign = "()";
else
_M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
__cloc);
_M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
// _Intl == true
_M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
_M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
_M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
__cloc));
char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
_M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
__pposn);
char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
_M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
__nposn);
}
}
template<>
void
moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
const char*)
{
if (!_M_data)
_M_data = new __moneypunct_cache<char, false>;
if (!__cloc)
{
// "C" locale
_M_data->_M_decimal_point = '.';
_M_data->_M_thousands_sep = ',';
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_curr_symbol = "";
_M_data->_M_curr_symbol_size = 0;
_M_data->_M_positive_sign = "";
_M_data->_M_positive_sign_size = 0;
_M_data->_M_negative_sign = "";
_M_data->_M_negative_sign_size = 0;
_M_data->_M_frac_digits = 0;
_M_data->_M_pos_format = money_base::_S_default_pattern;
_M_data->_M_neg_format = money_base::_S_default_pattern;
for (size_t __i = 0; __i < money_base::_S_end; ++__i)
_M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
}
else
{
// Named locale.
_M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
__cloc));
_M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
__cloc));
_M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
_M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
_M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
_M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
if (!__nposn)
_M_data->_M_negative_sign = "()";
else
_M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
__cloc);
_M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
// _Intl == false
_M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
_M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
_M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
_M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
__pposn);
char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
_M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
__nposn);
}
}
template<>
moneypunct<char, true>::~moneypunct()
{ delete _M_data; }
template<>
moneypunct<char, false>::~moneypunct()
{ delete _M_data; }
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
const char*)
#else
const char* __name)
#endif
{
if (!_M_data)
_M_data = new __moneypunct_cache<wchar_t, true>;
if (!__cloc)
{
// "C" locale
_M_data->_M_decimal_point = L'.';
_M_data->_M_thousands_sep = L',';
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = 0;
_M_data->_M_positive_sign = L"";
_M_data->_M_positive_sign_size = 0;
_M_data->_M_negative_sign = L"";
_M_data->_M_negative_sign_size = 0;
_M_data->_M_frac_digits = 0;
_M_data->_M_pos_format = money_base::_S_default_pattern;
_M_data->_M_neg_format = money_base::_S_default_pattern;
// Use ctype::widen code without the facet...
for (size_t __i = 0; __i < money_base::_S_end; ++__i)
_M_data->_M_atoms[__i] =
static_cast<wchar_t>(money_base::_S_atoms[__i]);
}
else
{
// Named locale.
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(__cloc);
#else
// Switch to named locale so that mbsrtowcs will work.
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, __name);
#endif
union { char *__s; wchar_t __w; } __u;
__u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
_M_data->_M_decimal_point = __u.__w;
__u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
_M_data->_M_thousands_sep = __u.__w;
_M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
_M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
wchar_t* __wcs_ps = 0;
wchar_t* __wcs_ns = 0;
const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
try
{
mbstate_t __state;
size_t __len = strlen(__cpossign);
if (__len)
{
++__len;
memset(&__state, 0, sizeof(mbstate_t));
__wcs_ps = new wchar_t[__len];
mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
_M_data->_M_positive_sign = __wcs_ps;
}
else
_M_data->_M_positive_sign = L"";
_M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
__len = strlen(__cnegsign);
if (!__nposn)
_M_data->_M_negative_sign = L"()";
else if (__len)
{
++__len;
memset(&__state, 0, sizeof(mbstate_t));
__wcs_ns = new wchar_t[__len];
mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
_M_data->_M_negative_sign = __wcs_ns;
}
else
_M_data->_M_negative_sign = L"";
_M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
// _Intl == true.
__len = strlen(__ccurr);
if (__len)
{
++__len;
memset(&__state, 0, sizeof(mbstate_t));
wchar_t* __wcs = new wchar_t[__len];
mbsrtowcs(__wcs, &__ccurr, __len, &__state);
_M_data->_M_curr_symbol = __wcs;
}
else
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
}
catch (...)
{
delete _M_data;
_M_data = 0;
delete __wcs_ps;
delete __wcs_ns;
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#else
setlocale(LC_ALL, __old);
free(__old);
#endif
__throw_exception_again;
}
_M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
__cloc));
char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
_M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
__pposn);
char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
_M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
__nposn);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#else
setlocale(LC_ALL, __old);
free(__old);
#endif
}
}
template<>
void
moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
const char*)
#else
const char* __name)
#endif
{
if (!_M_data)
_M_data = new __moneypunct_cache<wchar_t, false>;
if (!__cloc)
{
// "C" locale
_M_data->_M_decimal_point = L'.';
_M_data->_M_thousands_sep = L',';
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = 0;
_M_data->_M_positive_sign = L"";
_M_data->_M_positive_sign_size = 0;
_M_data->_M_negative_sign = L"";
_M_data->_M_negative_sign_size = 0;
_M_data->_M_frac_digits = 0;
_M_data->_M_pos_format = money_base::_S_default_pattern;
_M_data->_M_neg_format = money_base::_S_default_pattern;
// Use ctype::widen code without the facet...
for (size_t __i = 0; __i < money_base::_S_end; ++__i)
_M_data->_M_atoms[__i] =
static_cast<wchar_t>(money_base::_S_atoms[__i]);
}
else
{
// Named locale.
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__c_locale __old = __uselocale(__cloc);
#else
// Switch to named locale so that mbsrtowcs will work.
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, __name);
#endif
union { char *__s; wchar_t __w; } __u;
__u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
_M_data->_M_decimal_point = __u.__w;
__u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
_M_data->_M_thousands_sep = __u.__w;
_M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
_M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
wchar_t* __wcs_ps = 0;
wchar_t* __wcs_ns = 0;
const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
try
{
mbstate_t __state;
size_t __len;
__len = strlen(__cpossign);
if (__len)
{
++__len;
memset(&__state, 0, sizeof(mbstate_t));
__wcs_ps = new wchar_t[__len];
mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
_M_data->_M_positive_sign = __wcs_ps;
}
else
_M_data->_M_positive_sign = L"";
_M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
__len = strlen(__cnegsign);
if (!__nposn)
_M_data->_M_negative_sign = L"()";
else if (__len)
{
++__len;
memset(&__state, 0, sizeof(mbstate_t));
__wcs_ns = new wchar_t[__len];
mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
_M_data->_M_negative_sign = __wcs_ns;
}
else
_M_data->_M_negative_sign = L"";
_M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
// _Intl == true.
__len = strlen(__ccurr);
if (__len)
{
++__len;
memset(&__state, 0, sizeof(mbstate_t));
wchar_t* __wcs = new wchar_t[__len];
mbsrtowcs(__wcs, &__ccurr, __len, &__state);
_M_data->_M_curr_symbol = __wcs;
}
else
_M_data->_M_curr_symbol = L"";
_M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
}
catch (...)
{
delete _M_data;
_M_data = 0;
delete __wcs_ps;
delete __wcs_ns;
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#else
setlocale(LC_ALL, __old);
free(__old);
#endif
__throw_exception_again;
}
_M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
_M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
__pposn);
char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
_M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
__nposn);
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
__uselocale(__old);
#else
setlocale(LC_ALL, __old);
free(__old);
#endif
}
}
template<>
moneypunct<wchar_t, true>::~moneypunct()
{
if (_M_data->_M_positive_sign_size)
delete [] _M_data->_M_positive_sign;
if (_M_data->_M_negative_sign_size
&& wcscmp(_M_data->_M_negative_sign, L"()") != 0)
delete [] _M_data->_M_negative_sign;
if (_M_data->_M_curr_symbol_size)
delete [] _M_data->_M_curr_symbol;
delete _M_data;
}
template<>
moneypunct<wchar_t, false>::~moneypunct()
{
if (_M_data->_M_positive_sign_size)
delete [] _M_data->_M_positive_sign;
if (_M_data->_M_negative_sign_size
&& wcscmp(_M_data->_M_negative_sign, L"()") != 0)
delete [] _M_data->_M_negative_sign;
if (_M_data->_M_curr_symbol_size)
delete [] _M_data->_M_curr_symbol;
delete _M_data;
}
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,152 +0,0 @@
// std::numpunct implementation details, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
#include <bits/c++locale_internal.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
template<>
void
numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
{
if (!_M_data)
_M_data = new __numpunct_cache<char>;
if (!__cloc)
{
// "C" locale
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_use_grouping = false;
_M_data->_M_decimal_point = '.';
_M_data->_M_thousands_sep = ',';
for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
_M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
_M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
}
else
{
// Named locale.
_M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
__cloc));
_M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
__cloc));
// Check for NULL, which implies no grouping.
if (_M_data->_M_thousands_sep == '\0')
_M_data->_M_grouping = "";
else
_M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
_M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
}
// NB: There is no way to extact this info from posix locales.
// _M_truename = __nl_langinfo_l(YESSTR, __cloc);
_M_data->_M_truename = "true";
_M_data->_M_truename_size = 4;
// _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
_M_data->_M_falsename = "false";
_M_data->_M_falsename_size = 5;
}
template<>
numpunct<char>::~numpunct()
{ delete _M_data; }
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
{
if (!_M_data)
_M_data = new __numpunct_cache<wchar_t>;
if (!__cloc)
{
// "C" locale
_M_data->_M_grouping = "";
_M_data->_M_grouping_size = 0;
_M_data->_M_use_grouping = false;
_M_data->_M_decimal_point = L'.';
_M_data->_M_thousands_sep = L',';
// Use ctype::widen code without the facet...
for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
_M_data->_M_atoms_out[__i] =
static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
_M_data->_M_atoms_in[__j] =
static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
}
else
{
// Named locale.
// NB: In the GNU model wchar_t is always 32 bit wide.
union { char *__s; wchar_t __w; } __u;
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
_M_data->_M_decimal_point = __u.__w;
__u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
_M_data->_M_thousands_sep = __u.__w;
if (_M_data->_M_thousands_sep == L'\0')
_M_data->_M_grouping = "";
else
_M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
_M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
}
// NB: There is no way to extact this info from posix locales.
// _M_truename = __nl_langinfo_l(YESSTR, __cloc);
_M_data->_M_truename = L"true";
_M_data->_M_truename_size = 4;
// _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
_M_data->_M_falsename = L"false";
_M_data->_M_falsename_size = 5;
}
template<>
numpunct<wchar_t>::~numpunct()
{ delete _M_data; }
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,396 +0,0 @@
// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
#include <bits/c++locale_internal.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
template<>
void
__timepunct<char>::
_M_put(char* __s, size_t __maxlen, const char* __format,
const tm* __tm) const
{
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
_M_c_locale_timepunct);
#else
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, _M_name_timepunct);
const size_t __len = strftime(__s, __maxlen, __format, __tm);
setlocale(LC_ALL, __old);
free(__old);
#endif
// Make sure __s is null terminated.
if (__len == 0)
__s[0] = '\0';
}
template<>
void
__timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
{
if (!_M_data)
_M_data = new __timepunct_cache<char>;
if (!__cloc)
{
// "C" locale
_M_c_locale_timepunct = _S_get_c_locale();
_M_data->_M_date_format = "%m/%d/%y";
_M_data->_M_date_era_format = "%m/%d/%y";
_M_data->_M_time_format = "%H:%M:%S";
_M_data->_M_time_era_format = "%H:%M:%S";
_M_data->_M_date_time_format = "";
_M_data->_M_date_time_era_format = "";
_M_data->_M_am = "AM";
_M_data->_M_pm = "PM";
_M_data->_M_am_pm_format = "";
// Day names, starting with "C"'s Sunday.
_M_data->_M_day1 = "Sunday";
_M_data->_M_day2 = "Monday";
_M_data->_M_day3 = "Tuesday";
_M_data->_M_day4 = "Wednesday";
_M_data->_M_day5 = "Thursday";
_M_data->_M_day6 = "Friday";
_M_data->_M_day7 = "Saturday";
// Abbreviated day names, starting with "C"'s Sun.
_M_data->_M_aday1 = "Sun";
_M_data->_M_aday2 = "Mon";
_M_data->_M_aday3 = "Tue";
_M_data->_M_aday4 = "Wed";
_M_data->_M_aday5 = "Thu";
_M_data->_M_aday6 = "Fri";
_M_data->_M_aday7 = "Sat";
// Month names, starting with "C"'s January.
_M_data->_M_month01 = "January";
_M_data->_M_month02 = "February";
_M_data->_M_month03 = "March";
_M_data->_M_month04 = "April";
_M_data->_M_month05 = "May";
_M_data->_M_month06 = "June";
_M_data->_M_month07 = "July";
_M_data->_M_month08 = "August";
_M_data->_M_month09 = "September";
_M_data->_M_month10 = "October";
_M_data->_M_month11 = "November";
_M_data->_M_month12 = "December";
// Abbreviated month names, starting with "C"'s Jan.
_M_data->_M_amonth01 = "Jan";
_M_data->_M_amonth02 = "Feb";
_M_data->_M_amonth03 = "Mar";
_M_data->_M_amonth04 = "Apr";
_M_data->_M_amonth05 = "May";
_M_data->_M_amonth06 = "Jun";
_M_data->_M_amonth07 = "Jul";
_M_data->_M_amonth08 = "Aug";
_M_data->_M_amonth09 = "Sep";
_M_data->_M_amonth10 = "Oct";
_M_data->_M_amonth11 = "Nov";
_M_data->_M_amonth12 = "Dec";
}
else
{
_M_c_locale_timepunct = _S_clone_c_locale(__cloc);
_M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
_M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
_M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
_M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
_M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
_M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
__cloc);
_M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
_M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
_M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
// Day names, starting with "C"'s Sunday.
_M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
_M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
_M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
_M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
_M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
_M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
_M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
// Abbreviated day names, starting with "C"'s Sun.
_M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
_M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
_M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
_M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
_M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
_M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
_M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
// Month names, starting with "C"'s January.
_M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
_M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
_M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
_M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
_M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
_M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
_M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
_M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
_M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
_M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
_M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
_M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
// Abbreviated month names, starting with "C"'s Jan.
_M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
_M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
_M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
_M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
_M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
_M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
_M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
_M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
_M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
_M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
_M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
_M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
}
}
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
__timepunct<wchar_t>::
_M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
const tm* __tm) const
{
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
_M_c_locale_timepunct);
#else
char* __old = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, _M_name_timepunct);
const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
setlocale(LC_ALL, __old);
free(__old);
#endif
// Make sure __s is null terminated.
if (__len == 0)
__s[0] = L'\0';
}
template<>
void
__timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
{
if (!_M_data)
_M_data = new __timepunct_cache<wchar_t>;
if (!__cloc)
{
// "C" locale
_M_c_locale_timepunct = _S_get_c_locale();
_M_data->_M_date_format = L"%m/%d/%y";
_M_data->_M_date_era_format = L"%m/%d/%y";
_M_data->_M_time_format = L"%H:%M:%S";
_M_data->_M_time_era_format = L"%H:%M:%S";
_M_data->_M_date_time_format = L"";
_M_data->_M_date_time_era_format = L"";
_M_data->_M_am = L"AM";
_M_data->_M_pm = L"PM";
_M_data->_M_am_pm_format = L"";
// Day names, starting with "C"'s Sunday.
_M_data->_M_day1 = L"Sunday";
_M_data->_M_day2 = L"Monday";
_M_data->_M_day3 = L"Tuesday";
_M_data->_M_day4 = L"Wednesday";
_M_data->_M_day5 = L"Thursday";
_M_data->_M_day6 = L"Friday";
_M_data->_M_day7 = L"Saturday";
// Abbreviated day names, starting with "C"'s Sun.
_M_data->_M_aday1 = L"Sun";
_M_data->_M_aday2 = L"Mon";
_M_data->_M_aday3 = L"Tue";
_M_data->_M_aday4 = L"Wed";
_M_data->_M_aday5 = L"Thu";
_M_data->_M_aday6 = L"Fri";
_M_data->_M_aday7 = L"Sat";
// Month names, starting with "C"'s January.
_M_data->_M_month01 = L"January";
_M_data->_M_month02 = L"February";
_M_data->_M_month03 = L"March";
_M_data->_M_month04 = L"April";
_M_data->_M_month05 = L"May";
_M_data->_M_month06 = L"June";
_M_data->_M_month07 = L"July";
_M_data->_M_month08 = L"August";
_M_data->_M_month09 = L"September";
_M_data->_M_month10 = L"October";
_M_data->_M_month11 = L"November";
_M_data->_M_month12 = L"December";
// Abbreviated month names, starting with "C"'s Jan.
_M_data->_M_amonth01 = L"Jan";
_M_data->_M_amonth02 = L"Feb";
_M_data->_M_amonth03 = L"Mar";
_M_data->_M_amonth04 = L"Apr";
_M_data->_M_amonth05 = L"May";
_M_data->_M_amonth06 = L"Jun";
_M_data->_M_amonth07 = L"Jul";
_M_data->_M_amonth08 = L"Aug";
_M_data->_M_amonth09 = L"Sep";
_M_data->_M_amonth10 = L"Oct";
_M_data->_M_amonth11 = L"Nov";
_M_data->_M_amonth12 = L"Dec";
}
else
{
_M_c_locale_timepunct = _S_clone_c_locale(__cloc);
union { char *__s; wchar_t *__w; } __u;
__u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
_M_data->_M_date_format = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
_M_data->_M_date_era_format = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
_M_data->_M_time_format = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
_M_data->_M_time_era_format = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
_M_data->_M_date_time_format = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
_M_data->_M_date_time_era_format = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
_M_data->_M_am = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
_M_data->_M_pm = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
_M_data->_M_am_pm_format = __u.__w;
// Day names, starting with "C"'s Sunday.
__u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
_M_data->_M_day1 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
_M_data->_M_day2 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
_M_data->_M_day3 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
_M_data->_M_day4 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
_M_data->_M_day5 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
_M_data->_M_day6 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
_M_data->_M_day7 = __u.__w;
// Abbreviated day names, starting with "C"'s Sun.
__u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
_M_data->_M_aday1 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
_M_data->_M_aday2 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
_M_data->_M_aday3 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
_M_data->_M_aday4 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
_M_data->_M_aday5 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
_M_data->_M_aday6 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
_M_data->_M_aday7 = __u.__w;
// Month names, starting with "C"'s January.
__u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
_M_data->_M_month01 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
_M_data->_M_month02 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
_M_data->_M_month03 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
_M_data->_M_month04 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
_M_data->_M_month05 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
_M_data->_M_month06 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
_M_data->_M_month07 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
_M_data->_M_month08 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
_M_data->_M_month09 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
_M_data->_M_month10 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
_M_data->_M_month11 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
_M_data->_M_month12 = __u.__w;
// Abbreviated month names, starting with "C"'s Jan.
__u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
_M_data->_M_amonth01 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
_M_data->_M_amonth02 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
_M_data->_M_amonth03 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
_M_data->_M_amonth04 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
_M_data->_M_amonth05 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
_M_data->_M_amonth06 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
_M_data->_M_amonth07 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
_M_data->_M_amonth08 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
_M_data->_M_amonth09 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
_M_data->_M_amonth10 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
_M_data->_M_amonth11 = __u.__w;
__u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
_M_data->_M_amonth12 = __u.__w;
}
}
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,85 +0,0 @@
// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file time_members.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.2.5.1.2 - time_get functions
// ISO C++ 14882: 22.2.5.3.2 - time_put functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
_GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT>
__timepunct<_CharT>::__timepunct(size_t __refs)
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
_M_name_timepunct(_S_get_c_name())
{ _M_initialize_timepunct(); }
template<typename _CharT>
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
_M_name_timepunct(_S_get_c_name())
{ _M_initialize_timepunct(); }
template<typename _CharT>
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
size_t __refs)
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
_M_name_timepunct(NULL)
{
const size_t __len = std::strlen(__s) + 1;
char* __tmp = new char[__len];
std::memcpy(__tmp, __s, __len);
_M_name_timepunct = __tmp;
try
{ _M_initialize_timepunct(__cloc); }
catch(...)
{
delete [] _M_name_timepunct;
__throw_exception_again;
}
}
template<typename _CharT>
__timepunct<_CharT>::~__timepunct()
{
if (_M_name_timepunct != _S_get_c_name())
delete [] _M_name_timepunct;
delete _M_data;
_S_destroy_c_locale(_M_c_locale_timepunct);
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,112 +0,0 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.8 Standard locale categories.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
namespace std
{
void
locale::facet::_S_create_c_locale(__c_locale&, const char*, __c_locale*)
{ }
void
locale::facet::_S_destroy_c_locale(__c_locale&)
{ }
__c_locale
locale::facet::_S_clone_c_locale(__c_locale&)
{ return __c_locale(); }
template<>
void
numpunct<char>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
_M_decimal_point = '.';
_M_thousands_sep = ',';
_M_grouping = "";
_M_truename = "true";
_M_falsename = "false";
}
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale)
{
// "C" locale
_M_decimal_point = L'.';
_M_thousands_sep = L',';
_M_grouping = "";
_M_truename = L"true";
_M_falsename = L"false";
}
#endif
template<>
void
moneypunct<char>::_M_initialize_moneypunct(__c_locale)
{
// "C" locale
_M_decimal_point = '.';
_M_thousands_sep = ',';
_M_grouping = "";
_M_curr_symbol = string_type();
_M_positive_sign = string_type();
_M_negative_sign = string_type();
_M_frac_digits = 0;
_M_pos_format = money_base::_S_default_pattern;
_M_neg_format = money_base::_S_default_pattern;
}
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
void
moneypunct<wchar_t>::_M_initialize_moneypunct(__c_locale)
{
// "C" locale
_M_decimal_point = L'.';
_M_thousands_sep = L',';
_M_grouping = "";
_M_curr_symbol = string_type();
_M_positive_sign = string_type();
_M_negative_sign = string_type();
_M_frac_digits = 0;
_M_pos_format = money_base::_S_default_pattern;
_M_neg_format = money_base::_S_default_pattern;
}
#endif
} // namespace std

View File

@ -1,51 +0,0 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file c++locale.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.8 Standard locale categories.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <clocale>
#include <langinfo.h> // For codecvt
#include <iconv.h> // For codecvt using iconv, iconv_t
#include <nl_types.h> // For messages
_GLIBCXX_BEGIN_NAMESPACE(std)
typedef int* __c_locale;
_GLIBCXX_END_NAMESPACE

View File

@ -1,61 +0,0 @@
// std::messages implementation details, IEEE 1003.1-200x version -*- C++ -*-
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#include <locale>
namespace std
{
// Specializations
template<>
string
messages<char>::do_get(catalog __c, int __setid, int __msgid,
const string& __dfault) const
{
nl_catd __nlc = reinterpret_cast<nl_catd>(__c);
return string(catgets(__nlc, __setid, __msgid, __dfault.c_str()));
}
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
wstring
messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
{
nl_catd __nlc = reinterpret_cast<nl_catd>(__c);
char* __msg = catgets(__nlc, __setid, __msgid,
_M_convert_to_char(__dfault));
return _M_convert_from_char(__msg);
}
#endif
}

View File

@ -1,77 +0,0 @@
// std::messages implementation details, IEEE 1003.1-200x version -*- C++ -*-
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file messages_members.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
_GLIBCXX_BEGIN_NAMESPACE(std)
// Non-virtual member functions.
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
const char*) const
{ return this->do_open(__s, __loc); }
// Virtual member functions.
template<typename _CharT>
messages<_CharT>::~messages()
{ }
template<typename _CharT>
typename messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>& __s,
const locale&) const
{ return reinterpret_cast<catalog>(catopen(__s.c_str(), NL_CAT_LOCALE)); }
template<typename _CharT>
typename messages<_CharT>::string_type
messages<_CharT>::do_get(catalog __c, int __setid, int __msgid,
const string_type& __dfault) const
{
nl_catd __nlc = reinterpret_cast<nl_catd>(__c);
char* __msg = catgets(__nlc, __setid, __msgid,
_M_convert_to_char(__dfault));
return _M_convert_from_char(__msg);
}
template<typename _CharT>
void
messages<_CharT>::do_close(catalog __c) const
{ catclose(reinterpret_cast<nl_catd>(__c)); }
_GLIBCXX_END_NAMESPACE

View File

@ -1,43 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
#ifdef _ARCH_PPC
#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("isync":::"memory")
#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("sync":::"memory")
#else
#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
#endif
#endif

View File

@ -1,58 +0,0 @@
// Low-level functions for atomic operations: AIX version -*- C++ -*-
// Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#include <ext/atomicity.h>
/* We cannot use the cpu/powerpc/bits/atomicity.h inline assembly
definitions for these operations since they depend on operations
that are not available on the original POWER architecture. AIX
still runs on the POWER architecture, so it would be incorrect to
assume the existence of these instructions.
The definition of _Atomic_word must match the type pointed to by
atomic_p in <sys/atomic_op.h>. */
extern "C"
{
#include <sys/atomic_op.h>
}
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add (volatile _Atomic_word* __mem, int __val)
{ return ::fetch_and_add(const_cast<atomic_p>(__mem), __val); }
void
__attribute__ ((__unused__))
__atomic_add (volatile _Atomic_word* __mem, int __val)
{ (void) ::fetch_and_add(const_cast<atomic_p>(__mem), __val); }
_GLIBCXX_END_NAMESPACE

View File

@ -1,60 +0,0 @@
// Locale support -*- C++ -*-
// Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.1 Locales
//
// Information as gleaned from /usr/include/ctype.h
_GLIBCXX_BEGIN_NAMESPACE(std)
/// @brief Base class for ctype.
struct ctype_base
{
// Non-standard typedefs.
typedef const int* __to_type;
// NB: Offsets into ctype<char>::_M_table force a particular size
// on the mask type. Because of this, we don't use an enum.
typedef unsigned int mask;
static const mask upper = _ISUPPER;
static const mask lower = _ISLOWER;
static const mask alpha = _ISALPHA;
static const mask digit = _ISDIGIT;
static const mask xdigit = _ISXDIGIT;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
static const mask graph = _ISALPHA | _ISDIGIT | _ISPUNCT;
static const mask cntrl = _ISCNTRL;
static const mask punct = _ISPUNCT;
static const mask alnum = _ISALPHA | _ISDIGIT;
};
_GLIBCXX_END_NAMESPACE

View File

@ -1,76 +0,0 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file ctype_inline.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.1 Locales
//
// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
// functions go in ctype.cc
_GLIBCXX_BEGIN_NAMESPACE(std)
bool
ctype<char>::
is(mask __m, char __c) const
{ return __OBJ_DATA(__lc_ctype)->mask[__c] & __m; }
const char*
ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const
{
while (__low < __high)
*__vec++ = __OBJ_DATA(__lc_ctype)->mask[*__low++];
return __high;
}
const char*
ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const
{
while (__low < __high && !this->is(__m, *__low))
++__low;
return __low;
}
const char*
ctype<char>::
scan_not(mask __m, const char* __low, const char* __high) const
{
while (__low < __high && this->is(__m, *__low) != 0)
++__low;
return __low;
}
_GLIBCXX_END_NAMESPACE

View File

@ -1,97 +0,0 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file ctype_noninline.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.1 Locales
//
// Information as gleaned from /usr/include/ctype.h
const ctype_base::mask*
ctype<char>::classic_table() throw()
{ return 0; }
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
{
memset(_M_widen, 0, sizeof(_M_widen));
_M_widen_ok = 0;
memset(_M_narrow, 0, sizeof(_M_narrow));
_M_narrow_ok = 0;
}
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
{
memset(_M_widen, 0, sizeof(_M_widen));
_M_widen_ok = 0;
memset(_M_narrow, 0, sizeof(_M_narrow));
_M_narrow_ok = 0;
}
char
ctype<char>::do_toupper(char __c) const
{ return ::toupper((int) __c); }
const char*
ctype<char>::do_toupper(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = ::toupper((int) *__low);
++__low;
}
return __high;
}
char
ctype<char>::do_tolower(char __c) const
{ return ::tolower((int) __c); }
const char*
ctype<char>::do_tolower(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = ::tolower((int) *__low);
++__low;
}
return __high;
}

View File

@ -1,56 +0,0 @@
// Specific definitions for AIX -*- C++ -*-
// Copyright (C) 2000, 2002, 2005, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file os_defines.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _GLIBCXX_OS_DEFINES
#define _GLIBCXX_OS_DEFINES
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
// off64_t
#ifndef _LARGE_FILE_API
#define _LARGE_FILE_API
#endif
// atomic types
#ifndef _ALL_SOURCE
#define _ALL_SOURCE
#endif
// C99 math
#ifndef __COMPATMATH__
#define __COMPATMATH__
#endif
#endif

View File

@ -1,76 +0,0 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.1 Locales
//
// Information as gleaned from /usr/include/ctype.h on FreeBSD 3.4,
// 4.0 and all versions of the CVS managed file at:
// :pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs/src/include/ctype.h
_GLIBCXX_BEGIN_NAMESPACE(std)
/// @brief Base class for ctype.
struct ctype_base
{
// Non-standard typedefs.
typedef const int* __to_type;
typedef unsigned long mask;
#ifdef _CTYPE_S
// FreeBSD 4.0 uses this style of define.
static const mask upper = _CTYPE_U;
static const mask lower = _CTYPE_L;
static const mask alpha = _CTYPE_A;
static const mask digit = _CTYPE_D;
static const mask xdigit = _CTYPE_X;
static const mask space = _CTYPE_S;
static const mask print = _CTYPE_R;
static const mask graph = _CTYPE_A | _CTYPE_D | _CTYPE_P;
static const mask cntrl = _CTYPE_C;
static const mask punct = _CTYPE_P;
static const mask alnum = _CTYPE_A | _CTYPE_D;
#else
// Older versions, including Free BSD 3.4, use this style of define.
static const mask upper = _U;
static const mask lower = _L;
static const mask alpha = _A;
static const mask digit = _D;
static const mask xdigit = _X;
static const mask space = _S;
static const mask print = _R;
static const mask graph = _A | _D | _P;
static const mask cntrl = _C;
static const mask punct = _P;
static const mask alnum = _A | _D;
#endif
};
_GLIBCXX_END_NAMESPACE

View File

@ -1,152 +0,0 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file ctype_inline.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.1 Locales
//
// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
// functions go in ctype.cc
_GLIBCXX_BEGIN_NAMESPACE(std)
bool
ctype<char>::
is(mask __m, char __c) const
{
if (_M_table)
return _M_table[static_cast<unsigned char>(__c)] & __m;
else
return __istype(__c, __m);
}
const char*
ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const
{
if (_M_table)
while (__low < __high)
*__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
else
for (;__low < __high; ++__vec, ++__low)
{
#if defined (_CTYPE_S) || defined (__istype)
*__vec = __maskrune (*__low, upper | lower | alpha | digit | xdigit
| space | print | graph | cntrl | punct | alnum);
#else
mask __m = 0;
if (this->is(upper, *__low)) __m |= upper;
if (this->is(lower, *__low)) __m |= lower;
if (this->is(alpha, *__low)) __m |= alpha;
if (this->is(digit, *__low)) __m |= digit;
if (this->is(xdigit, *__low)) __m |= xdigit;
if (this->is(space, *__low)) __m |= space;
if (this->is(print, *__low)) __m |= print;
if (this->is(graph, *__low)) __m |= graph;
if (this->is(cntrl, *__low)) __m |= cntrl;
if (this->is(punct, *__low)) __m |= punct;
// Do not include explicit line for alnum mask since it is a
// pure composite of masks on FreeBSD.
*__vec = __m;
#endif
}
return __high;
}
const char*
ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const
{
if (_M_table)
while (__low < __high
&& !(_M_table[static_cast<unsigned char>(*__low)] & __m))
++__low;
else
while (__low < __high && !this->is(__m, *__low))
++__low;
return __low;
}
const char*
ctype<char>::
scan_not(mask __m, const char* __low, const char* __high) const
{
if (_M_table)
while (__low < __high
&& (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
++__low;
else
while (__low < __high && this->is(__m, *__low) != 0)
++__low;
return __low;
}
#ifdef _GLIBCXX_USE_WCHAR_T
inline bool
ctype<wchar_t>::
do_is(mask __m, wchar_t __c) const
{
return __istype (__c, __m);
}
inline const wchar_t*
ctype<wchar_t>::
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
{
for (; __lo < __hi; ++__vec, ++__lo)
*__vec = __maskrune (*__lo, upper | lower | alpha | digit | xdigit
| space | print | graph | cntrl | punct | alnum);
return __hi;
}
inline const wchar_t*
ctype<wchar_t>::
do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
{
while (__lo < __hi && ! __istype (*__lo, __m))
++__lo;
return __lo;
}
inline const wchar_t*
ctype<wchar_t>::
do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
{
while (__lo < __hi && __istype (*__lo, __m))
++__lo;
return __lo;
}
#endif
_GLIBCXX_END_NAMESPACE

View File

@ -1,96 +0,0 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file ctype_noninline.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 22.1 Locales
//
// Information as gleaned from /usr/include/ctype.h
const ctype_base::mask*
ctype<char>::classic_table() throw()
{ return 0; }
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
{
memset(_M_widen, 0, sizeof(_M_widen));
_M_widen_ok = 0;
memset(_M_narrow, 0, sizeof(_M_narrow));
_M_narrow_ok = 0;
}
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
{
memset(_M_widen, 0, sizeof(_M_widen));
_M_widen_ok = 0;
memset(_M_narrow, 0, sizeof(_M_narrow));
_M_narrow_ok = 0;
}
char
ctype<char>::do_toupper(char __c) const
{ return ::toupper((int) __c); }
const char*
ctype<char>::do_toupper(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = ::toupper((int) *__low);
++__low;
}
return __high;
}
char
ctype<char>::do_tolower(char __c) const
{ return ::tolower((int) __c); }
const char*
ctype<char>::do_tolower(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = ::tolower((int) *__low);
++__low;
}
return __high;
}

Some files were not shown because too many files have changed in this diff Show More