Commit Graph

447 Commits

Author SHA1 Message Date
Paolo Carlini fb8d463851 std_streambuf.h (__copy_streambufs): Remove the first, unused, basic_ios<> parameter.
2003-11-27  Paolo Carlini  <pcarlini@suse.de>

	* include/std/std_streambuf.h (__copy_streambufs): Remove
	the first, unused, basic_ios<> parameter.
	* src/streambuf-inst.cc: Likewise.
	* include/bits/streambuf.tcc: Likewise.
	* include/bits/istream.tcc (operator>>(__streambuf_type*)):
	Tweak accordingly the call.
	* include/bits/ostream.tcc (operator<<(__streambuf_type*)):
	Likewise.

	* include/bits/streambuf.tcc (__copy_streambufs): Remove
	redundant try/catch.

From-SVN: r73992
2003-11-27 13:13:19 +00:00
Paolo Carlini ce492af354 locale_init.cc: Cosmetic reformatting.
2003-11-24  Paolo Carlini  <pcarlini@suse.de>

	* src/locale_init.cc: Cosmetic reformatting.

From-SVN: r73882
2003-11-24 17:24:40 +00:00
Benjamin Kosnik 9dc420e68d formatter.h: Use _Tp as template argument.
2003-11-20  Benjamin Kosnik  <bkoz@redhat.com>

	* include/debug/formatter.h: Use _Tp as template argument.
	* src/debug.cc: Same, instantiate std::size_t.

From-SVN: r73792
2003-11-21 05:49:21 +00:00
Benjamin Kosnik 4be58168d3 re PR libstdc++/13109 (libstdc++-v3 bootstrap failure on Tru64 UNIX V4.0F: snprintf missing)
2003-11-20  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13109
	* include/debug/formatter.h (_Error_formatter::_M_format_word): New.
	* src/debug.cc (__gnu_debug): Format.
	(_Error_formatter::_M_format_word): Define, use, instantiate.

From-SVN: r73770
2003-11-20 19:32:13 +00:00
Benjamin Kosnik 285b36d6a5 [multiple changes]
2003-11-11  Doug Gregor  <gregod@cs.rpi.edu>

	* docs/html/debug.html: Document libstdc++ debug mode.
	* docs/html/debug_mode.html: Document libstdc++ debug mode design.
	* docs/html/test.html: Document how to test under debug mode.
	* docs/html/17_intro/howto.html: Document debug-mode macros.
	* include/Makefile.am: Install debug-mode headers.
	* src/Makefile.am: Include debug.cc.
	* include/bits/basic_string.tcc:
	  (basic_string::_S_construct): Fix NULL pointer check.
	  (__is_null_pointer): New.
	  Add precondition annotations.
	* include/bits/stream_iterator.h (istream_iterator,
	ostream_iterator): Added precondition annotations.
	* include/bits/streambuf_iterator.h (istreambuf_iterator): Ditto.
	* include/bits/stl_queue.h (queue, priority_queue): Ditto.
	* include/bits/stl_stack.h (stack): Ditto.
	* include/bits/basic_string.h (basic_string): Ditto.
	* include/bits/basic_string.tcc (basic_string): Ditto.
	* include/std/std_memory.h (auto_ptr): Ditto.
	* include/std/std_valarray.h (valarray): Ditto.
	* include/bits/stl_algo.h: Added algorithm precondition
	annotations.
	* include/bits/stl_algobase.h: Added algorithm precondition
	annotations.
	* include/bits/stl_numeric.h: Ditto.
	* include/ext/algorithm: Added algorithm precondition
	annotations.
	(__is_heap): Moved away from here.
	* include/bits/stl_heap.h: Added algorithm precondition
	annotations.
	(__is_heap): Moved to the top of this file.
	(__is_heap): Added iterator range overloads.
	* testsuite/20_util/auto_ptr_neg.cc: Fix line numbers to match up
	with changes in std_memory.h.
	* testsuite/23_containers/list/operators/4.cc: Don't verify
	performance guarantees when in debug mode.
	* testsuite/23_containers/bitset/invalidation/1.cc: New.
	* testsuite/23_containers/deque/invalidation/1.cc: New.
	* testsuite/23_containers/deque/invalidation/2.cc: New.
	* testsuite/23_containers/deque/invalidation/3.cc: New.
	* testsuite/23_containers/deque/invalidation/4.cc: New.
	* testsuite/23_containers/list/invalidation/1.cc: New.
	* testsuite/23_containers/list/invalidation/2.cc: New.
	* testsuite/23_containers/list/invalidation/3.cc: New.
	* testsuite/23_containers/list/invalidation/4.cc: New.
	* testsuite/23_containers/map/invalidation/1.cc: New.
	* testsuite/23_containers/map/invalidation/2.cc: New.
	* testsuite/23_containers/multimap/invalidation/1.cc: New.
	* testsuite/23_containers/multimap/invalidation/2.cc: New.
	* testsuite/23_containers/multiset/invalidation/1.cc: New.
	* testsuite/23_containers/multiset/invalidation/2.cc: New.
	* testsuite/23_containers/set/invalidation/1.cc: New.
	* testsuite/23_containers/set/invalidation/2.cc: New.
	* testsuite/23_containers/vector/invalidation/1.cc: New.
	* testsuite/23_containers/vector/invalidation/2.cc: New.
	* testsuite/23_containers/vector/invalidation/3.cc: New.
	* testsuite/23_containers/vector/invalidation/4.cc: New.
	* testsuite/25_algorithms/heap.cc: Don't verify
	performance guarantees when in debug mode.
	* include/debug/bitset: New.
	* include/debug/debug.h: New.
	* include/debug/deque: New.
	* include/debug/formatter.h: New.
	* include/debug/hash_map: New.
	* include/debug/hash_map.h: New.
	* include/debug/hash_multimap.h: New.
	* include/debug/hash_set: New.
	* include/debug/hash_set.h: New.
	* include/debug/hash_multiset.h: New.
	* include/debug/list: New.
	* include/debug/map: New.
	* include/debug/map.h: New.
	* include/debug/multimap.h: New.
	* include/debug/multiset.h: New.
	* include/debug/safe_base.h: New.
	* include/debug/safe_iterator.h: New.
	* include/debug/safe_iterator.tcc: New.
	* include/debug/safe_sequence.h: New.
	* include/debug/set: New.
	* include/debug/set.h: New.
	* include/debug/string: New.
	* include/debug/vector: New.
	* src/debug.cc: New.
	* config/linker-map.gnu: Add debug mode symbols.

2003-11-11  Benjamin Kosnik  <bkoz@redhat.com>

	* src/string-inst.cc: Tweak namespaces.
	* src/misc-inst.cc: Same.
	* docs/html/debug.html: Edits.
	* config/link-map.gnu: Remove cruft.

	* include/bits/c++config: Add in namespace associations.
	* include/std/std_bitset.h: Adjust namespace to __gnu_norm,
	comment tweaks.
	* include/bits/deque.tcc: Same.
	* include/bits/list.tcc: Same.
	* include/bits/stl_bvector.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/stl_list.h: Same.
	* include/bits/stl_map.h: Same.
	* include/bits/stl_multimap.h: Same.
	* include/bits/stl_multiset.h: Same.
	* include/bits/stl_set.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/bits/vector.tcc: Same.

	* include/std/std_algorithm.h: Remove markup comments.
	* include/std/std_functional.h: Same.
	* include/std/std_iterator.h: Same.
	* include/std/std_numeric.h: Same.
	* include/std/std_utility.h: Same.
	* include/bits/stl_queue.h: Formatting tweaks.
	* include/bits/stl_stack.h: Same.
	* include/std/std_deque.h: Include debugging version in debug mode.
	* include/std/std_list.h: Same.
	* include/std/std_map.h: Same.
	* include/std/std_set.h: Same.
	* include/std/std_vector.h: Same.
	* include/std/std_queue.h: Use deque, vector.
	* include/std/std_stack.h: Same.

From-SVN: r73459
2003-11-11 20:09:16 +00:00
Paolo Carlini f20d2b7871 re PR libstdc++/12750 (time_get::_M_extract_via_format doesn't deal with 'e')
2003-10-27  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12750
	* include/bits/locale_facets.tcc
	(time_get::_M_extract_via_format): Deal with code 'e'.
	* testsuite/22_locale/time_get/get_date/char/12750.cc: New.
	* testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Ditto.

	* include/bits/locale_facets.tcc
	(time_get::_M_extract_via_format): Tweak to absolutely avoid
	dereferencing end iterators.

	* include/bits/locale_facets.h (__verify_grouping):
	Const-ify second parameter.
	* include/bits/locale_facets.tcc (__verify_grouping): Ditto.
	* src/locale-inst.cc (__verify_grouping): Ditto.

2003-10-27  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::_M_extract_float):
	Various things: 1- Avoid absolutely end iterator dereferences;
	2- Improve performance-wise the code skipping leading zeros;
	3- Fix two bugs wrt early bail out in case of parsing errors
	(see testcases); 4- General clean up.
	(num_get::_M_extract_int): Likewise, except 3-. Additionally,
	use __builtin_expect to favor base 10 inputs.
	* testsuite/22_locale/num_get/get/char/7.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/7.cc: Ditto.

From-SVN: r72987
2003-10-27 16:21:14 +00:00
Paolo Carlini 3c21d6e0f7 locale_facets.tcc (__int_to_char): Remove the const int parameter.
2003-10-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (__int_to_char): Remove
	the const int parameter.
	(_M_insert_int): Update caller.
	* src/locale-inst.cc (__int_to_char): Update instantiations.

From-SVN: r72825
2003-10-22 21:53:21 +00:00
Benjamin Kosnik bf5fe4734c locale_facets.h: Correct byname facets for "C" locale.
2003-10-22  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h: Correct byname facets for "C"
	locale.
	* config/locale/generic/ctype_members.cc: Same.
	* config/locale/generic/messages_members.h: Same.
	* config/locale/gnu/ctype_members.cc: Same.
	* config/locale/gnu/messages_members.h: Same.
	* include/bits/codecvt.h: Same.
	* src/ctype.cc: Same.
	* testsuite/22_locale/codecvt_byname/1.cc: New.
	* testsuite/22_locale/collate/1.cc: Edit.
	* testsuite/22_locale/collate_byname/1.cc: Derivation tests, move to...
	* testsuite/22_locale/collate_byname/named_equivalence.cc: ...here.
	* testsuite/22_locale/ctype/1.cc: Derivation tests.
	* testsuite/22_locale/ctype/11844.cc: Move...
	* testsuite/22_locale/ctype_base/11844.cc: ...here.
	* testsuite/22_locale/ctype_base/1.cc: Move mask bits here.
	* testsuite/22_locale/ctype_byname/1.cc: Name.
	* testsuite/22_locale/messages_byname/1.cc: New.
	* testsuite/22_locale/messages_byname/named_equivalence.cc: New.
	* testsuite/22_locale/moneypunct_byname/1.cc: Derivation test.
	* testsuite/22_locale/moneypunct_byname/named_equivalence.cc: New.
	* testsuite/22_locale/numpunct/1.cc: Edit.
	* testsuite/22_locale/numpunct_byname/2.cc: Move...
	* testsuite/22_locale/numpunct/members/char/3.cc: ...here.
	* testsuite/22_locale/numpunct_byname/1.cc: Derivation tests.
	* testsuite/22_locale/numpunct_byname/named_equivalence.cc: New.

From-SVN: r72814
2003-10-22 18:58:35 +00:00
Benjamin Kosnik 82c2e3d44a re PR libstdc++/9858 (Extra virtual functions in ctype<char>)
2003-10-21  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/9858
	* include/bits/locale_facets.h (ctype<char>): Remove
	__ctype_abstract_base.
	(ctype<char>::do_is): Remove.
	(ctype<char>::do_scan_is): Remove.
	* src/ctype.cc: Same. Inline the rest.
	* testsuite/22_locale/ctype/is/char/9858.cc: New.
	* config/os/aix/ctype_noninline.h: Adjust ctor.
	* config/os/bsd/freebsd/ctype_noninline.h: Same.
	* config/os/bsd/netbsd/ctype_noninline.h: Same.
	* config/os/djgpp/ctype_noninline.h: Same.
	* config/os/generic/ctype_noninline.h: Same.
	* config/os/gnu-linux/ctype_noninline.h: Same.
	* config/os/hpux/ctype_noninline.h: Same.
	* config/os/irix/irix5.2/ctype_noninline.h: Same.
	* config/os/irix/irix6.5/ctype_noninline.h: Same.
	* config/os/mingw32/ctype_noninline.h: Same.
	* config/os/newlib/ctype_noninline.h: Same.
	* config/os/qnx/qnx6.1/ctype_noninline.h: Same.
	* config/os/solaris/solaris2.5/ctype_noninline.h: Same.
	* config/os/solaris/solaris2.6/ctype_noninline.h: Same.
	* config/os/solaris/solaris2.7/ctype_noninline.h: Same.
	* config/os/windiss/ctype_noninline.h: Same.

From-SVN: r72753
2003-10-21 14:22:43 +00:00
Paolo Carlini d23ad8c84e locale.cc: Tweak a comment.
2003-10-21  Paolo Carlini  <pcarlini@suse.de>

	* src/locale.cc: Tweak a comment.
	* src/localename.cc: Move a comment.

From-SVN: r72745
2003-10-21 11:42:29 +00:00
Andreas Tobler 8f4c7b679c locale.cc (locale::_S_initialize): Re-apply workaround a confusion of the use of the gthr API when...
2003-10-18  Andreas Tobler  <a.tobler@schweiz.ch>

	* src/locale.cc (locale::_S_initialize): Re-apply workaround a
	confusion of the use of the gthr API when __gthread_active_p()
	returns true.

From-SVN: r72679
2003-10-19 17:43:44 +00:00
Benjamin Kosnik c755e77d63 Makefile.am: Add new files.
2003-10-17  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am: Add new files.
	* src/Makefile.in: Regenerate.
	* src/globals.cc: Split into..
	* src/globals_io.cc: New.
	* src/globals_locale.cc: New.
	* src/ios.cc: Split into...
	* src/ios_init.cc: New.
	* src/ios_locale.cc: New.
	* src/locale-inst.cc: Split into..
	* src/wlocale-inst.cc: New.
	* src/locale-misc-inst.cc: New.
	* src/locale.cc, src/localename: Split into...
	* src/locale_facets.cc: New.
	* src/locale_init.cc: New.
	* src/wstring-inst.cc: Add copyright info.

From-SVN: r72607
2003-10-17 14:47:30 +00:00
Paolo Carlini 0392ff984f locale.cc (locale::locale(const char*)): ...
2003-10-16  Paolo Carlini  <pcarlini@suse.de>

	* src/locale.cc (locale::locale(const char*)): ... one
	more comparison missed in the previous commit.

From-SVN: r72574
2003-10-16 20:36:45 +00:00
Paolo Carlini eaed902bf7 locale.cc (locale::locale(const char*)): Tweak a couple of comparisons to use basic_string operators.
2003-10-16  Paolo Carlini  <pcarlini@suse.de>

	* src/locale.cc (locale::locale(const char*)): Tweak
	a couple of comparisons to use basic_string operators.

From-SVN: r72554
2003-10-16 17:53:49 +00:00
Paolo Carlini f991b1d853 re PR libstdc++/12540 (Memory leak in locale::locale(const char*))
2003-10-16  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/12540
	* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t, true/false>::_M_initialize_moneypunct):
	Don't leak memory if new throws.
	* src/locale.cc (locale::locale(const char*)): In order not
	to leak memory in case new throws, use a basic_string type
	for __res too and avoid strdup.

From-SVN: r72553
2003-10-16 17:24:07 +00:00
Paolo Carlini 42db0f21ef localename.cc (_M_replace_categories, [...]): Const-ify a couple of variables.
2003-10-14  Paolo Carlini  <pcarlini@unitus.it>

	* src/localename.cc (_M_replace_categories, M_replace_facet):
	Const-ify a couple of variables.

From-SVN: r72472
2003-10-14 14:56:29 +00:00
Petur Runolfsson 9dccaa6bb6 locale.cc (locale::_S_initialize): Workaround a confusion of the use of the gthr API when...
2003-10-14  Petur Runolfsson  <peturr02@ru.is>
	    Andreas Tobler  <a.tobler@schweiz.ch>

	* src/locale.cc (locale::_S_initialize): Workaround a confusion
	of the use of the gthr API when __gthread_active_p() returns true.

Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch>

From-SVN: r72458
2003-10-14 06:47:10 +02:00
Petur Runolfsson a62e73117f re PR libstdc++/11460 (Incorrect use of int_type in strstreambuf::pbackfail)
2003-10-12  Petur Runolfsson  <peturr02@ru.is>
	    Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/11460
	* src/strstream.cc (pbackfail): Fix to use to_int_type.
	* testsuite/backward/11460.cc: New, from the PR.

Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>

From-SVN: r72405
2003-10-12 20:03:18 +00:00
Paolo Carlini f5677b1560 codecvt_specializations.h: Change #ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS to a comment.
2003-10-12  Paolo Carlini  <pcarlini@unitus.it>

	* config/locale/ieee_1003.1-2001/codecvt_specializations.h:
	Change #ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS to a comment.
	* include/bits/basic_string.tcc: Likewise.
	* include/bits/ios_base.h: Likewise.
	* include/bits/istream.tcc: Likewise.
	* include/bits/locale_facets.tcc: Likewise.
	* include/bits/ostream.tcc: Likewise.
	* include/bits/stl_function.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_pair.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/streambuf_iterator.h
	* include/std/std_iosfwd.h: Likewise.
	* include/std/std_istream.h: Likewise.
	* include/std/std_sstream.h: Likewise.
	* include/std/std_streambuf.h: Likewise.
	* src/ios.cc: Likewise.
	* include/bits/c++config:
	Comment out #define _GLIBCXX_RESOLVE_LIB_DEFECTS 1.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Tweak a
	dg-error directive due to removal of a blank line.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.

From-SVN: r72392
2003-10-12 10:12:09 +00:00
Benjamin Kosnik 5aaa21080b linker-map.gnu: Make more *_type_info bits visible.
2003-10-09  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu: Make more *_type_info bits visible.
	Move new/delete bits back into GLIBCXX space.

	* include/bits/locale_classes.h: Move _M_id out of line, so that
	locale:🆔:_S_highwater can be removed from the export list.
	* src/locale.cc (locale:🆔:_M_id): Define.

From-SVN: r72287
2003-10-09 21:17:11 +00:00
Benjamin Kosnik 93d046861d [multiple changes]
2003-10-09  Benjamin Kosnik  <bkoz@redhat.com>

	* src/string-inst.cc: Prune.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.

2003-10-09  Petur Runolfsson  <peturr02@ru.is>

	* src/io-inst.cc: Don't include iostream.
	* include/bits/ios_base.h (ios_base::failure): Use string.
	* src/Makefile.am: Add ios_failure.cc.
	* src/Makefile.in: Regenerate.
	* src/ios.cc: Move ios_base::failure definitions to...
	* src/ios_failure.cc: ...here. New.

From-SVN: r72272
2003-10-09 16:53:54 +00:00
Benjamin Kosnik bb1b12ec0a locale_classes.h (locale::facet::_S_get_c_name): Add.
2003-10-02  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_classes.h (locale::facet::_S_get_c_name): Add.
	* src/locale.cc: Define.
	* src/localename.cc: Use it.
	* config/locale/generic/time_members.h: Same.
	* config/locale/gnu/messages_members.h: Same.
	* config/locale/gnu/time_members.h: Same.

From-SVN: r72050
2003-10-02 23:06:13 +00:00
Benjamin Kosnik 5c109a1758 locale.cc (locale::_S_initialize): Use __gthread_active_p.
2003-10-02  Benjamin Kosnik  <bkoz@redhat.com>

	* src/locale.cc (locale::_S_initialize): Use __gthread_active_p.
	(locale::facet::_S_get_c_locale): Same.

From-SVN: r72045
2003-10-02 19:02:58 +00:00
Benjamin Kosnik 8ae8113683 [multiple changes]
2003-10-02  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu: Export _S_get_c_locale instead of
	_S_c_locale object.

2003-10-02  Petur Runolfsson  <peturr02@ru.is>

	* config/locale/generic/c_locale.cc
	(category_names, locale::_S_categories): Const qualify.
	* config/locale/gnu/c_locale.cc: Same.
	* config/locale/generic/time_members.h (__timepunct::__timepunct):
	Copy string contents before assigning to _M_name_timepunct,
	qualify strcpy and strlen with std::.
	* config/locale/gnu/time_members.h: Same.
	* config/locale/gnu/messages_members.h (messages::messages):
	Copy string contents before assigning to _M_name_messages,
	qualify strcpy and strlen with std::.
	* config/os/gnu-linux/ctype_noninline.h
	(ctype<char>::classic_table()): Don't call locale::classic().
	* include/bits/locale_classes.h
	(locale::_S_categories): Const qualify.
	(locale::_S_once, locale::_S_initialize_once,
	locale::facet::_S_once, locale::facet::_S_initialize_once,
	locale::facet::_S_get_c_locale): Declare.
	(locale::_S_initialize): Don't define.
	(locale::facet::_S_c_locale): Make private.
	(locale::facet::_S_c_name): Same, const qualify.
	(locale::_Impl::_Impl(facet**, size_t, bool)): Drop unused
	parameters, add throw() specifier.
	* include/bits/locale_facets.h (__timepunct::_M_name_timepunct,
	messages::_M_name_messages): Const qualify.
	* src/locale.cc
	(locale::_S_once, locale::facet::_S_once): Define.
	(locale::classic): Move initialization code...
	(locale::_S_initialize_once): ...here.
	(locale::_S_initialize): Call _S_initialize_once through
	__gthread_once.
	(locale::facet::_S_initialize_once): Initialize _S_c_locale.
	(locale::facet::_S_get_c_locale): Call _S_initialize_once through
	__gthread_once before returning _S_c_locale.
	* src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool)):
	Drop unused parameters, add throw() specifier, don't initialize
	locale::facet::_S_c_locale and _S_c_name.

	* config/locale/generic/messages_members.h:
	Replace _S_c_locale with _S_get_c_locale().
	* config/locale/gnu/c_locale.cc: Same.
	* config/locale/gnu/messages_members.h: Same.
	* config/locale/gnu/numeric_members.cc: Same.
	* config/locale/gnu/time_members.cc: Same.
	* config/os/gnu-linux/ctype_noninline.h: Same.
	* include/bits/locale_facets.h: Same.
	* include/bits/locale_facets.tcc: Same.
	* src/codecvt.cc: Same.
	* src/ctype.cc: Same.

From-SVN: r72040
2003-10-02 16:56:39 +00:00
Carlo Wood 4a035cf7ea demangle.h (demangle<Allocator>::symbol(char const*)): Decode symbols that start with _GLOBAL_[ID]_ differently...
* include/bits/demangle.h (demangle<Allocator>::symbol(char const*)):
Decode symbols that start with _GLOBAL_[ID]_ differently: the
trailing part ends with a terminating zero and is not necessarily an
encoding.
* src/demangle.cc (): Same.
* testsuite/demangle/regression/cw-13.cc: Adjust for new output.

From-SVN: r72027
2003-10-02 14:29:26 +00:00
Paolo Carlini 70863cbd39 PR libstdc++/12352 (cont)
2003-09-30  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/12352 (cont)
	* src/localename.cc (locale::_Impl::_Impl(const char*, size_t)):
	Don't leak __cloc; don't leak if any of the _M_init_facet(...)
	calls fail.
	(locale::_Impl::_Impl(const _Impl&, size_t)): Tweak.
	(locale::_Impl::~_Impl): Don't do anything if !_M_facets,
	!_M_caches, !_M_names.

From-SVN: r71936
2003-09-30 07:28:51 +00:00
Paolo Carlini 91675f9d25 re PR libstdc++/12352 (Exception safety problems in src/localename.cc)
2003-09-25  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/12352
	* src/localename.cc (locale::_Impl::_Impl(const _Impl&,
	size_t)): Don't leak if memory allocations for _M_facets,
	_M_caches, and _M_names fail.
	(locale::_Impl::_Impl(const char*, size_t)): Ditto.
	(locale::_Impl::_M_replace_categories(const _Impl*,
	category)): Ditto.
	(locale::_Impl::_M_install_facet(const locale::id*,
	const facet*)): Ditto.
	* include/bits/locale_classes.h (locale::locale(const locale&,
	_Facet*)): Don't leak memory.
	* testsuite/22_locale/locale/cons/12352.cc: New, from the PR.

	* src/localename.cc (locale::_Impl::_Impl(facet**, size_t,
	bool)): Qualify with std:: strcpy, tweak.
	* include/bits/locale_classes.h
	(locale::_Impl::_M_check_same_name): Qualify strcmp.

From-SVN: r71808
2003-09-26 00:22:01 +00:00
Brad Spencer 2b1be54b96 re PR c++/6072 (3.2 g++ testsuite breakage on cygwin)
2003-09-25  Brad Spencer  <spencer@infointeractive.com>

	PR libstdc++/6072
	* acinclude.m4:
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* crossconfig.m4: Add in wchar_t bits for solaris crosses.
	* config/io/basic_file_stdio.cc: Guard unistd.h.
	* include/c_compatibility/wchar.h: Guard extra wchar_t functionality.
	* include/c_std/std_cwchar.h: Same.
	* include/c_std/std_cwctype.h: Same.

From-SVN: r71795
2003-09-25 20:30:20 +00:00
Ulrich Weigand 7b865c3637 Makefile.am (version_dep): New variable.
* src/Makefile.am (version_dep): New variable.
	(libstdc___la_DEPENDENCIES): Use it to add dependency on
	libstdc++-symbol.ver only when using symbol versioning.
	* src/Makefile.in: Regenerate.

From-SVN: r71772
2003-09-25 12:56:10 +00:00
David Edelsohn 263594d2e4 ios.cc (ios_base::Init::Init): Remove unnecessary qualifier from _S_synced_with_stdio.
* src/ios.cc (ios_base::Init::Init): Remove unnecessary
        qualifier from _S_synced_with_stdio.

From-SVN: r71224
2003-09-08 21:08:48 -04:00
Phil Edwards ca618b60bf Makefile.am: Remove trailing whitespace.
2003-08-27  Phil Edwards  <pme@gcc.gnu.org>

	* Makefile.am:  Remove trailing whitespace.  Remove needless
	"foo = @foo@" assignments.  Replace direct uses of @foo@ with $(foo).
	* include/Makefile.am:  Likewise.
	* libmath/Makefile.am:  Likewise.
	* libsupc++/Makefile.am:  Likewise.
	* po/Makefile.am:  Likewise.
	* src/Makefile.am:  Likewise.
	* testsuite/Makefile.am:  Likewise.

	* Makefile.in, include/Makefile.in, libmath/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in,
	testsuite/Makefile.in:  Regenerated.

From-SVN: r70865
2003-08-27 21:29:43 +00:00
Phil Edwards 92eabea208 acinclude.m4 (GLIBCXX_CONDITIONAL): New macro.
2003-08-27  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCXX_CONDITIONAL):  New macro.  Wrap
	AM_CONDITIONAL.  Replace all calls to AM_CONDITIONAL with this one.
	(GLIBCXX_ENABLE_HOSTED):  New macro, sets new variable is_hosted,
	used elsewhere in this file.
	(GLIBCXX_EVALUATE_CONDITIONALS):  New macro...
	* configure.ac:  ...called here to expand all conditionals.
	* Makefile.am:  Conditionalize SUBDIRS on GLIBCXX_HOSTED.
	* include/Makefile.am:  Remove redundant gxx_include_dir assignment.
	(install-freestanding-headers):  New target, a subset of
	install-headers.  Conditionalize install-data-local on GLIBCXX_HOSTED.

	* aclocal.m4, configure, Makefile.in, include/Makefile.in,
	libmath/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
	src/Makefile.in, testsuite/Makefile.in:  Regenerated.

From-SVN: r70854
2003-08-27 19:06:56 +00:00
Phil Edwards 82ba99d59e Makefile.am: Add comment.
2003-08-26  Phil Edwards  <pme@gcc.gnu.org>

	* Makefile.am:  Add comment.
	* acinclude.m4 (GLIBCXX_CONFIGURE):  Set new glibcxx_SUBDIRS and
	SUBDIRS variables.
	* configure.ac:  Use them both here, instead of hardcoded lists.

	* fragment.am:  Add STAMP varaible.
	* include/Makefile.am:  Cosmetic whitespace cleanup.  Use $(LN_S)
	instead of @LN_S@.
	(stamp-*):  Move file creation rule outside of 'if' branches to
	ensure the stamp-* files are actually updated.  Use $(STAMP).
	* src/Makefile.am:  Remove now-nonexistant variable.
	* libsupc++/Makefile.am:  Likewise.  Snap the assignment chain
	for -prefer-pic.
	* po/Makefile.am:  Include same fragment as all the others.

	* aclocal.m4, configure, Makefile.in, include/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in:  Regenerated.

From-SVN: r70836
2003-08-27 00:38:28 +00:00
Phil Edwards 0df3f383ef acinclude.m4 (GLIBCXX_EXPORT_INCLUDES): Remove LIBMATH_INCLUDES and LIBSUPCXX_INCLUDES.
2003-08-17  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCXX_EXPORT_INCLUDES):  Remove LIBMATH_INCLUDES
	and LIBSUPCXX_INCLUDES.  Re-purpose TOPLEVEL_INCLUDES to refer to
	things from the top level.
	* configure.ac (GLIBCXX_IS_NATIVE):  Determine earlier and re-order.
	Comment out the conditionals for CANADIAN and GLIBCXX_BUILD_LIBMATH
	(currently unused).  Strip the fake-VPATH shell fragment from
	automake-generated rules, if present.
	* linkage.m4:  Add comment.

	* fragment.am:  New file, containing factored-out common settings.
	(AM_CPPFLAGS):  Absorb the deprecated INCLUDES variable contents.
	* Makefile.am:  Include fragment.am.  Remove common variables.
	* include/Makefile.am:  Likewise.
	* libmath/Makefile.am:  Likewise.
	* libsupc++/Makefile.am:  Likewise.
	* po/Makefile.am:  Likewise.  Print rules during check.
	* src/Makefile.am:  Likewise.
	* testsuite/Makefile.am:  Likewise.

	* aclocal.m4, configure, Makefile.in, include/Makefile.in,
	libmath/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
	src/Makefile.in, testsuite/Makefile.in:  Regenerate.

From-SVN: r70522
2003-08-17 20:23:12 +00:00
Phil Edwards 8b171e5587 configure.in: Rename...
2003-08-05  Phil Edwards  <pme@gcc.gnu.org>

	* configure.in:  Rename...
	* configure.ac:  ...to this.
	* docs/html/17_intro/porting.texi:  Update name.

	* docs/html/17_intro/porting.html:  Regenerate.
	* config.h.in, Makefile.in, include/Makefile.in, libmath/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in,
	testsuite/Makefile.in:  Regenerate (picks up new dependancy).

From-SVN: r70194
2003-08-05 23:32:23 +00:00
Phil Edwards ff66d28f7c Convert to new autotools.
2003-08-04  Phil Edwards  <pme@gcc.gnu.org>

	Convert to new autotools.
	* acconfig.h:  Update with correct names.
	* configure.host (ATOMICITYH):  Rename to atomicity_include_dir.
	(qnx6.[12]*):  'q' comes before 's', not after 'w'.
	* configure.in:  Update.  Split hardcoded cross-configury settings
	out to...
	* crossconfig.m4:  ...here.  New file.  Contents untouched.
	* acinclude.m4:  Reorganize and rewrite as needed.  Split large
	chunks out to...
	* linkage.m4:  ...here.  New file.  Math and stdlib linkage tests.
	Contents untouched.
	* scripts/testsuite_flags.in:  Update.

	* Makefile.am:  Remove unneeded AUTOMAKE_OPTIONS settings and other
	variables (already generated by automake).
	* include/Makefile.am:  Ditto.
	* libmath/Makefile.am:  Ditto.
	* libsupc++/Makefile.am:  Ditto.
	* po/Makefile.am:  Ditto.
	* src/Makefile.am:  Ditto.

	* aclocal.m4:  Regenerate using new versions.
	* config.h.in:  Ditto.
	* configure:  Ditto.
	* Makefile.in:  Ditto.
	* include/Makefile.in:  Ditto.
	* libmath/Makefile.in:  Ditto.
	* libsupc++/Makefile.in:  Ditto.
	* po/Makefile.in:  Ditto.
	* src/Makefile.in:  Ditto.
	* testsuite/Makefile.in:  Ditto.

From-SVN: r70167
2003-08-05 02:00:18 +00:00
Gawain Bolton b4c70e89da re PR libstdc++/11504 (-Wcast-qual vs. stl_tree)
2003-07-30  Gawain Bolton  <gp.bolton@computer.org>

	PR libstdc++/11504.
	* include/bits/stl_tree.h: Replace C-style casts with C++-style
	casts.  Changes to avoid casting away constness.  Eliminate
	_Rb_tree_base_iterator class.  Change _Rb_tree_iterator to use
	initialization lists.  Move out implementation of __black_count()
	to...
        * src/stl_tree.cc: ...here and rename _Rb_tree_black_count().
        Rename_Rb_tree_base_iterator::_M_increment() to
        _Rb_tree_increment and _Rb_tree_base_iterator::_M_decrement() to
        _Rb_tree_decrement.
        * config/linker-map.gnu: Add and change symbols here.

From-SVN: r69958
2003-07-30 15:01:58 +00:00
Benjamin Kosnik fea4065dda linker-map.gnu: Add __moneypunct_cache, __timepunct_cache.
2003-07-17  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu: Add __moneypunct_cache, __timepunct_cache.
	* config/locale/generic/messages_members.h: Tweaks.
	* config/locale/generic/monetary_members.cc
	(moneypunct::_M_initialize_moneypunct): Use cache.
	(moneypunct::~moneypunct): Delete cache.
	* config/locale/generic/time_members.cc:
	(__timepunct::_M_initialize_timepunct): Use cache.
	* config/locale/generic/time_members.h:
	(__timepunct::~__timepunct): Delete cache.
	(__timepunct::__timepunct): Set cache.
	* config/locale/gnu/messages_members.h: Tweaks.
	* config/locale/gnu/monetary_members.cc:
	(moneypunct::_M_initialize_moneypunct): Use cache.
	(moneypunct::~moneypunct): Delete cache.
	* config/locale/gnu/time_members.cc:
	(__timepunct::_M_initialize_timepunct): Use cache.
	* config/locale/gnu/time_members.h:
	(__timepunct::~__timepunct): Delete cache.
	(__timepunct::__timepunct): Set cache.
	* include/bits/locale_facets.h (__timepunct_cache): New.
	(__moneypunct_cache): New.
	* include/bits/locale_facets.tcc: Tweak.
	* src/locale.cc (__timepunct::_S_timezones): Adjust for cache.
	* src/locale-inst.cc: Instantiate caches.
	* src/globals.cc: Add "C" caches.
	* src/localename.cc: Use external "C" caches.

From-SVN: r69535
2003-07-18 02:27:16 +00:00
Benjamin Kosnik 7942afdca2 locale_facets.h (__num_base::_S_atoms_in): Add -+xX.
2003-07-16  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h (__num_base::_S_atoms_in): Add -+xX.
	(num_get::_M_convert_int): To _M_insert_int.
	(num_get::_M_convert_float): To _M_insert_float.
	* include/bits/locale_facets.tcc (num_get::_M_extract_float):
	Use caches for ctype, num_get.
	(num_get::_M_extract_int): Same.
	(num_get::get(bool)): Same.
	(__verify_grouping): Use size_t.
	* src/locale-inst.cc: Update.
	* src/locale.cc: Adjust _S_atoms_in.

From-SVN: r69491
2003-07-17 01:54:44 +00:00
Paolo Carlini f088510d96 stl_tempbuf.h: Qualify free with std::.
2003-07-14  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/stl_tempbuf.h: Qualify free with std::.
	* src/locale.cc: Include <cstdlib>, qualify getenv.

From-SVN: r69347
2003-07-14 20:14:49 +00:00
Phil Edwards 204956e6f7 Missed one spot from the previous change.
From-SVN: r69213
2003-07-11 04:32:25 +00:00
Phil Edwards 58579a27aa acinclude.m4 (GLIBCC_ENABLE_SYMVERS): Tweak comments.
2003-07-11  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCC_ENABLE_SYMVERS):  Tweak comments.  Add
	warning messages if the environment cannot support symbol versioning.
	(port_specific_symbol_file):  It's plural, add an 's' on the end.
	* configure.host:  Likewise.
	* src/Makefile.am:  Likewise.
	* config/linker-map.gnu:  Remove one semicolon, heh.
	* scripts/extract_symvers:  Don't assume useful 'export' syntax.
	Set LANG as well as LC_ALL for possibly-broken sort(1)s.
	* aclocal.m4, configure, src/Makefile.in:  Regenerated.

From-SVN: r69212
2003-07-11 04:04:49 +00:00
Benjamin Kosnik cde6384093 locale_facets.tcc: Use function object for __use_cache instead of template function.
2003-07-09  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc: Use function object for
	__use_cache instead of template function. Partially specialize for
	__numpunct<_CharT>.
	* include/bits/locale_classes.h: Update friend declaration for
	__use_cache.
	(_M_install_cache): No throw exception specs.
	* src/locale.cc: Remove __use_cache specializations.
	* include/ext/pod_char_traits.h (length): Tweak.
	* include/bits/locale_facets.h (__numpunct_cache): Remove
	char_type typedef.
	* testsuite/testsuite_hooks.h (pod_unsigned_int): Remove.
	(pod_long): Remove.
	* testsuite/22_locale/numpunct/members/char/cache_1.cc: New.
	* testsuite/22_locale/numpunct/members/char/cache_2.cc: New.
	* testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc: New.
	* testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc: New.
	* testsuite/22_locale/numpunct/members/pod/1.cc: New.
	* testsuite/22_locale/numpunct/members/pod/2.cc: New.

From-SVN: r69177
2003-07-10 06:21:13 +00:00
Jerry Quinn e7f042e4cd ios.cc (_M_grow_words): Fix spelling.
2003-07-09  Jerry Quinn  <jlquinn@optonline.net>

	* src/ios.cc (_M_grow_words):  Fix spelling.

From-SVN: r69168
2003-07-10 03:08:38 +00:00
Gawain Bolton ca1c70118c stl_tree.h: Move larger member functions in _Rb_tree_base_iterator and _Rb_tree_node to...
2003-07-09  Gawain Bolton  <gp.bolton@computer.org>

	* include/bits/stl_tree.h: Move larger member functions in
	_Rb_tree_base_iterator and _Rb_tree_node to...
	* src/stl_tree.cc: Here.
	* src/Makefile.in: Add stl_tree.cc.
	* src/Makefile.in: Regenerated.
	* config/linker-map.gnu: Add symbols here.

From-SVN: r69150
2003-07-09 20:58:32 +00:00
Benjamin Kosnik c094e9b948 numeric_members.cc: Correct type info.
2003-07-08  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/generic/numeric_members.cc: Correct type info.
	* config/locale/gnu/numeric_members.cc: Same.
	* include/bits/locale_facets.h: Same.

	* include/bits/char_traits.h: Correct spacing.

	* src/locale.cc: Wrap to 80 col.

From-SVN: r69098
2003-07-08 20:25:39 +00:00
Paolo Carlini 391cfc4689 locale_classes.h: Fully qualify standard functions with std::, thus avoiding Koenig lookup.
2003-07-06  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/locale_classes.h: Fully qualify standard
	functions with std::, thus avoiding Koenig lookup.
	* include/bits/locale_facets.tcc: Likewise.
	* src/locale.cc: Likewise.
	* src/localename.cc: Likewise.

From-SVN: r68997
2003-07-06 09:37:11 +00:00
Phil Edwards e6b7a69ab6 acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Bump minimal version requirement.
2003-07-05  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCXX_ENABLE_SYMVERS):  Bump minimal version
	requirement.  Add port_specific_symbol_file variable.
	* configure.host:  Add docs for port_specific_symbol_file.
	Clean up try_cpu block for x86.
	* config/linker-map.gnu:  No more "last symbol can't have a
	semicolon" kaka.  Add hook for port-specific symbols.
	* src/Makefile.am:  Remove trailing whitespace.
	(libstdc++-symbol.ver):  Detect the presence of port-specific
	symbols, and add them accordingly.

	* docs/html/17_intro/porting.texi:  Bring up to date.

	* src/Makefile.in, aclocal.m4, configure,
	docs/html/17_intro/porting.html:  Regenerated.

From-SVN: r68992
2003-07-06 04:07:36 +00:00
Benjamin Kosnik 3d7c150e3f Move from CPP to CXX.
2003-07-04  Benjamin Kosnik  <bkoz@redhat.com>

	Move from CPP to CXX.
	* include/bits/c++config: Move to GLIBCXX from GLIBCPP.
	* testsuite/Makefile.am: Same.
	* testsuite/Makefile.in: Regenerate.
	* po/Makefile.am: Same.
	* po/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Same.
	* libsupc++/Makefile.in: Regenerate.
	* libmath/Makefile.am: Same.
	* libmath/Makefile.in: Regenerate.
	* include/Makefile.am: Same.
	* include/Makefile.in: Regenerate.
	* src/Makefile.am: Same.
	* src/Makefile.in: Regenerate.
	* acconfig.h: Same.
	* configure.host: Same.
	* configure.in: Same.
	* configure: Regenerate.
	* acinclude.m4: Same.
	* aclocal.m4: Same.
	* src: Change all files in this directory.
	* testsuite: Same.
	* include: Same, standardize include guards.
	* config: Same.
	* libsupc++: Same.

From-SVN: r68958
2003-07-05 04:05:45 +00:00
Benjamin Kosnik a30335e9c4 Makefile.am: Update target_ to host_.
2003-07-04  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am: Update target_ to host_.
	* include/Makefile.in: Regenerate.
	* src/Makefile.am: Same.
	* src/Makefile.in: Regenerate.

	* config/os/gnu-linux/os_defines.h: Remove glibc-2.0 support.

From-SVN: r68926
2003-07-04 18:10:10 +00:00