Commit Graph

125 Commits

Author SHA1 Message Date
Benjamin Kosnik 39003c9902 std_fstream.h (basic_filebuf): Change signature.
2001-05-07  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2523
	* include/bits/std_fstream.h (basic_filebuf): Change signature.
	* include/bits/fstream.tcc (basic_filebuf): Change bool argument
	to int_type, pass in buffer size info.
	* include/bits/std_streambuf.h (_M_is_indeterminate): Check for
	unbuffered situation.
	(underflow): Remove codecvt bits for the time being.
	* include/bits/istream.tcc (istream::sentry): Avoid sputbackc call.
	* include/bits/locale_facets.tcc (_M_extract): Cache dereference
	values from iterators, clean.
	* src/locale.cc: Ditto.
	* include/bits/sbuf_iter.h: Format.
	* src/ios.cc: Explicitly pass in buffer sizes at creation time.
	* testsuite/27_io/narrow_stream_objects.cc: Add tests.
	* testsuite/27_io/filebuf.cc: Tweaks.
	* testsuite/27_io/filebuf_members.cc: Tweaks.

From-SVN: r41908
2001-05-08 03:07:56 +00:00
Benjamin Kosnik a85afd69a3 sbuf_iter.h (istreambuf_iterator): Correct.
2001-05-01  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/sbuf_iter.h (istreambuf_iterator): Correct.
	* testsuite/24_iterators/istreambuf_iterator.cc (test02): Add test.

	* include/bits/std_sstream.h (stringbuf): Leak
	copied string.
	* testsuite/24_iterators/ostreambuf_iterator.cc: Correct.

From-SVN: r41755
2001-05-02 05:50:20 +00:00
Benjamin Kosnik b85381b911 ostreambuf_iterator.cc: New file.
2001-04-30  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2627
	* testsuite/24_iterators/ostreambuf_iterator.cc: New file.
	* include/bits/sbuf_iter.h (ostreambuf_iterator): Remove bogus
	specializations.

From-SVN: r41694
2001-04-30 20:53:31 +00:00
Benjamin Kosnik 2458d950f4 stl_iterator_base_funcs.h (__advance): Fix.
2001-04-30  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2964
	* include/bits/stl_iterator_base_funcs.h (__advance): Fix.

From-SVN: r41691
2001-04-30 18:07:51 +00:00
Benjamin Kosnik 9d377fd443 stl_iterator_base_funcs.h (__advance): Fix.
2001-04-30  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2964
	* include/bits/stl_iterator_base_funcs.h (__advance): Fix.

From-SVN: r41690
2001-04-30 17:48:41 +00:00
Benjamin Kosnik 5db6f3de56 std_cmath.h (std): Explicitly inject c99 names.
2001-04-25  Benjamin Kosnik  <bkoz@redhat.com>

	* include/c_std/bits/std_cmath.h (std): Explicitly inject c99 names.
	* include/c_std/bits/std_cstdlib.h (std): Same, except for llabs.
	* include/c_std/bits/std_cwchar.h (std): Same.
	* acconfig.h (std): Remove c99 injection into std.
	* config.h.in: Regenerate.

	* testsuite/README: Fix typo.

	* include/bits/codecvt.h: Remove warnings.

From-SVN: r41568
2001-04-26 02:23:52 +00:00
Phil Edwards e906926f5f stl_bvector.h: Replace __ITERATOR_CATEGORY with __iterator_category.
2001-04-20  Phil Edwards  <pme@sources.redhat.com>

	* include/bits/stl_bvector.h:  Replace __ITERATOR_CATEGORY with
	__iterator_category.

From-SVN: r41468
2001-04-20 20:16:37 +00:00
Benjamin Kosnik 7cda84dc70 acconfig.h (_GLIBCPP_USE_C99): Add.
2001-04-19  Benjamin Kosnik  <bkoz@redhat.com>

	* acconfig.h (_GLIBCPP_USE_C99): Add.
	* config.h.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_C99): New macro. Test for ISO/IEC
	9899: 1999 support.
	* aclocal.m4: Regenerate.
	* configure.in (GLIBCPP_ENABLE_C99): Use it, on by default.
	* configure: Regenerate.
	* configure.in (GLIBCPP_ENABLE_LONG_LONG): Set default to yes.
	* configure: Regenerate.
	* include/c_std/bits/std_cwchar.h: Put wcstold, wcstoll, wcstoull
	into c99.
	* include/c_std/bits/std_cmath.h: Bring C99 functions into c99
	namespace.
	* include/c_std/bits/std_cstdlib.h: Same.
	* docs/html/configopts.html: Update.
	* testsuite/26_numerics/c99_macros.cc: Edit, use cmath instead of
	math.h
	(test_c99_classify): Add.
	* config/os/gnu-linux/bits/os_defines.h (_GNU_SOURCE): Remove.
	(_ISOC99_SOURCE): Remove.

	* include/bits/stl_algo.h: Use _GLIBCPP_HAVE_DRAND48.
	* include/bits/c++config (__STL_ASSERTIONS): Simplify.
	* acinclude.m4 (GLIBCPP_CHECK_STDLIB_SUPPORT): Add check for drand48.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r41451
2001-04-20 08:59:25 +00:00
Benjamin Kosnik 47e982b247 map_operators.cc: Add dg-excess-errors.
2001-04-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/map_operators.cc: Add dg-excess-errors.
	* testsuite/23_containers/set_operators.cc: Same.

	* include/bits/c++config: Add _GLIBCPP_CONCEPT_CHECKS. Disable by
	default.
	(__GLIBCPP__): Bump from value of last release.
	* include/bits/concept_check.h: Default to off, edit comments.
	* src/stl-inst.cc: Use _GLIBCPP_CONCEPT_CHECKS.
	* src/Makefile.am (AM_CXXFLAGS): Remove _GLIBCPP_NO_CONCEPT_CHECKS.
	* src/Makefile.in: Regenerate.

From-SVN: r41397
2001-04-18 01:06:05 +00:00
Phil Edwards 996f4bb1cd stl_algo.h (std::transform): Disable the check on _OutputIter for now.
2001-04-17  Phil Edwards  <pme@sources.redhat.com>

	* include/bits/stl_algo.h (std::transform):  Disable the check
	on _OutputIter for now.

From-SVN: r41393
2001-04-17 23:11:28 +00:00
Martin Reinecke f2d43953d7 boost_concept_check.h (_Mutable_ContainerConcept): Properly uglify member.
2001-04-14  Martin Reinecke <martin@MPA-Garching.MPG.DE>

      * include/bits/boost_concept_check.h(_Mutable_ContainerConcept):
      Properly uglify member.

From-SVN: r41354
2001-04-14 09:46:13 +00:00
Phil Edwards 948421e0c9 stl_algobase.h (equal): Use EqualOpConcept instead of EqualityComparableConcept.
2001-04-13  Phil Edwards  <pme@sources.redhat.com>

	* include/bits/stl_algobase.h (equal):  Use EqualOpConcept instead
	of EqualityComparableConcept.

From-SVN: r41334
2001-04-13 09:28:56 +00:00
Phil Edwards 62bb0c97fd boost_concept_check.h: Uglify, fork from Boost.
2001-04-13  Phil Edwards  <pme@sources.redhat.com>

	* include/bits/boost_concept_check.h:  Uglify, fork from Boost.
	* include/bits/concept_check.h:  Uglify.
	* include/bits/stl_algo.h:  Likewise.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_heap.h:  Likewise.
	* include/bits/stl_iterator_base_funcs.h:  Likewise.
	* include/bits/stl_list.h:  Likewise.
	* include/bits/stl_map.h:  Likewise.
	* include/bits/stl_multimap.h:  Likewise.
	* include/bits/stl_multiset.h:  Likewise.
	* include/bits/stl_numeric.h:  Likewise.
	* include/bits/stl_queue.h:  Likewise.
	* include/bits/stl_set.h:  Likewise.
	* include/bits/stl_stack.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.
	* include/ext/hash_map:  Likewise.
	* include/ext/hash_set:  Likewise.
	* include/ext/slist:  Likewise.

From-SVN: r41333
2001-04-13 09:03:18 +00:00
Gabriel Dos Reis 0f7190689e std_valarray.h (valarray<>::operator[]): Make inline.
* include/bits/std_valarray.h(valarray<>::operator[]): Make
      inline.

From-SVN: r41190
2001-04-08 16:20:49 +00:00
Benjamin Kosnik 14bc1c0e15 stl_algobase.h (std::equal): avoid use of possibly-undefined operator != (one line patch).
2001-04-06  Joe Buck  <jbuck@welsh-buck.org>

        * stl_algobase.h (std::equal): avoid use of possibly-undefined
        operator != (one line patch).

From-SVN: r41170
2001-04-06 22:21:29 +00:00
Benjamin Kosnik 8d66b99ac2 Prepare for libstdc++-2.92.
2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>

	Prepare for libstdc++-2.92.
	* docs/html/17_intro/RELEASE-NOTES (New): Update.
	* docs/html/configopts.html: Fix formatting.
	* README (file): Updates.
	* include/bits/c++config (__GLIBCPP__): Update.

From-SVN: r41136
2001-04-06 01:47:11 +00:00
Benjamin Kosnik 127644626f fstream.tcc: Add bool parameter to filebuf ctor.
2001-04-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/fstream.tcc: Add bool parameter to filebuf ctor.
	* include/bits/ios_base.h(ios_base::Init): Remove _M_cout, _M_cin,
	_M_cerr, _M_wcout, _M_wcin, _M_wcerr.
	(ios_base::Init::_S_ios_create): New.
	(ios_base::Init::_S_ios_destroy): New.
	* include/bits/std_fstream.h: Change ctor args.
	* src/ios.cc (ios_base::Init::Init): Use _S_ios_create.
	(ios_base::Init::~Init): Use _S_ios_destroy.
	(ios_base::sync_with_stdio): Use new members.
	* testsuite/27_io/filebuf_members.cc: Fix calling conventions for
	filebuf ctor.

From-SVN: r41072
2001-04-04 01:02:26 +00:00
Peter Schmid aa53cb52eb stl_iterator_base_types.h: Fix typo
2001-04-03  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* include/bits/stl_iterator_base_types.h: Fix typo

From-SVN: r41063
2001-04-03 20:40:26 +00:00
Phil Edwards 30a20a1ee0 New concept checking implementation.
2001-04-02  Phil Edwards  <pme@sources.redhat.com>

	New concept checking implementation.
	* docs/html/19_diagnostics/howto.html:  Document.
	* docs/html/17_intro/concept_check.diff:  New file, for reference.
	* include/bits/boost_concept_check.h:  New file from Boost.
	* include/bits/c++config:  Update comments.

	* include/bits/concept_check.h:  New file.
	* include/bits/concept_checks.h:  Removed.
	* include/bits/container_concepts.h:  Removed.
	* include/bits/sequence_concepts.h:  Removed.
	* include/bits/stl_iterator_base.h:  Removed; split into...
	* include/bits/stl_iterator_base_funcs.h:  ...this new file...
	* include/bits/stl_iterator_base_types.h:  ...and this new file.

	* include/bits/sbuf_iter.h:  Update to use new implementation.
	* include/bits/std_iterator.h:  Likewise.
	* include/bits/std_memory.h:  Likewise.
	* include/bits/stl_algo.h:  Likewise.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_construct.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_heap.h:  Likewise.
	* include/bits/stl_list.h:  Likewise.
	* include/bits/stl_map.h:  Likewise.
	* include/bits/stl_multimap.h:  Likewise.
	* include/bits/stl_multiset.h:  Likewise.
	* include/bits/stl_numeric.h:  Likewise.
	* include/bits/stl_queue.h:  Likewise.
	* include/bits/stl_set.h:  Likewise.
	* include/bits/stl_stack.h:  Likewise.
	* include/bits/stl_uninitialized.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.
	* include/ext/hash_map:  Likewise.
	* include/ext/hash_set:  Likewise.
	* include/ext/slist:  Likewise.
	* include/ext/stl_hashtable.h:  Likewise.

	* src/Makefile.am (base_headers):  Update list of headers.
	* Makefile.in:  Regenerated.
	* src/Makefile.in:  Regenerated.
	* libio/Makefile.in:  Regenerated.
	* libmath/Makefile.in:  Regenerated.
	* libsupc++/Makefile.in:  Regenerated.
	* testsuite/Makefile.in:  Regenerated.

	* docs/html/install.html:  Update contact information.
	* docs/html/17_intro/howto.html:  Ditto.
	* docs/html/18_support/howto.html:  Ditto.
	* docs/html/20_util/howto.html:  Ditto.
	* docs/html/21_strings/howto.html:  Ditto.
	* docs/html/22_locale/howto.html:  Ditto.
	* docs/html/23_containers/howto.html:  Ditto.
	* docs/html/24_iterators/howto.html:  Ditto.
	* docs/html/25_algorithms/howto.html:  Ditto.
	* docs/html/26_numerics/howto.html:  Ditto.
	* docs/html/27_io/howto.html:  Ditto.
	* docs/html/faq/index.html:  Ditto, plus info on new checking code.
	* docs/html/ext/howto.html:  Ditto, plus info on new checking code.
	* docs/html/faq/index.txt:  Regenerated.

From-SVN: r41031
2001-04-03 00:26:58 +00:00
Benjamin Kosnik 9b7e0d0005 [multiple changes]
2001-03-31  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.target: Remove duplicate aix entry.

2001-03-30  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/stl_bvector.h: Move to...
	* include/bits/stl_vector.h: ...here.
	* include/ext/bvector: Move to...
	* include/backward/bvector.h: ...here.
	* include/bits/std_vector.h: Change stl_bvector include.
	* include/bits/std_queue.h: Remove bvector include.
	* include/ext/tree: Insert using rb_tree, move to...
	* include/backward/tree.h: ...here.
	* include/backward/hash_map.h: Include ext/hash_map.
	* include/backward/hash_set.h: Include ext/hash_set.
	* include/backward/queue.h: New file.
	* include/backward/stack.h: Edit.
	* include/backward/algo.h: Same.
	* include/backward/algobase.h: Same.
	* include/backward/alloc.h: Same.
	* include/backward/function.h: Same.
	* include/backward/iomanip.h: Same.
	* include/backward/istream.h: Same.
	* include/backward/iterator.h: Same.
	* include/backward/list.h: Same.
	* include/backward/map.h: Same.
	* include/backward/multimap.h: Same.
	* include/backward/multiset.h: Same.
	* include/backward/ostream.h: Same.
	* include/backward/pair.h: Same
	* include/backward/rope.h: Same.
	* include/backward/set.h: Same.
	* include/backward/stream.h: Same.
	* include/backward/strstream.h: Same.
	* include/backward/tempbuf.h: Same.
	* src/Makefile.am (ext_headers): Edit.
	* src/Makefile.in: Regenerate.
	* testsuite/ext/headers.cc (main): Fix.
	* mkcheck.in: Fix.

From-SVN: r40979
2001-03-31 20:15:43 +00:00
Benjamin Kosnik ec0104b3bc c++config (_STL_USE_CONCEPT_CHECKS): Disable by default.
2001-03-27  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/c++config (_STL_USE_CONCEPT_CHECKS): Disable by default.

From-SVN: r40877
2001-03-27 19:40:46 +00:00
Benjamin Kosnik 5fa9abc3e9 basic_file.h (get_fileno): Remove.
2001-03-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_file.h (get_fileno): Remove.
	(_M_fileno): Remove.
	(_M_cfile_created): Add.
	(basic_file::basic_file(__c_file_type*, openmode): Add.
	(basic_file::basic_file(int, const char*, openmode): Remove.
	* include/bits/fstream.tcc (basic_fstream::basic_filebuf(int __fd,
	const char*, ios_base::openmode): Don't allocate
	internal buffers. Turn off internal buffers.
	(basic_filebuf::overflow): Remove test for null buffer.
	(basic_filebuf::_M_really_overflow): Same. Allow unbuffered use.
	* include/bits/streambuf.cc: Tweak.
	* include/bits/std_ostream.h: Tweak.
	* config/basic_file_libio.h: Same.
	* config/basic_file_stdio.h: Same.
	* src/ios.cc (ios_base::Init::Init()): Unbuffer stdout by default.
	* testsuite/27_io/filebuf_members.cc: Tweaks.
	* testsuite/27_io/ios_base_members_static.cc: Tweaks.

From-SVN: r40863
2001-03-27 03:48:17 +00:00
Phil Edwards 2c085782da std_bitset.h: Include ostream and istream headers instead of iostream.
2001-03-24  Phil Edwards  <pme@sources.redhat.com>

	* include/bits/std_bitset.h:  Include ostream and istream headers
	instead of iostream.

From-SVN: r40820
2001-03-24 23:46:38 +00:00
Greg Bumgardner 0d6eae43fc ostream.tcc: Use __builtin_alloca.
2001-03-22  Greg Bumgardner <bumgard@roguewave.com>

	* include/bits/ostream.tcc: Use __builtin_alloca.

From-SVN: r40793
2001-03-23 20:29:14 +00:00
Benjamin Kosnik 6ca9928acc misc-inst.cc (__sink_unused_warning): Move to...
2001-03-22  Benjamin Kosnik  <bkoz@redhat.com>

	* src/misc-inst.cc (__sink_unused_warning): Move to...
	* src/locale-inst.cc (__sink_unused_warning): Move to...
	* src/stl-inst.cc: Here.
	* include/bits/c++config (_STL_NO_CONCEPT_CHECKS): Add define,
	commented it out.

From-SVN: r40792
2001-03-23 20:02:03 +00:00
Theodore Papadopoulo edb7d731b6 basic_file.h: Fix typos in comments.
2001-03-21  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>

    	* intclude/bits/basic_file.h: Fix typos in comments.

From-SVN: r40705
2001-03-21 19:26:49 +00:00
Gabriel Dos Reis 15f13f01ed * include/bits/basic_string.tcc (operator+): Fix thinko.
From-SVN: r40493
2001-03-15 08:46:23 +00:00
Benjamin Kosnik 69302d8b5e std_streambuf.h: Remove cached locale facets.
2001-03-14  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2020
	* include/bits/std_streambuf.h: Remove cached locale facets.
	(basic_streambuf::_M_buf_fctype): Remove.
	(basic_streambuf::~basic_streambuf): Remove here.
	(basic_streambuf::basic_streambuf): Same.
	(basic_streambuf::imbue): Same.
	* include/bits/fstream.tcc (filebuf::imbue): Remove _M_buf_fctype.
	* include/bits/std_fstream.h (basic_filebuf::_M_fcvt): Remove.
	(basic_filebuf::~basic_filebuf()): Remove here.
	* include/bits/fstream.tcc (basic_filebuf::basic_filebuf): Same.
	(basic_filebuf::imbue): Same.
	* include/bits/localefwd.h (_Count_ones): Remove.
	(locale::_S_num_categories): Just use 6, since this doesn't
	actually change, ever.
	* include/bits/locale_facets.tcc (has_facet): Simplify.
	(use_facet): Same.
	* testsuite/27_io/filebuf.cc (test06): Add tests.

From-SVN: r40472
2001-03-14 20:46:34 +00:00
Benjamin Kosnik db1d582c81 Fixups for -fno-for-scope
2001-03-12  Benjamin Kosnik  <bkoz@redhat.com>

	Fixups for -fno-for-scope
	* include/bits/locale_facets.tcc (__match_parallel): Fixup.
	* src/valarray-inst.cc (__gslice_to_index): Same.

From-SVN: r40429
2001-03-12 21:42:57 +00:00
Benjamin Kosnik bc4f48d775 istream.tcc (basic_istream<_CharT, [...]): Fix typo.
2001-03-12  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/istream.tcc (basic_istream<_CharT, _Traits>&
	operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)):
	Fix typo.

From-SVN: r40417
2001-03-12 18:30:29 +00:00
Benjamin Kosnik 0e061da691 [multiple changes]
2001-03-09  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>

	* include/bits/istream.tcc ( basic_istream<_CharT, _Traits>&
	operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)):
	Use streamsize, not int_type.

2001-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/streambuf.cc (test06): New test, disabled at the
	moment.

From-SVN: r40358
2001-03-10 01:36:23 +00:00
Benjamin Kosnik d32c94be18 std_iosfwd.h: Remove string forward decls here.
2001-03-07  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/std_iosfwd.h: Remove string forward decls here.
	* include/bits/stringfwd.h: Add forward decls for char_traits
	specializations.
	* config/c_io_libio.h (wstreamoff): Delete.
	* config/c_io_stdio.h (wstreamoff): Same.
	* include/bits/char_traits.h: Use streamoff not wstreamoff for
	char_traits<wchar_t>::off_type.
	Remove duplicate typedefs.
	* include/bits/fpos.h: Define streampos/wstreampos here.
	* testsuite/27_io/istream_seeks.cc (test04): Explicitly cast int
	values to off_type.
	(test05): Same.
	Changeup output files.
	* testsuite/27_io/istream_unformatted.cc: Change output files.
	* testsuite/27_io/istream_seeks-1.txt: Add.
	* testsuite/27_io/istream_seeks-2.tst: Add.
	* testsuite/27_io/istream_seeks-1.tst: Add.
	* testsuite/27_io/istream_unformatted-2.tst: Delete.
	* testsuite/27_io/istream_unformatted-3.tst: Delete.
	* testsuite/27_io/istream_unformatted-3.txt: Delete.

From-SVN: r40303
2001-03-07 22:22:41 +00:00
Benjamin Kosnik 2077a6c51e istream.tcc (basic_istream<_CharT, [...]): Don't use sentry.
2001-03-06  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2181
	* include/bits/istream.tcc (basic_istream<_CharT, _Traits>::
	operator>>(__istream_type& (*__pf)(__istream_type&)): Don't use
	sentry.
	(basic_istream<_CharT, _Traits>:: operator>>(__ios_type&
	(*__pf)(__ios_type&)): Same.
	(basic_istream<_CharT, _Traits>:: operator>>(ios_base&
	(*__pf)(ios_base&))): Same.
	* testsuite/27_io/istream_extractor_other.cc: Add tests.
	* testsuite/27_io/istream_manip.cc (test01): Fix.

From-SVN: r40281
2001-03-07 02:08:59 +00:00
Phil Edwards d53d7f6e61 algo.h: Use std not __STD.
2001-03-04  Phil Edwards  <pme@sources.redhat.com>

	http://gcc.gnu.org/ml/libstdc++/2001-03/msg00015.html
	* include/backward/algo.h:  Use std not __STD.  Remove unneeded
	macros and "never happens" code.  Adjust to C++STYLE guidelines.
	* include/backward/algobase.h:  Likewise.
	* include/backward/alloc.h:  Likewise.
	* include/backward/bvector.h:  Likewise.
	* include/backward/deque.h:  Likewise.
	* include/backward/function.h:  Likewise.
	* include/backward/hash_map.h:  Likewise.
	* include/backward/hash_set.h:  Likewise.
	* include/backward/hashtable.h:  Likewise.
	* include/backward/heap.h:  Likewise.
	* include/backward/iterator.h:  Likewise.
	* include/backward/list.h:  Likewise.
	* include/backward/map.h:  Likewise.
	* include/backward/multimap.h:  Likewise.
	* include/backward/multiset.h:  Likewise.
	* include/backward/pair.h:  Likewise.
	* include/backward/rope.h:  Likewise.
	* include/backward/set.h:  Likewise.
	* include/backward/slist.h:  Likewise.
	* include/backward/stack.h:  Likewise.
	* include/backward/strstream:  Likewise.
	* include/backward/tempbuf.h:  Likewise.
	* include/backward/tree.h:  Likewise.
	* include/backward/vector.h:  Likewise.
	* include/bits/basic_ios.h:  Likewise.
	* include/bits/basic_ios.tcc:  Likewise.
	* include/bits/basic_string.h:  Likewise.
	* include/bits/c++config:  Likewise.
	* include/bits/concept_checks.h:  Likewise.
	* include/bits/fpos.h:  Likewise.
	* include/bits/fstream.tcc:  Likewise.
	* include/bits/functexcept.h:  Likewise.
	* include/bits/ios_base.h:  Likewise.
	* include/bits/istream.tcc:  Likewise.
	* include/bits/mask_array.h:  Likewise.
	* include/bits/ostream.tcc:  Likewise.
	* include/bits/pthread_allocimpl.h:  Likewise.
	* include/bits/sbuf_iter.h:  Likewise.
	* include/bits/slice.h:  Likewise.
	* include/bits/slice_array.h:  Likewise.
	* include/bits/sstream.tcc:  Likewise.
	* include/bits/std_bitset.h:  Likewise.
	* include/bits/std_fstream.h:  Likewise.
	* include/bits/std_iomanip.h:  Likewise.
	* include/bits/std_ios.h:  Likewise.
	* include/bits/std_istream.h:  Likewise.
	* include/bits/std_iterator.h:  Likewise.
	* include/bits/std_memory.h:  Likewise.
	* include/bits/std_ostream.h:  Likewise.
	* include/bits/std_sstream.h:  Likewise.
	* include/bits/std_streambuf.h:  Likewise.
	* include/bits/std_string.h:  Likewise.
	* include/bits/std_valarray.h:  Likewise.
	* include/bits/stl_algo.h:  Likewise.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_alloc.h:  Likewise.
	* include/bits/stl_construct.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_function.h:  Likewise.
	* include/bits/stl_heap.h:  Likewise.
	* include/bits/stl_iterator.h:  Likewise.
	* include/bits/stl_iterator_base.h:  Likewise.
	* include/bits/stl_list.h:  Likewise.
	* include/bits/stl_map.h:  Likewise.
	* include/bits/stl_multimap.h:  Likewise.
	* include/bits/stl_multiset.h:  Likewise.
	* include/bits/stl_numeric.h:  Likewise.
	* include/bits/stl_pair.h:  Likewise.
	* include/bits/stl_pthread_alloc.h:  Likewise.
	* include/bits/stl_queue.h:  Likewise.
	* include/bits/stl_raw_storage_iter.h:  Likewise.
	* include/bits/stl_relops.h:  Likewise.
	* include/bits/stl_set.h:  Likewise.
	* include/bits/stl_stack.h:  Likewise.
	* include/bits/stl_tempbuf.h:  Likewise.
	* include/bits/stl_threads.h:  Likewise.
	* include/bits/stl_tree.h:  Likewise.
	* include/bits/stl_uninitialized.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.
	* include/bits/streambuf.tcc:  Likewise.
	* include/bits/type_traits.h:  Likewise.
	* include/bits/valarray_meta.h:  Likewise.
	* include/ext/bvector:  Likewise.
	* include/ext/hash_map:  Likewise.
	* include/ext/hash_set:  Likewise.
	* include/ext/ropeimpl.h:  Likewise.
	* include/ext/slist:  Likewise.
	* include/ext/stl_bvector.h:  Likewise.
	* include/ext/stl_hash_fun.h:  Likewise.
	* include/ext/stl_hashtable.h:  Likewise.
	* include/ext/stl_rope.h:  Likewise.
	* src/complex_io.cc:  Likewise.
	* src/ios.cc:  Likewise.
	* src/locale-inst.cc:  Likewise.
	* src/locale.cc:  Likewise.
	* src/localename.cc:  Likewise.
	* src/misc-inst.cc:  Likewise.
	* src/stdexcept.cc:  Likewise.
	* src/stl-inst.cc:  Likewise.
	* src/strstream.cc:  Likewise.
	* src/valarray-inst.cc:  Likewise.

From-SVN: r40239
2001-03-04 21:34:02 +00:00
Benjamin Kosnik 4cacbdf21f [multiple changes]
2001-03-02  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

        * include/bits/istream.tcc: change type of __extracted to __size_type

2001-03-02  Benjamin Kosnik  <bkoz@redhat.com>

	* src/wstring-inst.cc: New file.
	* src/Makefile.am (EXTRA_LTLIBRARIES): Remove.
	(libinst_wstring_la_SOURCES): Remove.
	(libstdc___la_LIBADD): Remove libinst_wstring_la.
	(sources): Add wstring-inst.cc
	* acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Remove
	libinst_wstring_la.

From-SVN: r40192
2001-03-02 21:38:26 +00:00
Benjamin Kosnik e08838ac57 c++config (__GLIBCPP__): Bump number in anticipation of 2.92.
2001-02-28  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2103
	* include/bits/c++config (__GLIBCPP__): Bump number in
	anticipation of 2.92.

	* include/bits/codecvt.h: Fix typo.
	* include/bits/basic_file.h (__basic_file): Don't use _M_wfile for
	stdio model.
	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Enable wchar_t
	instantiations for stdio model.

From-SVN: r40140
2001-03-01 00:37:18 +00:00
Benjamin Kosnik c0a26060f6 basic_file.h: Include basic_file_model.h.
2001-02-27  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/1886
	* include/bits/basic_file.h: Include basic_file_model.h.
	* config/c_io_libio.cc: Move to...
	* config/basic_file_libio.cc: Here.
	* config/basic_file_libio.h: New file.
	* config/c_io_stdio.cc: Move to...
	* config/basic_file_stdio.cc: Here.
	* config/basic_file_stdio.h: New file.
	* config/c_io_libio.h: Tweak.
	* config/c_io_stdio.h: Tweak.
	* src/Makefile.am (build_headers): Add basic_file_model.h.
	(sources): Add basic_file.cc, remove c++io.cc.
	* src/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Add support for
	basic_file_model.h and basic_file.cc.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/27_io/filebuf.cc (test05): Add regression.

From-SVN: r40108
2001-02-28 03:20:36 +00:00
Benjamin Kosnik 9dd3d53c9a std_stdexcept.h (runtime_error): Make string member non-const.
2001-02-27  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/std_stdexcept.h (runtime_error): Make string
	member non-const.
	(logic_error): Same.
	* testsuite/19_diagnostics/stdexceptions.cc (test04): Add test.
	(test03): Fix.

From-SVN: r40098
2001-02-27 23:00:35 +00:00
Benjamin Kosnik 0349df29f0 std_stdexcept.h (logic_error::logic_error): Use string object, not reference.
2001-02-26  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/1972
	libstdc++/2089
	* include/bits/std_stdexcept.h (logic_error::logic_error): Use
	string object, not reference.
	(runtime_error::runtime_error): Same.
	* testsuite/19_diagnostics/stdexceptions.cc: New file.

From-SVN: r40079
2001-02-27 04:13:17 +00:00
Benjamin Kosnik 8ac2677fbb codecvt.h: Use __builtin_alloca.
2001-02-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/codecvt.h: Use __builtin_alloca.
	* include/bits/ostream.tcc: Same.
	* include/bits/fstream.tcc: Same.

From-SVN: r40007
2001-02-23 19:22:04 +00:00
Benjamin Kosnik 6259cad9af tests_flags.in (CXXFLAGS): Add -rpath to gcc build dir.
2001-02-22  Benjamin Kosnik  <bkoz@redhat.com>

	* tests_flags.in (CXXFLAGS): Add -rpath to gcc build dir.

	* include/bits/codecvt.h: Use alloca instead of __extension__ for
	the time being.
	* include/bits/ostream.tcc: Same.
	* include/bits/std_ostream.h: Same.
	* include/bits/fstream.tcc: Same.
	* include/bits/locale_facets.tcc: Add typename.
	* include/bits/c++config (_GLIBCPP_FULLY_COMPLIANT_HEADERS): Enable.

From-SVN: r39991
2001-02-23 07:12:03 +00:00
Phil Edwards 9cfeea6e4e stl_config.h: Remove file.
2001-02-20  Phil Edwards  <pme@sources.redhat.com>

	* include/bits/stl_config.h:  Remove file.
	* src/Makefile.am (base_headers):  Remove from list.
	* configure:  Regenerate.
	* Makefile.in:  Ditto.
	* libio/Makefile.in:  Ditto.
	* libmath/Makefile.in:  Ditto.
	* libsupc++/Makefile.in:  Ditto.
	* src/Makefile.in:  Ditto.

	* include/bits/c++config:  Move relevant macros to here.
	* include/backward/alloc.h:  Include c++config.h instead.
	* include/backward/function.h:  Ditto.
	* include/backward/heap.h:  Ditto.
	* include/backward/pair.h:  Ditto.
	* include/bits/pthread_allocimpl.h:  Ditto.
	* include/bits/std_functional.h:  Ditto.
	* include/bits/std_iterator.h:  Ditto.
	* include/bits/std_numeric.h:  Ditto.
	* include/bits/std_utility.h:  Ditto.
	* include/bits/stl_algobase.h:  Ditto.
	* include/bits/type_traits.h:  Ditto.
	* src/stl-inst.cc:  Ditto.

From-SVN: r39931
2001-02-20 20:20:48 +00:00
Gabriel Dos Reis b0a85b861e Add #pragma system_header to header files.
From-SVN: r39896
2001-02-19 18:52:25 +00:00
Greg Bumgardner f5d3e93f97 std_ostream.h: Replaced usage of _Traits::_S_eos() with _CharT() as per section 17.2.2.1.3.
2001-02-16  Greg Bumgardner <bumgard@roguewave.com>

	libstdc++/1734
        * include/bits/std_ostream.h: Replaced usage of
        _Traits::_S_eos() with _CharT() as per section 17.2.2.1.3.
        * include/bits/char_traits.h: Removed non-standard
        methods that cannot be used elsewhere.

	libstdc++/1885
        * include/bits/basic_ios.h: Uncommented #include of
        bits/basic_ios.tcc

	libstdc++/1897
        * include/bits/codecvt.h: See next...
        * include/bits/fstream.tcc: See next...
        * include/bits/ostream.tcc: Add __extension__
        to variable-length arrays.

	libstdc++/1967
        * include/bits/localefwd.h: Changed int counter type to size_t.

	libstdc++/1968
        * include/bits/std_fstream.h: Added typedef for __ctype_type.

From-SVN: r39802
2001-02-17 17:51:45 +00:00
Benjamin Kosnik 63100912b7 c++config: Revert.
2001-02-15  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/c++config: Revert.

From-SVN: r39747
2001-02-16 05:39:47 +00:00
Mark Mitchell bcd0cabb19 istream.tcc: Use ios_base::iostate in place of iostate throughout.
* include/bits/istream.tcc: Use ios_base::iostate in place of
	iostate throughout.  Insert `typename' keyword where necessary.
	* include/bits/ostream.tcc: Insert `typename' keyword where
	necessary.

From-SVN: r39743
2001-02-16 03:35:50 +00:00
Jeffrey Oldham e4df3e482d c++config (_GLIBCPP_FULLY_COMPLIANT_HEADERS): Define so library is compliant.
2001-02-14  Jeffrey Oldham  <oldham@codesourcery.com>

        * include/bits/c++config (_GLIBCPP_FULLY_COMPLIANT_HEADERS):
        Define so library is compliant.

From-SVN: r39741
2001-02-16 02:38:35 +00:00
Benjamin Kosnik e2c094827c Add support for -fno-exceptions.
2001-02-15  Benjamin Kosnik  <bkoz@redhat.com>

	Add support for -fno-exceptions.
	* include/bits/exception_support.h: Remove.
	* include/bits/basic_string.h: Remove exception_support.
	(string::_M_check): Replace __OUTOFRANGE with __throw_out_of_range.
	(string::at): Same.
	(string::substr): Same.
	* include/bits/basic_string.tcc (string::reserve): Replace
	__LENGTHERROR with __throw_length_error.
	(string::_S_create): Same.
	(string::resize): Same.
	(string::_M_replace): Same.
	(string::replace): Same.
	(string::copy): Replace __OUTOFRANGE with __throw_out_of_range.
	(string::compare): Same.
	* include/bits/stl_vector.h: Remove exception_support.
	* src/Makefile.am (base_headers): Remove here.
	* src/Makefile.in: Regenerate.

	* include/bits/stl_range_errors.h: Remove.
	* include/bits/stl_deque.h: Use __throw_range_error.
	* include/bits/std_deque.h: Include functexcept.h.
	* include/bits/std_vector.h: Same.
	* src/Makefile.am (base_headers): Remove here.
	* src/Makefile.in: Regenerate.
	* include/ext/stl_bvector.h (class __BVECTOR): Use __throw_range_error.
	* include/ext/bvector: Remove stl_range_errors.h

	* include/bits/c++config (_GLIBCPP_USE_EXCEPTIONS): Remove.

	* include/bits/functexcept.h: New file.
	* src/functexcept.cc: New file. Definitions for function-based
	exception routines.
	* src/Makefile.am (sources): Add functexcept.cc.
	* src/Makefile.in: Regenerate.

	* include/bits/stl_config.h (__STL_USE_EXCEPTIONS): Wrap with
	__EXCEPTIONS.

	* include/bits/localefwd.h: Include functexcept.h.
	* include/bits/std_iosfwd.h: Same.

	* include/bits/basic_ios.h: Use __throw_ios_failure instead of
	throw basic_ios::failure.
	* include/bits/fstream.tcc (filebuf::_M_allocate_buffers):
	Use __throw_exception_again.
	(filebuf::_M_filebuf_init): Same.
	* include/bits/streambuf.tcc (__copy_streambufs): Same.
	* include/bits/ostream.tcc (ostream::operator<<): Same.
	* include/bits/istream.tcc (istream::operator>>): Same.
	* include/bits/basic_string.tcc (string::_M_mutate): Same.
	(string::_S_construct): Same.
	(string::_M_clone): Same.
	* include/bits/locale_facets.tcc (use_facet(const locale&)): Use
	__throw_bad_cast.
	(num_put<_CharT, _OutIter>::do_put): Use __throw_exception_again.
	* src/localename.cc (locale::_Imp::_Imp(const _Impl&, size_t): Use
	__throw_exception_again.
	(locale::_Imp::_Imp(string, size_t): Same.
	(locale::_Imp::_M_replace_facet): Use __throw_runtime_error.
	* src/locale.cc (locale::_M_coalesce): Use __throw_exception_again.
	(locale::locale(const char*)): Use __throw_runtime_error.
	(locale::classic): Use __throw_exception_again.
	(locale::_S_normalize_category): Use __throw_runtime_error.

	* src/stdexcept.cc: Remove cruft.

	* libsupc++/exception_defines.h: New file.
	* libsupc++/new_opnt.cc: Include exception_defines.h.
	* libsupc++/vec.cc: Same.
	(__cxa_vec_new2): Use __throw_exception_again.
	(__cxa_vec_new3): Same.
	(__cxa_vec_ctor): Same.
	(__cxa_vec_delete3): Same.
	(__cxa_vec_cctor): Same.
	(__cxa_vec_delete2): Same.
	(__cxa_vec_dtor): Same.
	* libsupc++/exception_support.cc: Include exception_defines.h. Only
	compile exception-handling bits if __EXCEPTIONS is defined.
	Remove old ABI support.
	* libsupc++/new_op.cc (new): Include exception_defines.h. Use
	std::__throw_bad_alloc() instead of throw bad_alloc.
	* libsupc++/Makefile.am: Add exception_defines.h.
	* libsupc++/Makefile.in: Reformat.
	* libsupc++/*: Format.

From-SVN: r39730
2001-02-16 00:44:44 +00:00
Gabriel Dos Reis 1c7c97cc63 std_valarray.h: #undef _DEFINE_LOGICAL_OPERATOR...
* include/bits/std_valarray.h: #undef _DEFINE_LOGICAL_OPERATOR,
        not _DEFINE_VALARRAY_OPERATOR which is not existent.

From-SVN: r39592
2001-02-11 22:42:36 +00:00
Gabriel Dos Reis 169ef01cf0 valarray_meta.h (_RefFunClos<>_RefRunClos): Fix thinko in member initialisation.
* include/bits/valarray_meta.h (_RefFunClos<>_RefRunClos): Fix
        thinko in member initialisation.

From-SVN: r39591
2001-02-11 22:25:50 +00:00