Commit Graph

369 Commits

Author SHA1 Message Date
Paolo Carlini c2f22a1230 deque_operators.cc (test01): Fix minor typo in last commit.
2002-05-19  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/23_containers/deque_operators.cc (test01):
	Fix minor typo in last commit.

From-SVN: r53619
2002-05-19 09:16:21 +00:00
Paolo Carlini 770dc0c5b9 re PR libstdc++/6503 ((Deque) Iterators are not typesafe)
2002-05-18  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/6503
	* include/bits/stl_deque.h (_Deque_iterator::operator==,
	operator!=, operator<, operator>, operator>=, operator<=):
	Make non-member functions, to allow comparing const and
	non-const iterators in any order.
	* testsuite/23_containers/deque_operators.cc: New testfile.

From-SVN: r53590
2002-05-18 15:10:24 +00:00
Rainer Orth d2aa36f5d9 testsuite_hooks.h (__set_testsuite_memlimit): Retrieve current limits before setting.
* testsuite/testsuite_hooks.h (__set_testsuite_memlimit):
	Retrieve current limits before setting.

From-SVN: r53490
2002-05-15 15:57:05 +00:00
Benjamin Kosnik 7bd9b6d491 re PR libstdc++/6518 (???)
2002-05-15  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6518
	* include/bits/ostream.tcc (ostream::operator<<(const char*)): Fix
	for null case.
	(ostream::operator<<(const _CharT*)): Same.
	(ostream<char>::operator<<(const char*)): Same.
	* testsuite/27_io/ostream_inserter_char.cc (test07): Add test.

From-SVN: r53489
2002-05-15 14:38:30 +00:00
Paolo Carlini bf6f276b01 re PR libstdc++/6648 (Problems with cin.getline (interactive))
2002-05-15  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/6648
	* include/bits/istream.tcc (istream::getline, ignore):
	Upon __idelim (__delim) call sbumpc() not snextc().
	* testsuite/27_io/narrow_stream_objects.cc:
	Add test08 and test09.

From-SVN: r53481
2002-05-15 10:27:29 +00:00
Benjamin Kosnik 15dee6bf0a ctype_scan_char.cc: Tweak.
2002-05-13  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/ctype_scan_char.cc: Tweak.
	* testsuite/22_locale/ctype_scan_wchar_t.cc: New.

	* docs/html/install.html: Fix.

From-SVN: r53424
2002-05-13 14:24:34 +00:00
Benjamin Kosnik 540f5c9b2d 2002-05-13 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/fstream.tcc
	(basic_filebuf::_M_allocate_internal_buffer): Remove extraneous
	try/catch blocks.
	* src/localename.cc (locale::_Impl::_M_install_facet): Same.

	* docs/html/install.html: Tweak, add bits about required locales
	for the 22_locale tests when using the gnu model.

	* testsuite/27_io/istream_sentry.cc: Tweak.

From-SVN: r53423
2002-05-13 13:58:00 +00:00
Kaveh R. Ghazi a8b432f4de ctype_inline.h (scan_is, scan_not): Fix typo, use this->is() rather than manually (and perhaps incorrectly) inlining it.
* config/os/irix/irix5.2/bits/ctype_inline.h (scan_is, scan_not):
	Fix typo, use this->is() rather than manually (and perhaps
	incorrectly) inlining it.
	* config/os/irix/irix6.5/bits/ctype_inline.h (scan_is, scan_not):
	Likewise.
	* testsuite/22_locale/ctype_scan_char.cc: New file.

From-SVN: r53422
2002-05-13 13:52:08 +00:00
Paolo Carlini 165e03670b 2002-05-13 Paolo Carlini <pcarlini@unitus.it>
Jakub Jelinek  <jakub@redhat.com>

	* testsuite/22_locale/money_get_members_char.cc
	(test01, test02, test04): Use the de_DE@euro named locale
	instead of de_DE to allow for an uniform behaviour with
	both old and Euro-era localedata; tweak some tests.
	* testsuite/22_locale/money_get_members_wchar_t.cc
	(test01, test02, test04): Likewise.
	* testsuite/22_locale/money_put_members_char.cc
	(test01, test02, test04): Likewise.
	* testsuite/22_locale/money_put_members_wchar_t.cc
	(test01, test02, test04): Likewise.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r53420
2002-05-13 12:31:50 +00:00
Paolo Carlini 27b4d95a00 2002-05-13 Paolo Carlini <pcarlini@unitus.it>
* testsuite/22_locale/codecvt_members_char_char.cc
	(test03): Robustify wrt localedata.
	* testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Likewise.
	* testsuite/22_locale/collate_members_char.cc (test04): Likewise.
	* testsuite/22_locale/collate_members_wchar_t.cc (test04): Likewise.
	* testsuite/22_locale/ctype_members_char.cc (test05): Likewise.
	* testsuite/22_locale/ctype_members_wchar_t.cc (test04): Likewise.
	* testsuite/22_locale/messages_members_char.cc (test03): Likewise.
	* testsuite/22_locale/money_get_members_char.cc (test08): Likewise.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test08): Likewise.
	* testsuite/22_locale/money_put_members_char.cc (test07): Likewise.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test07): Likewise.
	* testsuite/22_locale/moneypunct_members_char.cc (test03): Likewise.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Likewise.
	* testsuite/22_locale/num_get_members_char.cc (test06): Likewise.
	* testsuite/22_locale/num_get_members_wchar_t.cc (test06): Likewise.
	* testsuite/22_locale/num_put_members_char.cc (test04): Add comment.
	* testsuite/22_locale/num_put_members_wchar_t.cc (test04): Likewise.
	* testsuite/22_locale/numpunct_members_char.cc (test03): Likewise.
	* testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Likewise.
	* testsuite/22_locale/time_get_members_char.cc (test08): Likewise.
	* testsuite/22_locale/time_get_members_wchar_t.cc (test08): Likewise.
	* testsuite/22_locale/time_put_members_char.cc (test04): Likewise.
	* testsuite/22_locale/time_put_members_wchar_t.cc (test04): Likewise.

From-SVN: r53419
2002-05-13 10:58:14 +00:00
Jakub Jelinek 2937267b6a re PR target/6429 (libgcc_s problem on dual 32/64-bit arches)
PR target/6429
	* Makefile.in (libgcc.mk): Pass SHLIB_SLIBDIR_SUFFIXES to mklibgcc.
	* mklibgcc.in: If SHLIB_SLIBDIR_SUFFIXES is defined, put libgcc_s
	shared libraries into multilib dirs, with SONAME libgcc_s.so.1 for
	base multilibs.
	* config/t-slibgcc-elf-ver (SHLIB_LINK): Adjust for the above.
	* config/t-slibgcc-sld (SHLIB_LINK): Likewise.
	* config/i386/t-linux64 (SHLIB_SLIBDIR_SUFFIXES): Define.
	* config/sparc/t-linux64 (SHLIB_SLIBDIR_SUFFIXES): Define.
	* config/sparc/t-sol2-64 (SHLIB_SLIBDIR_SUFFIXES): Define.

	* lib/g77.exp (g77_link_flags): Append all multilib dirs containing
	libgcc_s*.so.1 below gcc object dir to LD_LIBRARY_PATH.
	* lib/g++.exp (g++_link_flags): Likewise.
	* lib/objc.exp (objc_target_compile): Likewise.

	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Append all
	multilib dirs containing libgcc_s*.so.1 below gcc object dir to
	LD_LIBRARY_PATH.

	* testsuite/lib/libjava.exp (libjava_arguments): Append all
	multilib dirs containing libgcc_s*.so.1 below gcc object dir to
	LD_LIBRARY_PATH.

From-SVN: r53345
2002-05-09 23:01:55 +02:00
Paolo Carlini b562382902 Test all the facets for the temporary "C" locale switch issue.
2002-05-06  Paolo Carlini  <pcarlini@unitus.it>

	Test all the facets for the temporary "C" locale switch issue.
	* testsuite/22_locale/codecvt_members_char_char.cc: Add test03.
	* testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise.
	* testsuite/22_locale/collate_members_char.cc: Add test04.
	* testsuite/22_locale/collate_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/ctype_members_char.cc: Add test05.
	* testsuite/22_locale/ctype_members_wchar_t.cc: Add test04.
	* testsuite/22_locale/messages_members_char.cc: Add test03.
	* testsuite/22_locale/money_get_members_char.cc: Add test08.
	* testsuite/22_locale/money_get_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/money_put_members_char.cc: Add test07.
	* testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/moneypunct_members_char.cc: Add test03.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/num_get_members_char.cc: Add test06.
	* testsuite/22_locale/num_get_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/numpunct_members_char.cc: Add test03.
	* testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/time_get_members_char.cc: Add test08.
	* testsuite/22_locale/time_get_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/time_put_members_char.cc: Add test04.
	* testsuite/22_locale/time_put_members_wchar_t.cc: Likewise.

	* testsuite/22_locale/num_put_members_char.cc (test04): Add comment.
	* testsuite/22_locale/num_put_members_wchar_t.cc (test04): Likewise.

From-SVN: r53236
2002-05-06 21:12:15 +00:00
Paolo Carlini 6d030676cc [multiple changes]
2002-05-04  Benjamin Kosnik  <bkoz@redhat.com>
	    Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/22_locale/num_put_members_char.cc: Add test04(),
	testing for the locale_facets.tcc entry of the previous commit.
	* testsuite/22_locale/num_put_members_wchar_t.cc: Likewise.

2002-05-04  Takeshi Kobayakawa  <tskoba@mte.biglobe.ne.jp>

	* config/locale/generic/c_locale.cc
	(__convert_to_v(float, double, long double)):
	Fix the temporary switch to the "C" locale, saving and
	restoring in the proper way the current locale.
	* config/locale/generic/time_members.cc
	(__timepunct<char, wchar_t>::_M_put): Likewise.
	* config/locale/gnu/messages_members.cc
	(messages<char>::do_get): Likewise.
	* config/locale/gnu/messages_members.h
	(messages<_CharT>::do_get): Likewise.
	* config/locale/gnu/time_members.cc
	(__timepunct<char, wchar_t>::_M_put): Likewise.
	* include/bits/locale_facets.tcc (__convert_from_v): Likewise.

From-SVN: r53167
2002-05-04 21:33:19 +00:00
Benjamin Kosnik 2fd819efe5 re PR libstdc++/6549 (std::getline(std::cin,s) work wrong at FreeBSD 4.5)
2002-05-03  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6549.
	* include/bits/fstream.tcc (filebuf::_M_underflow_common): Revert.
	* testsuite/27_io/narrow_stream_objects.cc (test07): Add.

From-SVN: r53107
2002-05-03 18:22:58 +00:00
Paolo Carlini 072a15d99b re PR libstdc++/6513 (sigfaults on trivial code)
2002-05-01  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/6513
	* include/bits/stl_uninitialized.h
	(uninitialized_copy(_InputIter, _InputIter, _ForwardIter)):
	Fix typo in 2001-07-17 commit: typedef _ValueType to
	iterator_traits<_ForwardIter> not <_InputIter>.
	* testsuite/23_containers/vector_ctor.cc: Add test04.

From-SVN: r52985
2002-05-01 02:17:35 +00:00
Benjamin Kosnik 5cdd50a591 stdio_filebuf.h: New file.
2002-04-30  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/stdio_filebuf.h: New file.
	* include/ext/enc_filebuf.h: New file.
	* config/io/basic_file_stdio.h (__basic_file::sys_open): Add fd ctor.
	* config/io/basic_file_stdio.cc: Same.
	* include/bits/fstream.tcc (filebuf::_M_allocate_internal_buffer):
	Remove _M_unbuf hacks.
	(filebuf::_M_destroy_internal_buffer): Same.
	(filebuf::filebuf(cfile, openmode, int_type): Remove definition.
	(filebuf::fd): Remove.
	* include/std/std_fstream.h (filebuf::_M_unbuf): Remove.
	(filebuf::filebuf(__c_file*, openmode, int_type)): Remove.
	(filebuf::fd): Remove.
	* src/ios.cc (ios_base::_S_ios_create): Change to use specialized
	filebufs.
	(ios_base::_S_ios_destroy): Same.
	* src/misc-inst.cc (file_filebuf<char>): Add instantiation.
	* include/Makefile.am (ext_headers): Add ext_filebuf.h,
	stdio_filebuf.h.  * include/Makefile.in: Regenerate.

From-SVN: r52961
2002-04-30 19:04:43 +00:00
Rainer Orth 9a3e5fd3fd libstdc++-v3-dg.exp (libstdc++-v3-init): Set all of LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH, LD_LIBRARY64_PATH.
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set all
	of LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH,
	LD_LIBRARY64_PATH.

From-SVN: r52919
2002-04-30 01:45:34 +00:00
Benjamin Kosnik d02475fdae re PR libstdc++/5280 (Problems with named locales and iostreams (gnulocale))
2002-04-28  Benjamin Kosnik  <bkoz@redhat.com>

        PR libstdc++/5280
        * config/io/basic_file_stdio.h (__basic_file::sys_getc): Return int.
        (__basic_file::sys_ungetc): Take int.
        * config/io/basic_file_stdio.cc (__basic_file::sys_ungetc): Same.
        * include/bits/fstream.tcc (basic_filebuf::_M_underflow_common):
        Use sys_getc for unbuffered input.
        * testsuite/27_io/narrow_stream_objects.cc (test06): New.

        * src/ios.cc (_M_grow_words): Adjust error checking.
        * testsuite/27_io/ios_base_storage.cc: Same.

From-SVN: r52879
2002-04-29 07:00:50 +00:00
Paolo Carlini 32c8d10081 [multiple changes]
2002-04-28  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* include/ext/stl_hashtable.h: Import __iterator_category

2002-04-28  Paolo Carlini  <pcarlini@unitus.it>
            Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* testsuite/ext/hash_set.cc: New testfile.

From-SVN: r52843
2002-04-28 16:21:32 +00:00
Paolo Carlini adf2e3e668 basic_string.h (replace(__pos, __n1, __s, __n2): Fix and tighten __throw_length_error check.
2002-04-26  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/basic_string.h (replace(__pos, __n1, __s, __n2):
	Fix and tighten __throw_length_error check.
	* testsuite/21_strings/replace.cc (test05): New.
	* testsuite/21_strings/replace.cc (test02, test03, test04): Tweak.

From-SVN: r52797
2002-04-26 18:21:32 +00:00
Loren J. Rittle 9385d9cb0d std_fstream.h (basic_filebuf::sync): Hoist unconditional flush on lower-layer handle to here...
* include/std/std_fstream.h (basic_filebuf::sync): Hoist
	unconditional flush on lower-layer handle to here...
	* include/bits/fstream.tcc (basic_filebuf::_M_really_overflow):
	...from here.  Optimize remaining _M_file.sync() call pattern.
	* testsuite/27_io/narrow_stream_objects.cc (test04): New test.
	(test05): Likewise.

From-SVN: r52699
2002-04-24 00:33:28 +00:00
Jason Merrill 736020b4a7 fstream.tcc (basic_filebuf::seekoff): Fix for output-only filebufs.
* include/bits/fstream.tcc (basic_filebuf::seekoff): Fix for
        output-only filebufs.
        * include/std/std_fstream.h (basic_filebuf::_M_set_indeterminate):
        Likewise.
        (basic_filebuf::_M_set_determinate): Likewise.

From-SVN: r52685
2002-04-23 17:56:10 -04:00
Jason Merrill 74c263af80 re PR libstdc++/6414 (g++ 3.1 tellg() regression within last week)
PR libstdc++/6414
        * include/bits/fstream.tcc (basic_filebuf::seekoff): Adjust return
        value properly in the trivial case.
        * testsuite/27_io/istream_seeks.cc (test04): Make sure that
        tellg() returns the right value after a read.

From-SVN: r52679
2002-04-23 17:01:22 -04:00
Jason Merrill 5066927d9e re PR libstdc++/4150 (catastrophic performance decrease in C++ code)
PR libstdc++/4150
        * include/std/std_streambuf.h (basic_streambuf::_M_set_indeterminate):
        Move to filebuf.
        (basic_streambuf::_M_set_determinate): Likewise.
        (basic_streambuf::_M_is_indeterminate): Likewise.
        * include/bits/std_fstream.h (basic_filebuf::_M_filepos): New
        non-static data member.
        (basic_filebuf::_M_underflow_common): New non-static member function.
        (basic_filebuf::_M_underflow, _M_uflow): Call it.
        (basic_filebuf::sync): Avoid useless seeking.
        (basic_filebuf::_M_set_indeterminate): Move here from streambuf.
        Set _M_filepos.
        (basic_filebuf::_M_set_determinate): Likewise.
        (basic_filebuf::_M_is_indeterminate): Likewise.
        * include/bits/fstream.tcc (basic_filebuf::_M_really_overflow): Seek
        back to _M_out_beg if necessary.
        (basic_filebuf::seekoff): Likewise.
        (basic_filebuf::_M_underflow_common): Generalization of old
        underflow().  Don't seek back to _M_in_beg.
        * src/ios.cc: Lose _GLIBCPP_AVOID_FSEEK stuff.
        * config/os/solaris/solaris2.?/bits/os_defines.h: Likewise.
        * config/os/bsd/freebsd/bits/os_defines.h: Likewise.
        * config/os/mingw32/bits/os_defines.h: Likewise.
        * testsuite/27_io/filebuf_virtuals.cc (test05): Don't overspecify
        ungetc test.

From-SVN: r52634
2002-04-22 16:28:05 -04:00
Benjamin Kosnik b2e4f4fda7 istream.tcc (istream::read): Fix.
2002-04-22  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/istream.tcc (istream::read): Fix.
	* testsuite/27_io/istream_unformatted.cc (main): Add.

From-SVN: r52628
2002-04-22 19:10:02 +00:00
Benjamin Kosnik 9a4b4cfc1a re PR libstdc++/6360 (Wrong workaround in char_traits.h - ignore stops on \0xff)
2002-04-20  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6360
	* include/bits/istream.tcc (istream::ignore): Streamline, use
	delimiter as is.
	* include/bits/streambuf.tcc: Use this->gptr.
	* testsuite/27_io/istream_unformatted.cc (test08): Add test.

From-SVN: r52563
2002-04-21 04:15:29 +00:00
Benjamin Kosnik 36ce7daa04 localefwd.h (locale:🆔:_M_id): Do this correctly, as type safety is important, especially on solaris.
2002-04-18  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/localefwd.h (locale:🆔:_M_id): Do this correctly,
	as type safety is important, especially on solaris.
	* include/bits/istream.tcc (istream::read): Clean.
	(istream::readsome): Same.
	* locale.cc: Wrap lines.

	* testsuite/21_strings/inserters_extractors.cc: Tweaks.
	* testsuite/27_io/instantiations.cc (test): Add bool variable...
	* testsuite/21_strings/capacity.cc: Clean.

From-SVN: r52501
2002-04-18 23:47:50 +00:00
Benjamin Kosnik cf76d875db filebuf_virtuals.cc: Add _S_pback_size instantiation.
2002-04-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/filebuf_virtuals.cc: Add _S_pback_size instantiation.

From-SVN: r52436
2002-04-17 17:35:00 +00:00
Benjamin Kosnik 42ca0438ce concept-inst.cc (vector<locale::facet*>): Remove instantiations.
2002-04-16  Benjamin Kosnik  <bkoz@redhat.com>

	* src/concept-inst.cc (vector<locale::facet*>): Remove instantiations.
	* src/stl-inst.cc (vector::_M_insert_aux): Remove instantiation.
	(__malloc_alloc_template): Conditionalize.

	* include/bits/istream.tcc: Remove sputbackc calls.

	* testsuite/19_diagnostics/stdexceptions.cc: Fix comment.

From-SVN: r52405
2002-04-17 06:20:20 +00:00
Gabriel Dos Reis f1e888aea0 [multiple changes]
2002-04-16  Paolo Carlini <pcarlini@unitus.it>
        * testsuite/24_iterators/rel_ops.cc: New test.

2002-04-16  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>

        * include/bits/type_traits.h (__normal_iterator): Declare in
        __gnu_cxx.  Adjust use at global namespace.
        * include/bits/stl_iterator.h (__normal_iterator): Move
        definition
        into __gnu_cxx::. Add more operator overloads.  Tidy existing
        ones.
        * include/bits/basic_string.h (basic_string): Adjust use of
        __normal_iterator.
        * include/bits/stl_vector.h (_Alloc>): Likewise.
        * src/concept-inst.cc (__gnu_cxx): __normal_iterator<> is now
        here.
        * src/string-inst.cc (operator==): Instantiate in __gnu_cxx.

From-SVN: r52348
2002-04-16 02:29:22 +00:00
Benjamin Kosnik d3a193e36c re PR libstdc++/4164 (33 Memory Leak when using iostream)
2002-04-15  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/4164
	Valgrind fixes.
	* config/io/basic_file_stdio.cc (__basic_file::~__basic_file):
	Call close.
	(__basic_file::close): Call fflush. Correct return if fclose ok.
	(__basic_file::is_open): Make const.
	Change __c_file_type to __c_file.
	* config/io/basic_file_stdio.h: Change __c_file_type to __c_file.
	(__basic_file::is_open): Make const.
	* config/io/c_io_stdio.h: Change __c_file_type to __c_file.
	* include/std/std_fstream.h (filebuf::_M_allocate_file): Remove.
	(filebuf::_M_unbuf): Add.
	(filebuf::_M_file): Change to non-pointer.
	(filebuf::_M_allocate_pback_buffer): Remove.
	* include/bits/fstream.tcc (filebuf::_M_allocate_file): Remove.
	(filebuf::_M_allocate_internal_buffer): Use _M_unbuf.
	Change initialization list for _M_file change.
	(filebuf::_M_allocate_pback_buffer): Remove.
	Change _M_file usage to reflect non-pointer data member.

	* config/locale/generic/c_locale.cc
	(locale::facet::_S_create_c_locale): Add parameter.
	* config/locale/generic/collate_members.cc: Change
	_M_compare_helper to _M_compare.
	Change _M_transform_helper to _M_transform.
	* config/locale/generic/monetary_members.cc: Changeup data types.
	Add dtors.
	* config/locale/generic/numeric_members.cc: Add dtors.
	* config/locale/generic/time_members.cc: Add dtors.
	* config/locale/gnu/c_locale.cc: Add parameter.
	* config/locale/gnu/collate_members.cc:Change
	_M_compare_helper to _M_compare.
	Change _M_transform_helper to _M_transform.
	* config/locale/gnu/ctype_members.cc: Better error checking.
	* config/os/gnu-linux/bits/ctype_noninline.h: Better error checking.
	* config/locale/gnu/messages_members.cc: Tweak comment.
	* config/locale/gnu/monetary_members.cc: Change data types.
	Add dtors.
	* config/locale/gnu/numeric_members.cc: Add dtors, better error
	checking.
	* config/locale/gnu/time_members.cc: Same.
	* config/locale/ieee_1003.1-2001/c_locale.cc
	(locale::facet::_S_create_c_locale): Add parameter.
	* config/locale/ieee_1003.1-2001/c_locale.h: Correct typedef.
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h: Remove
	bogus ctor.

	* include/bits/locale_facets.h (moneypunct): Use string literals.
	Don't define dtor.
	(numpunct): Same.
	(__timepunct): Same.
	(locale::_Impl::_M_facets): Change from vector to array.
	(locale::_Impl::_M_names): Change from array of strings to array
	of string literals.
	(locale::facet::_S_create_c_locale): Add parameter.
	(locale::locale::_S_num_facets): Move to...
	(locale::_Impl::_M_facets_size): Here.
	* include/bits/locale_facets.tcc: Fixups for _M_facets, _M_name
	changes.
	* include/bits/localefwd.h: (locale:🆔:_M_id): Add member function.
	(locale::_Impl::_Impl(facet**, size_t, bool)): Add.
	(locale::_Impl::_Impl(string, size_t)): Change to
	(locale::_Impl::_Impl(const char*, size_t)): This.

	* include/bits/streambuf.tcc (streambuf::_S_pback_size): Define.
	* include/std/std_streambuf.h (streambuf::_M_pback_size): Change to
	(streambuf::_S_pback_size): This.

	* src/globals.cc: Add pre-allocations for "C" facets.
	* src/locale-inst.cc: Remove vector instantiations.
	* src/locale.cc: Remove vector include. Fixups for _M_names,
	_M_facets changes.
	* src/localename.cc: Same.

	* include/bits/stl_vector.h: Fix odd formatting.

	* include/bits/basic_string.tcc: Tweak comment.

	* libsupc++/new: Make sure parameters are uglified.
	* libsupc++/typeinfo: Same.

	* testsuite/22_locale/num_get_members_char.cc: Fixup.
	* testsuite/22_locale/num_get_members_wchar_t.cc: Same.
	* testsuite/27_io/filebuf_members.cc: Same.

From-SVN: r52345
2002-04-16 00:45:36 +00:00
Benjamin Kosnik 1cb7f91f86 bitset_members.cc: New test.
2002-04-09  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/6124
	* testsuite/23_containers/bitset_members.cc: New test.
	* include/std/std_bitset.h (_Bit_count::_S_bit_count): Move..
	(_S_bit_count): Here.
	(_First_one::_S_first_one): Move...
	(_S_first_one): Here.
	Format.
	* src/bitset.cc: Adjust.
	* config/linker-map.gnu: Export.

From-SVN: r52066
2002-04-09 07:35:31 +00:00
Benjamin Kosnik b988dfc58f fstream.tcc (filebuf::seekpos): Fix.
2002-04-08  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/5180
	* include/bits/fstream.tcc (filebuf::seekpos): Fix.
	* include/std/std_fstream.h: Clean.
	* include/bits/ostream.tcc: Remove extraneous variables.
	* include/bits/sstream.tcc (stringbuf::seekoff): Be strict about
	open modes and which modes.
	(stringbuf::seekpos): Same.
	* testsuite/27_io/stringbuf_virtuals.cc: New tests.

From-SVN: r52057
2002-04-09 06:14:32 +00:00
Benjamin Kosnik a9bb75a7e0 As per DR 184, libstdc++/3139
2002-04-03  Benjamin Kosnik  <bkoz@redhat.com>

        As per DR 184, libstdc++/3139
        * include/std/std_limits.h (__glibcpp_bool_digits): Change to 1.
        (numeric_limits<bool>::is_iec559): False.
        (numeric_limits<bool>::is_modulo): False.

	* testsuite/27_io/ios_init.cc: Add instantiations.

From-SVN: r51838
2002-04-04 05:32:59 +00:00
Benjamin Kosnik 40e5b28399 ios.cc: (ios_base::Init::_S_ios_destroy): Remove flush calls.
2002-04-02  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/5268
	* src/ios.cc: (ios_base::Init::_S_ios_destroy): Remove flush calls.
	* testsuite/27_io/ios_init.cc (tests04): Add test.

	libstdc++/3983
	* include/bits/basic_ios.h (basic_ios::_M_get_fctype_ios): Remove.
	(basic_ios::_M_ios_fctype): Consistently name to _M_fctype.
	* include/bits/basic_ios.tcc: Same. Remove outdated comments.
	* include/bits/istream.tcc: Use _M_fctype, make consistent with
	ostream.
	* testsuite/27_io/ios_init.cc (tests03): Add test.

From-SVN: r51777
2002-04-03 02:32:52 +00:00
Paolo Carlini 418bb88063 basic_string.h (replace(i1, i2, _CharT* k1, _CharT* k2), [...]): New specializations to optimize for the common cases of pointers and iterators.
2002-04-02  Paolo Carlini  <pcarlini@unitus.it>
	    Nathan Myers  <ncm@cantrip.org>
            Philip Martin  <philip@codematters.co.uk>

	* include/bits/basic_string.h
	(replace(i1, i2, _CharT* k1, _CharT* k2),
	replace(i2, i2, const _CharT* k1, const _CharT* k2),
	replace(i1, i2, iterator k1, iterator k2,
	replace(i1, i2, const_iterator k1, const_iterator k2):
	New specializations to optimize for the common cases of
	pointers and iterators.
	(replace(pos, n1, s, n2)): Tweak.
	* include/bits/basic_string.tcc: Tweak comments.
	* testsuite/21_strings/replace.cc (test04): New tests.

Co-Authored-By: Nathan Myers <ncm@cantrip.org>
Co-Authored-By: Philip Martin <philip@codematters.co.uk>

From-SVN: r51746
2002-04-02 12:07:07 +00:00
Benjamin Kosnik 501e321e0d acinclude: More extensive checks for msgfmt, --enable-nls.
2002-04-01  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/5542
	* acinclude: More extensive checks for msgfmt, --enable-nls.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r51732
2002-04-02 02:41:50 +00:00
Benjamin Kosnik 663653eb3a basic_ios.h (basic_ios::_M_exception): Move.
2002-04-01  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3129
	* include/bits/basic_ios.h (basic_ios::_M_exception): Move.
	(basic_ios::_M_streambuf_state): Move.
	* include/bits/ios_base (ios_base): To here.
	* include/bits/ios_base.h (ios_base::_S_local_words): To
	_S_local_word_size.
	(ios_base::_M_word_array): To _M_local_word.
	(ios_base::_M_words_limit): To _M_word_size.
	(ios_base::_M_words): To _M_word.
	Comment.
	* include/bits/basic_ios.tcc: Adjust.
	* src/ios.cc (ios_base::_M_grow_words): Tweak.
	* testsuite/27_io/ios_base_storage.cc: Add tests.

	libstdc++/5207
	Kenny Simpson <theonetruekenny@yahoo.com>
	* include/bits/ios_base.h: Fix.

	Richard Henderson  <rth@redhat.com>
	* include/bits/ostream.tcc (ostream::operator<<(_CharT)): Correct
	last change.

	* include/bits/basic_string.h: Tweak formatting.

From-SVN: r51695
2002-04-01 18:39:37 +00:00
Paolo Carlini 99b629fa30 2002-04-01 Paolo Carlini <pcarlini@unitus.it>
* config/locale/ieee_1003.1-2001/codecvt_specializations.h
	(codecvt::do_out, codecvt::do_unshift, codecvt::do_in):
	By definition, sizeof(char) == 1.
	* include/bits/locale_facets.tcc (money_get::do_get,
	money_put::do_put): Ditto.
	* testsuite/21_strings/inserters_extractors.cc
	(test04): Ditto.

From-SVN: r51685
2002-04-01 08:55:05 +00:00
Loren J. Rittle cb105687e5 * testsuite/18_support/numeric_limits.cc (test_extrema): Fix typo.
From-SVN: r51544
2002-03-29 06:34:04 +00:00
Paolo Carlini 0c0bac932e 2002-03-28 Paolo Carlini <pcarlini@unitus.it>
* testsuite/24_iterators/istream_iterator.cc
	(test02): New tests.

From-SVN: r51527
2002-03-28 20:25:25 +00:00
Ulrich Weigand 10cbfb51ac 2002-03-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Paolo Carlini  <pcarlini@unitus.it>

        * testsuite/22_locale/codecvt_members_unicode_wchar_t.cc
        (test01): Protect the test with _GLIBCPP_USE_WCHAR_T;
        fix i_lit_base e_lit_base arrays, making them independent
	from the endianness of the platform; tweak UCS4 to UCS-4BE.

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

From-SVN: r51521
2002-03-28 19:19:23 +00:00
Benjamin Kosnik a3ebd14d24 ostream.tcc (ostream::operator<<(_CharT)): Always allocate at least a byte.
2002-03-27  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/ostream.tcc (ostream::operator<<(_CharT)): Always
	allocate at least a byte.

	* testsuite/18_support/numeric_limits.cc (test_extrema): Make
	debugger-friendly.
	* testsuite/27_io/streambuf.cc (test07): Fix.
	(test06): Enable.

From-SVN: r51494
2002-03-28 03:15:08 +00:00
Paolo Carlini 81b1b8c29d 2002-03-25 Paolo Carlini <pcarlini@unitus.it>
Richard Henderson  <rth@redhat.com>

	* testsuite/22_locale/codecvt_members_unicode_char.cc
	(test01, test02): make sure that the i_lit_base array
	is sufficiently aligned.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r51359
2002-03-26 00:36:19 +00:00
Paolo Carlini b7d5968dfc 2002-03-25 Paolo Carlini <pcarlini@unitus.it>
* testsuite/22_locale/collate_byname.cc
	(test01): compare the result of collate::compare with
	that of collate::transform + string::compare, not with
	that of collate::transform + collate::compare; values
	returned by collate::compare are normalized, therefore
	test against +-1.

From-SVN: r51351
2002-03-25 23:19:47 +00:00
Ulrich Weigand 9cc737e8da 2002-03-25 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/locale/codecvt_members_unicode_char.cc
	(test01, test02): Fix i_lit_base arrays, making them
	independent from the endianness of the platform.

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

From-SVN: r51314
2002-03-25 13:22:20 +00:00
Benjamin Kosnik 34ff0b99c1 acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPP): Just test for signbit and __signbit directly.
2002-03-22  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPP): Just test for
	signbit and __signbit directly.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* libmath/Makefile.am: Simplify.
	* libmath/Makefile.in: Regenerate.
	* include/c_std/std_cmath.h: Update paths for include of cmath.tcc.

	* include/Makefile.am: Clean up handling of extra "C" header files.
	Add hooks for "C" compatibility headers.
	* include/Makefile.in: Regenerate.

	* include/c/*: Formatting tweaks, cleanups.
	* include/c_std/*: Same.

From-SVN: r51220
2002-03-23 03:19:03 +00:00
Steve Ellcey 263c6fa840 acinclude.m4 (GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS): Define GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS to set LIBUNWIND_FLAG if...
2002-03-19  Steve Ellcey  <sje@cup.hp.com>

        * acinclude.m4 (GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS): Define
        GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS to set LIBUNWIND_FLAG if
        --enable-libunwind-exceptions is set.
        * configure.in (GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS): Call new
        macro to check for libunwind.
        * configure: Regenerate.
        * src/Makefile.am (libstdc___la_LDFLAGS): Add
        LIBUNWIND_FLAG to libstdc link line.
        * src/Makefile.in: Regenerate.

From-SVN: r51035
2002-03-19 19:50:30 +00:00
Paolo Carlini 3039874b15 locale_facets.tcc (money_put::do_put(long double)): Fix dimensioning of temporary buffers to avoid risk of overruns.
2002-03-18  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/locale_facets.tcc
	(money_put::do_put(long double)): Fix dimensioning of
	temporary buffers to avoid risk of overruns.
	(money_put::do_put(string)): Same for the buffer used to
	add the grouping chars.
	* testsuite/22_locale/money_put_members_char.cc: Add test06.
	* testsuite/22_locale/money_put_members_wchar_t.cc: Ditto.

	* include/bits/locale_facets.tcc
	(collate::do_transform): Simplify.

From-SVN: r51012
2002-03-18 23:11:57 +00:00
Philipp Thomas f07beda95a hash_map.h: hash, hashtable, hash_map and hash_multimap are in namespace __gnu_cxx.
2002-03-15  Philipp Thomas  <pthomas@suse.de>

	* include/backward/hash_map.h: hash, hashtable, hash_map and
	hash_multimap are in namespace __gnu_cxx.
	include/backward/hash_set.h: hash, hashtable, hash_set and
	hash_multiset are in namespace __gnu_cxx.
	include/backward/hashtable.h: hash and hashtable are in
	namespace __gnu_cxx.
	include/backward/rope.h: char_producer, sequence_buffer,
	rope, crope and wrope are in namespace __gnu_cxx.
	include/backward/slist.h: slist is in namespace __gnu_cxx.
	* testsuite/backward/header_hash_map_h.cc
	testsuite/backward/header_hash_set_h.cc
	testsuite/backward/header_hashtable_h.cc
	testsuite/backward/header_rope_h.cc
	testsuite/backward/header_slist_h.cc
	testsuite/backward/header_tempbuf_h.cc: New tests for
	checking that we're using the correct namespace.

From-SVN: r50956
2002-03-18 10:47:15 +00:00