Commit Graph

134 Commits

Author SHA1 Message Date
Benjamin Kosnik 8850521be3 libstdc++.exp: Use libgloss.exp.
2001-05-09  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/lib/libstdc++.exp: Use libgloss.exp. Call
	libgloss_link_flags to find crt0.o for targets that use libgloss
	instead of newlib.
	Change LDFLAGS to LIBS.
	Consistently name procedures libstdc++-XXX.
	* testsuite/libstdc++.tests/tests.exp: Use new procedure names.

From-SVN: r41938
2001-05-10 08:55:50 +00:00
Benjamin Kosnik eea790f7b3 std_cstring.h (memchr): Correct definitions.
2001-05-08  Benjamin Kosnik  <bkoz@fillmore.constant.com>

	* include/c_std/bits/std_cstring.h (memchr): Correct definitions.
	(strchr): Same.
	(strpbrk): Same.
	(strrchr): Same.
	(strstr): Same.
	* include/c_std/bits/std_cwchar.h (wcschr): Same.
	(wcsbrk): Same.
	(wcsrchr): Same.
	(wcsstr): Same.
	(wmemchr): Same.
	* testsuite/21_strings/c_strings.cc: Add tests.

From-SVN: r41919
2001-05-08 23:53:55 +00:00
Benjamin Kosnik ee2f20b9c5 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: r41909
2001-05-08 03:39:50 +00:00
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
Alexandre Oliva f8e4b51d36 configure.in (LIBSUPCXX_PICFLAGS): Set it to -prefer-pic or -prefer-non-pic depending on whether libtool has...
* configure.in (LIBSUPCXX_PICFLAGS): Set it to -prefer-pic or
-prefer-non-pic depending on whether libtool has shared libraries
enabled or disabled.
* libsupc++/Makefile.am (LIBSUPCXX_CXXFLAGS): Set to
$(LIBSUPCXX_PICFLAGS).
* configure, */Makefile.in: Rebuilt.

From-SVN: r41806
2001-05-03 20:35:18 +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
Gabriel Dos Reis 358c9f4b42 * testsuite/libstdc++.tests/tests.exp: Add comment.
From-SVN: r41730
2001-05-01 17:28:02 +00:00
Gabriel Dos Reis 55a0ab4ac6 * testsuite/libstdc++.tests/tests.exp: Set ulimits.
From-SVN: r41727
2001-05-01 15:01:50 +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 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
Benjamin Kosnik 4b3db7c50c acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Make sure required C99 support is enabled correctly before long long is activated.
2001-04-20  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Make sure required C99
	support is enabled correctly before long long is activated.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	* include/backward/backward_warning.h: Format correctly.

	* testsuite/26_numerics/c99_classification_macros_c.cc: Add.
	* testsuite/26_numerics/c99_classification_macros_c++.cc: Add.
	* testsuite/26_numerics/c99_macros.cc: Remove.

From-SVN: r41469
2001-04-20 22:19:57 +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
Loren J. Rittle 599d54fd8e * testsuite/27_io/istream_seeks.cc: Inform DejaGnu of required files.
From-SVN: r41402
2001-04-18 05:13:33 +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
Gabriel Dos Reis d72274e411 set_operators.cc: Just try to compile.
* testsuite/23_containers/set_operators.cc: Just try to compile.
	Mark as XFAIL.
	* testsuite/23_containers/map_operators.cc: Same.

From-SVN: r41318
2001-04-13 02:14:11 +00:00
Jason Merrill d93aa33514 libstdc++.exp (libstdc++-dg-test): Prepend "./" to output_file.
* testsuite/lib/libstdc++.exp (libstdc++-dg-test): Prepend "./" to
        output_file.
        (dg-test): Revert rth's change.

From-SVN: r41301
2001-04-12 09:35:24 -04:00
Gabriel Dos Reis e98d0ceafc * testsuite/README: Add DejaGnu specific documentation.
From-SVN: r41274
2001-04-11 23:42:57 +00:00
Benjamin Kosnik 46840bcd52 acinclude.m4: AC_CHECK_TOOL for expect.
2001-04-11  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4: AC_CHECK_TOOL for expect.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.am (RUNTEST): Use substituted.
	(EXPECT): Same.

	* configure.in: Remove xcompiling substitution.
	* tests_flags.in (CROSS_LIB_PATH): Remove.
	(xcompiling): Remove.
	(CXX): Use substituted CXX.

From-SVN: r41262
2001-04-11 18:52:31 +00:00
Richard Henderson a14fd7f564 libstdc++.exp (dg-test): Explicitly run the program in the current directory.
* testsuite/lib/libstdc++.exp (dg-test): Explicitly run
        the program in the current directory.

From-SVN: r41234
2001-04-10 17:03:51 -07:00
Gabriel Dos Reis a1fae79477 equal.cc: New test.
2001-04-06  Gabriel Dos Reis  <gdr@codesourcery.com>

	* testsuite/25_algorithms/equal.cc: New test.

From-SVN: r41169
2001-04-06 22:20:03 +00:00
Gabriel Dos Reis e521873c0e std_cmath.h: Get rid of C99 math macros.
* include/c_std/bits/std_cmath.h: Get rid of C99 math macros.
        * testsuite/26_numerics/c99_macros.cc: Add test.

From-SVN: r41159
2001-04-06 19:14:27 +00:00
Benjamin Kosnik baac9fce7d Warn when using backward headers.
2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>

	Warn when using backward headers.
	* include/backward/algo.h: Include warning file.
	* include/backward/vector.h: Same.
	* include/backward/tree.h: Same.
	* include/backward/tempbuf.h: Same.
	* include/backward/strstream: Same.
	* include/backward/streambuf.h: Same.
	* include/backward/stream.h: Same.
	* include/backward/stack.h: Same.
	* include/backward/slist.h: Same.
	* include/backward/set.h: Same.
	* include/backward/rope.h:
	* include/backward/queue.h: Same.
	* include/backward/pair.h: Same.
	* include/backward/ostream.h: Same.
	* include/backward/new.h: Same.
	* include/backward/multiset.h: Same.
	* include/backward/multimap.h: Same.
	* include/backward/map.h: Same.
	* include/backward/list.h: Same.
	* include/backward/iterator.h: Same.
	* include/backward/istream.h: Same.
	* include/backward/iostream.h:
	* include/backward/iomanip.h:
	* include/backward/heap.h: Same.
	* include/backward/hashtable.h:
	* include/backward/hash_set.h:
	* include/backward/hash_map.h:
	* include/backward/function.h:
	* include/backward/fstream.h:
	* include/backward/deque.h:
	* include/backward/defalloc.h: Same.
	* include/backward/complex.h: Same.
	* include/backward/bvector.h:
	* include/backward/alloc.h:
	* include/backward/algobase.h: Same.

	* include/backward/backward_warning.h: New file.
	* src/Makefile.am (backward_headers): Add backward_warning.h
	* src/Makefile.in: Regenerate.

2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (myinstalldirs): Make sure backward directory is
	created.
	(myinstallheaders): Install backward headers in backward directory.
	* src/Makefile.in: Regenerate.

From-SVN: r41139
2001-04-06 06:08:17 +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
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
Zack Weinberg 9f4a318c36 libstdc++.exp (dg-test): Annotate result messages with $which_library as well as $tool_flags and...
* testsuite/lib/libstdc++.exp (dg-test): Annotate result
	messages with $which_library as well as $tool_flags and
	${dg-extra-tool-flags}.  Factor out annotation text into
	a single variable.

From-SVN: r41029
2001-04-02 23:40:01 +00:00
Stephen M. Webb 57df35602e std_cstring.h: Fix for const-correctness.
2001-04-02  Stephen M. Webb  <stephen@bregmasoft.com>

	* include/c_std/bits/std_cstring.h: Fix for const-correctness.
	* include/c_std/bits/std_cwchar.h: Same.
	* testsuite/21_strings/c_strings.cc: Add.

From-SVN: r41018
2001-04-02 22:01:52 +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 62f079c57e mkcheck.in (LIBTOOL): Don't construct -B argument here...
2001-03-28  Benjamin Kosnik  <bkoz@redhat.com>

	* mkcheck.in (LIBTOOL): Don't construct -B argument here...
	* tests_flags.in (CXX): Construct here.
	(static_fail): Don't remove compile.out. Format with spaces.
	(INCLUDES): Deal with xcompiling.
	* configure.in (xcompiling): Substitute.
	* testsuite/Makefile.am: Snake libjava configury.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/23_containers/map_operators.cc: Tweaks.
	* testsuite/23_containers/set_operators.cc: Tweaks.

From-SVN: r40972
2001-03-30 17:41:33 +00:00
Benjamin Kosnik 755f30f40c [multiple changes]
2001-03-28  Benjamin Kosnik  <bkoz@redhat.com>

	* mkcheck.in (LIBTOOL): Don't construct -B argument here...
	* tests_flags.in (CXX): Construct here.
	(static_fail): Don't remove compile.out. Format with spaces.
	(INCLUDES): Deal with xcompiling.
	* configure.in (xcompiling): Substitute.
	* testsuite/Makefile.am: Snake libjava configury.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/23_containers/map_operators.cc: Tweaks.
	* testsuite/23_containers/set_operators.cc: Tweaks.

2001-03-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>

	Enable dejagnu testing framework.
	* configure.in: Generate testsuite/Makefile.
	* configure: Regenerate.
	* Makefile.am (check-install): Change rule from this...
	(check-script-install): ...to this.
	(check): Change rule from this...
	(check-script):...to this.
	* Makefile.in: Regenerate.

From-SVN: r40960
2001-03-30 08:14:15 +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
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 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
Nathan Myers d3688a0232 std_cerrno.h: Don't define errno in std::.
2001-03-06  Nathan Myers  <ncm@cantrip.org>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* include/c_std/bits/std_cerrno.h: Don't define errno in std::.
	* testsuite/17_intro/header_cerrno.cc (test01): New file.
	* testsuite/17_intro/header_cassert.cc (test01): New file.
	* testsuite/17_intro/header_cstddef.cc (test01): New file.
	* testsuite/17_intro/header_csetjmp.cc (test01): New file.
	* testsuite/17_intro/header_cstdarg.cc (test01): New file.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r40270
2001-03-06 23:32:59 +00:00
Scott Snyder 21aaf8bffc std_cmath.h: Move abs(long), div(long,long) from here...
2001-03-05  scott snyder  <snyder@fnal.gov>

	libstdc++/2190
        * include/c_std/bits/std_cmath.h: Move abs(long), div(long,long)
        from here...
        * include/c_std/bits/std_cstdlib.h: ... to here.
	* testsuite/17_intro/header_cstdlib.cc: Add test.

From-SVN: r40254
2001-03-06 02:51:15 +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 0db54514fa stdexceptions.cc (test03): Fix.
2001-02-27  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/19_diagnostics/stdexceptions.cc (test03): Fix.

From-SVN: r40095
2001-02-27 16:16:12 +00:00
Benjamin Kosnik 00035ba5e2 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.

From-SVN: r40082
2001-02-27 04:28:36 +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 b8f971fc25 char_traits.cc: Move to ...
2001-02-16  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/21_strings/char_traits.cc: Move to ...
	* testsuite/21_strings/char_traits_requirements.cc: ..here.
	* testsuite/21_strings/char_traits-int_type.cc: Move to ...
	* testsuite/21_strings/char_traits_typedefs.cc: ..here.

From-SVN: r39784
2001-02-16 23:58:28 +00:00
Gabriel Dos Reis 78e3e6aca3 libstdc++.exp (dg-test): Lift, temporarily, out of dejagnu/dg.exp.
* testsuite/lib/libstdc++.exp(dg-test): Lift, temporarily, out of
        dejagnu/dg.exp.  Adapt to log options used to run testcases.

From-SVN: r39704
2001-02-15 03:57:39 +00:00
Gabriel Dos Reis b80253d7c0 char_traits.h (char_traits<char>::int_type): Change to `int' to match 21.1.3.1/2.
2001-02-11  Gabriel Dos Reis  <gdr@codesourcery.com>

	* include/bits/char_traits.h char_traits<char>::int_type: Change
	to `int' to match 21.1.3.1/2.

	* testsuite/21_strings/char_traits-int_type.C: New test.

From-SVN: r39581
2001-02-11 04:43:44 +00:00
Gabriel Dos Reis 7f98c6bc32 Makefile.am: New file.
2001-02-10  Gabriel Dos Reis  <gdr@codesourcery.com>

        * testsuite/Makefile.am: New file.

From-SVN: r39574
2001-02-10 00:58:16 +00:00
Phil Edwards 58f60b5c91 ios_base_members_static.cc: Swap order of tests.
2001-02-05  Phil Edwards  <pme@sources.redhat.com>

	* testsuite/27_io/ios_base_members_static.cc:  Swap order of tests.

From-SVN: r39466
2001-02-05 22:08:47 +00:00
Gabriel Dos Reis 0ba434e0f8 default.exp: New file.
* testsuite/config/default.exp: New file.
        * testsuite/config: New directory.

From-SVN: r39447
2001-02-05 02:48:17 +00:00
Benjamin Kosnik 0214010c60 Preliminary named locales.
2001-01-29  Benjamin Kosnik  <bkoz@redhat.com>

	Preliminary named locales.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): New macro.
	* aclocal.m4: Regenerate.
	* configure.in: Use it.
	* configure: Regerate.
	* src/Makefile.am (sources): Add c++locale.cc.
	(build_headers): Add c++locale.h.
	* src/Makefile.in: Regenerate.
	* config/c_locale_gnu.h: New file.
	* config/c_locale_gnu.cc: New file. Non-inline member functions
	for named locales, gnu-specific.
	* config/c_locale_generic.h: New file.
	* config/c_locale_generic.cc: New file. Non-inline member
	functions for named locales, generic version.
	* docs/html/configopts.html: Add documentation on new options.

	* include/bits/locale_facets.h (class _Messages): Remove.
	(class _Moneypunct): Remove.
	* src/locale-inst.cc: Remove.

	* include/bits/locale_facets.h (class _Collate): Remove.
	* src/locale-inst.cc (std): Remove.
	* src/locale.cc: And here.

	* include/bits/localefwd.h (locale::_M_coalesce): New
	function. Correctly put together multi-name locales.
	(_Impl(const _Impl&, category, size_t)): Remove.

	* include/bits/localefwd.h (locale::_Impl): Remove _M_construct_*
	member functions.
	(_M_normalize_category_names): Remove.
	(_M_replace_categories): Fix.

	* src/localename.cc (locale::_Impl::_M_construct_collate): Remove.
	(locale::_Impl::_M_construct_ctype): Remove.
	(locale::_Impl::_M_construct_monetary): Remove.
	(locale::_Impl::_M_construct_numeric): Remove.
	(locale::_Impl::_M_construct_time): Remove.
	(locale::_Impl::_M_construct_messages): Remove.

	* include/bits/locale_facets.h (_Bad_use_facet): Remove.
	(_Use_facet_failure_handle): Remove.
	* src/locale.cc: Remove definitions.
	* src/locale-inst.cc: And here.

	* testsuite/22_locale/ctor_copy_dtor.cc (test01): Fixup. Add tests.

	* src/localename.cc (locale::facet::_S_create_c_locale): Properly
	create and error-check underlying locale object.
	(locale::facet::_S_destroy_c_locale): Add, take care of properly
	tearing down underlying locale object.
	* include/bits/localefwd.h (locale::facet): Declare.
	* testsuite/22_locale/members.cc: Don't test "fr_FR" locale for
	correctness, as glibc apparently has incorrect info in it. Test
	with it when it works again.....

	* include/bits/localefwd.h (locale::_Impl::__vec_string):
	Remove. Number of categories is fixed at six, so just simplify and
	make this an array of strings.
	(locale::_Impl::_M_has_name): Remove.
	(locale::_Impl::_M_name): Remove.
	(locale::_Impl::_M_category_names): Turns into...
	(locale::_Impl::_M_names): ...this.
	(locale::_Impl::_M_has_same_name()): New function.
	* src/localename.cc (locale::_Impl::~_Impl()): Remove here.
	(locale::_Impl::_Impl(size_t __refs, string __str)): Simplify
	signature.
	* src/locale.cc (locale::name()): Construct mangled name
	accurately reflecting combined locale categories.

	* src/locale.cc (locale::classic()): Don't initialize here.
	* src/localename.cc (locale::_Impl::_Impl(size_t __num, size_t
	__refs, bool __has_name, string __str): Do it here.

	* include/bits/localefwd.h: _S_categories_num to
	_S_num_categories. _S_facets_num to _S_num_facets.
	(locale:🆔:id()): Explicitly set _M_index to zero.
	* src/locale.cc: Same.

	* src/locale.cc: (locale::locale(const char*)): Construct named
	locales uniquely.

	* src/locale.cc: Remove numpunct_byname ctors.
	* testsuite/22_locale/numpunct_byname.cc: New file.
	* testsuite/22_locale/numpunct.cc: New file.

	* include/bits/localefwd.h (class locale): Change data members to
	protected, from private.
	(_Impl::_M_get_c_locale): Add member function.
	(locale::facet::_M_get_global_impl()): Add member function.
	* include/bits/locale_facets.h (numpunct::_M_init): Change to take
	a __c_locale pointer.
	(numpunct::numpunct( __c_locale*, size_t)): Add additonal ctor for
	named locales.
	* testsuite/22_locale/members.cc: New file, test name and combine.

	* include/bits/locale_facets.h (class numpunct): Remove class
	_Punct and _Numpunct. Rewrite class numpunct to be correct for
	named locales.
	* include/bits/localefwd.h (locale::_Imp::_M_c_locale): Add.
	* src/localename.cc (_Impl::~_Impl()): Call __frelocale.
	(_Imp::_Impl(size_t, size_t, bool, string)) Initialize _M_c_locale.
	* src/locale-inst.cc: Remove _Numpunct, _Punct instantiations.
	* testsuite/22_locale/numpunct_char_members.cc: New file.

From-SVN: r39347
2001-01-30 09:18:51 +00:00
Gabriel Dos Reis 4870f47246 README: Add more comment.
2001-01-28  Gabriel Dos Reis  <gdr@codesourcery.com>

        * testsuite/README: Add more comment.
        * testsuite/lib/libstdc++.exp: Tweak comment.

From-SVN: r39321
2001-01-28 15:13:08 +00:00
Loren J. Rittle 31e1e0a652 inserters_extractors.cc: Remove explicit reference to 'testsuite/'.
2001-01-25  Loren J. Rittle  <ljrittle@acm.org>

        * testsuite/21_strings/inserters_extractors.cc: Remove
        explicit reference to 'testsuite/'.

From-SVN: r39292
2001-01-26 23:31:57 +00:00