Commit Graph

1669 Commits

Author SHA1 Message Date
Alexandre Oliva e9fcab6251 sstream.tcc (overflow): Make sure operands of min and max have the same type.
* include/bits/sstream.tcc (overflow): Make sure operands of min
and max have the same type.

From-SVN: r65368
2003-04-08 12:03:26 +00:00
Jerry Quinn 941747b558 Add PR libstdc++/10276 to Changelog entry.
From-SVN: r65243
2003-04-04 15:09:04 +00:00
Jerry Quinn e23afc6f2e ios.cc (ios_base::_M_init): Remove _M_callbacks initialization.
2003-04-04  Jerry Quinn  <jlquinn@optonline.net>

	* src/ios.cc (ios_base::_M_init): Remove _M_callbacks
	initialization.

From-SVN: r65242
2003-04-04 15:05:17 +00:00
Paolo Carlini eb98bd16ce std_streambuf.h (_M_out_buf_size()): Remove.
2003-03-31  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_streambuf.h (_M_out_buf_size()): Remove.
	* include/bits/fstream.tcc (_M_allocate_internal_buffer):
	Don't set _M_out_end.
	(basic_filebuf::overflow): Replace _M_out_buf_size() with
	this->_M_out_cur && this->_M_out_cur < this->_M_out_end.
	* include/bits/sstream.tcc (basic_stringbuf::overflow):
	Replace _M_out_buf_size() with this->_M_out_cur < this->_M_out_end;
	* include/bits/streambuf.tcc (basic_streambuf::sputc):
	Replace _M_out_buf_size() with _M_out_cur && _M_out_cur < _M_out_end.
	(basic_streambuf::xsputn): Replace _M_out_buf_size() with
	_M_out_end - _M_out_cur.
	(__copy_streambufs): Likewise.
	* include/std/std_fstream.h (_M_set_determinate): Set
	_M_out_end here.

From-SVN: r65093
2003-03-31 18:24:13 +00:00
Paolo Carlini 631693d58d fstream.tcc (basic_filebuf::showmanyc, [...]): Fix test for synced buffer.
2003-03-30  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (basic_filebuf::showmanyc,
	_M_convert_to_external, _M_really_overflow, seekoff): Fix
	test for synced buffer.
	* include/std/std_fstream.h (sync): Likewise.
	* src/fstream.cc (basic_filebuf<char>::_M_underflow_common,
	basic_filebuf<wchar_t>::_M_underflow_common): Likewise.

From-SVN: r65038
2003-03-30 08:32:11 +00:00
Benjamin Kosnik d29cc32f9d std_sstream.h (basic_istringstream): Adjust initialization.
2003-03-28  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/std_sstream.h (basic_istringstream): Adjust
	initialization.
	(basic_ostringstream): Same.
	(basic_stringstream): Same.
	* include/std/std_fstream.h (basic_ifstream): Adjust initialization.
	(basic_ofstream): Same.
	(basic_fstream): Same.
	* include/std/std_ostream.h (basic_ostrem): Add protected ctor
	that does not call init.
	* include/std/std_istream.h (basic_istream): Same.
	(basic_iostream): Construct istream, ostream uninitialized, use
	init to initialize just once. Add protected ctor that does not
	call init.

From-SVN: r64980
2003-03-28 19:45:44 +00:00
Paolo Carlini bbacb998c8 re PR libstdc++/9533 (Can't read from tty with ifstream)
2003-03-28  Paolo Carlini  <pcarlini@unitus.it>
	    Nathan Myers  <ncm@cantrip.org>

	PR libstdc++/9533
	* include/bits/fstream.tcc (basic_filebuf<>::open): Don't
	call underflow().
	(basic_filebuf<>::showmanyc): Use the information provided
	by codecvt and __basic_file<>::showmanyc_helper to implement
	a non-trivial showmanyc.
	* config/io/basic_file_stdio.h
	(__basic_file<>::showmanyc_helper): New, declare.
	* config/io/basic_file_stdio.cc
	(__basic_file<>::showmanyc_helper): Define.
	(__basic_file<>::_M_open_mode): Don't set O_NONBLOCK.
	(__basic_file<char>::open): Don't call fcntl().
	* acinclude.m4 (GLIBCPP_CHECK_S_ISREG_OR_S_IFREG,
	GLIBCPP_CHECK_POLL): New macros.
	* configure.in: Call here.
	* acconfig.h: Add #undefs for the corresponding symbols.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* config.h.in: Regenerate.

Co-Authored-By: Nathan Myers <ncm@cantrip.org>

From-SVN: r64978
2003-03-28 18:28:47 +00:00
Benjamin Kosnik bd40d535f6 linker-map.gnu: Remove string export restrictions.
2003-03-24  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu: Remove string export restrictions.

From-SVN: r64837
2003-03-25 01:53:13 +00:00
Paolo Carlini eea5120f82 1.cc: Remove find_first_of, find_last_of and find_last_not_of tests.
2003-03-24  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/21_strings/basic_string/find/char/1.cc: Remove
	find_first_of, find_last_of and find_last_not_of tests.
	* testsuite/21_strings/basic_string/find/char/2.cc: find_first_of
	tests here, new file.
	* testsuite/21_strings/basic_string/find/wchar_t/1.cc: Likewise, remove
	wchar_t find_first_of, find_last_of and find_last_not_of tests.
	* testsuite/21_strings/basic_string/find/wchar_t/2.cc: Likewise,
	wchar_t find_first_of tests here, new file.
	* testsuite/21_strings/basic_string/rfind/char/2.cc: find_last_of tests
	here.
	* testsuite/21_strings/basic_string/rfind/char/3.cc: find_last_not_of
	tests here.
	* testsuite/21_strings/basic_string/rfind/wchar_t/2.cc: likewise,
	wchar_t find_last_of tests here.
	* testsuite/21_strings/basic_string/rfind/wchar_t/3.cc: likewise,
	wchar_t find_last_not_of tests here.

From-SVN: r64824
2003-03-24 22:22:40 +00:00
Loren J. Rittle ff81da238f ctype_noninline.h (ctype<char>::classic_table): Correct return value.
* config/os/hpux/ctype_noninline.h (ctype<char>::classic_table):
	Correct return value.

From-SVN: r64724
2003-03-22 18:55:40 +00:00
Jerry Quinn 442c0874ea re PR libstdc++/5730 (complex<double>::norm() -- huge slowdown from egcs-2.91.66)
2003-03-21  Jerry Quinn  <jlquinn@optonline.net>

	PR libstdc++/5730
	* include/bits/c++config (_GLIBCPP_FAST_MATH): Define.
        * include/std/std_complex.h (norm):  Use faster,
        less accurate computation for builtin float types under --fast-math.

From-SVN: r64701
2003-03-22 04:57:46 +00:00
Magnus Fromreide 532722bed3 * testsuite/testsuite_hooks.h: Fix warning nits.
From-SVN: r64678
2003-03-21 20:32:45 +00:00
Alexandre Oliva 951312c819 atomicity.h (__exchange_and_add, [...]): Only .set mips2 for the o32 ABI.
* config/cpu/mips/atomicity.h (__exchange_and_add, __atomic_add):
Only .set mips2 for the o32 ABI.

From-SVN: r64604
2003-03-20 02:30:42 +00:00
Paolo Carlini 38b2a9713f 1.cc: Test char not wchar_t.
2003-03-19  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/21_strings/char_traits/requirements/char/1.cc:
	Test char not wchar_t.

From-SVN: r64576
2003-03-19 12:17:49 +00:00
Paolo Carlini 91d167bb61 1.cc: Correct length, taking into account sizeof(wchar_t).
2003-03-18  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/21_strings/basic_string/append/wchar_t/1.cc:
	Correct length, taking into account sizeof(wchar_t).

From-SVN: r64547
2003-03-18 19:16:50 +00:00
Paolo Carlini 61f1ed592c Reshuffle 21_strings testsuite.
2003-03-18  Paolo Carlini  <pcarlini@unitus.it>

	Reshuffle 21_strings testsuite.
	* testsuite/21_strings/append.cc, c_strings.cc, invariants.cc,
	assign.cc, ctor_copy_dtor.cc, nonmember.cc, capacity.cc,
	element_access.cc, operations.cc, char_traits_requirements.cc,
	find.cc, replace.cc, char_traits_typedefs.cc, insert.cc, rfind.cc,
	compare.cc, inserters_extractors.cc, substr.cc: Split up, add
	wchar_t tests as follows.
	* 21_strings/basic_string/append/char/1.cc: New.
	* 21_strings/basic_string/append/wchar_t/1.cc: New.
	* 21_strings/basic_string/assign/char/1.cc: New.
	* 21_strings/basic_string/assign/char/2.cc: New.
	* 21_strings/basic_string/assign/char/3.cc: New.
	* 21_strings/basic_string/assign/wchar_t/1.cc: New.
	* 21_strings/basic_string/assign/wchar_t/2.cc: New.
	* 21_strings/basic_string/assign/wchar_t/3.cc: New.
	* 21_strings/basic_string/capacity/1.cc: New.
	* 21_strings/basic_string/capacity/char/1.cc: New.
	* 21_strings/basic_string/capacity/char/2.cc: New.
	* 21_strings/basic_string/capacity/wchar_t/1.cc: New.
	* 21_strings/basic_string/capacity/wchar_t/2.cc: New.
	* 21_strings/basic_string/compare/char/1.cc: New.
	* 21_strings/basic_string/compare/wchar_t/1.cc: New.
	* 21_strings/basic_string/cons/char/1.cc: New.
	* 21_strings/basic_string/cons/char/2.cc: New.
	* 21_strings/basic_string/cons/char/3.cc: New.
	* 21_strings/basic_string/cons/char/4.cc: New.
	* 21_strings/basic_string/cons/char/5.cc: New.
	* 21_strings/basic_string/cons/wchar_t/1.cc: New.
	* 21_strings/basic_string/cons/wchar_t/2.cc: New.
	* 21_strings/basic_string/cons/wchar_t/3.cc: New.
	* 21_strings/basic_string/cons/wchar_t/4.cc: New.
	* 21_strings/basic_string/cons/wchar_t/5.cc: New.
	* 21_strings/basic_string/element_access/char/1.cc: New.
	* 21_strings/basic_string/element_access/char/2.cc: New.
	* 21_strings/basic_string/element_access/char/3.cc: New.
	* 21_strings/basic_string/element_access/wchar_t/1.cc: New.
	* 21_strings/basic_string/element_access/wchar_t/2.cc: New.
	* 21_strings/basic_string/element_access/wchar_t/3.cc: New.
	* 21_strings/basic_string/find/char/1.cc: New.
	* 21_strings/basic_string/find/wchar_t/1.cc: New.
	* 21_strings/basic_string/insert/char/1.cc: New.
	* 21_strings/basic_string/insert/char/2.cc: New.
	* 21_strings/basic_string/insert/wchar_t/1.cc: New.
	* 21_strings/basic_string/insert/wchar_t/2.cc: New.
	* 21_strings/basic_string/inserters_extractors/char/1.cc: New.
	* 21_strings/basic_string/inserters_extractors/char/4.cc: New.
	* 21_strings/basic_string/inserters_extractors/char/5.cc: New.
	* 21_strings/basic_string/inserters_extractors/char/6.cc: New.
	* 21_strings/basic_string/inserters_extractors/char/7.cc: New.
	* 21_strings/basic_string/inserters_extractors/char/8.cc: New.
	* 21_strings/basic_string/inserters_extractors/char/9.cc: New.
	* 21_strings/basic_string/inserters_extractors/wchar_t/1.cc: New.
	* 21_strings/basic_string/inserters_extractors/wchar_t/4.cc: New.
	* 21_strings/basic_string/inserters_extractors/wchar_t/5.cc: New.
	* 21_strings/basic_string/inserters_extractors/wchar_t/6.cc: New.
	* 21_strings/basic_string/inserters_extractors/wchar_t/7.cc: New.
	* 21_strings/basic_string/inserters_extractors/wchar_t/8.cc: New.
	* 21_strings/basic_string/inserters_extractors/wchar_t/9.cc: New.
	* 21_strings/basic_string/operators/char/1.cc: New.
	* 21_strings/basic_string/operators/char/2.cc: New.
	* 21_strings/basic_string/operators/wchar_t/1.cc: New.
	* 21_strings/basic_string/operators/wchar_t/2.cc: New.
	* 21_strings/basic_string/replace/char/1.cc: New.
	* 21_strings/basic_string/replace/char/2.cc: New.
	* 21_strings/basic_string/replace/char/3.cc: New.
	* 21_strings/basic_string/replace/char/4.cc: New.
	* 21_strings/basic_string/replace/char/5.cc: New.
	* 21_strings/basic_string/replace/wchar_t/1.cc: New.
	* 21_strings/basic_string/replace/wchar_t/2.cc: New.
	* 21_strings/basic_string/replace/wchar_t/3.cc: New.
	* 21_strings/basic_string/replace/wchar_t/4.cc: New.
	* 21_strings/basic_string/replace/wchar_t/5.cc: New.
	* 21_strings/basic_string/rfind/char/1.cc: New.
	* 21_strings/basic_string/rfind/char/2.cc: New.
	* 21_strings/basic_string/rfind/char/3.cc: New.
	* 21_strings/basic_string/rfind/wchar_t/1.cc: New.
	* 21_strings/basic_string/rfind/wchar_t/2.cc: New.
	* 21_strings/basic_string/rfind/wchar_t/3.cc: New.
	* 21_strings/basic_string/substr/char/1.cc: New.
	* 21_strings/basic_string/substr/wchar_t/1.cc: New.
	* 21_strings/c_strings/char/1.cc: New.
	* 21_strings/c_strings/char/2.cc: New.
	* 21_strings/c_strings/wchar_t/1.cc: New.
	* 21_strings/c_strings/wchar_t/2.cc: New.
	* 21_strings/char_traits/requirements/char/1.cc: New.
	* 21_strings/char_traits/requirements/wchar_t/1.cc: New.
	* 21_strings/char_traits/typedefs/char/1.cc: New.

From-SVN: r64524
2003-03-18 05:04:14 +00:00
Paolo Carlini f7e70401d4 re PR libstdc++/10097 (filebuf::underflow drops characters.)
2003-03-17  Paolo Carlini  <pcarlini@unitus.it>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/10097
	* src/fstream.cc (basic_filebuf<char>::_M_underflow_common,
	basic_filebuf<wchar_t>::_M_underflow_common):
	if (gptr() < egptr()) return *gptr().
	* testsuite/27_io/filebuf_virtuals.cc (test16): Add.

	* testsuite/27_io/filebuf_members.cc (test_04): Minor
	changes: unlink fifo before making it, fix spelling error.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r64509
2003-03-17 23:50:40 +00:00
Benjamin Kosnik 0c45b8e073 [multiple changes]
2003-03-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/Makefile.am (CLEANFILES): Add tmp*.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/27_io/filebuf_members.cc: Consistently name tmp files.
	Cleanups.

2003-03-17  Petur Runolfsson  <peturr02@ru.is>

        PR libstdc++/9964
        * include/bits/fstream.tcc (basic_filebuf::close):
        Always close file, even when write fails.
        * testsuite/27_io/filebuf_members.cc (test_07):  New test.

From-SVN: r64498
2003-03-17 18:44:44 +00:00
Danny Smith c31da8a535 Makefile.am (C_COMPILE): Remove.
* libsupc++/Makefile.am (C_COMPILE): Remove.
	(LTCOMPILE): Likewise.
	* libsupc++/Makefile.in: Regenerate.

From-SVN: r64477
2003-03-17 11:02:39 +00:00
Benjamin Kosnik ac1613a2c2 [multiple changes]
2003-03-14  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/bitset_members.cc: Add test variable.
	* testsuite/23_containers/map_insert.cc: Same.
	* testsuite/22_locale/ctype/cons/char/1.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/1.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc: Same.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc: Same.
	* testsuite/27_io/istream_exception.cc: Same.
	* testsuite/27_io/filebuf_virtuals.cc: Same.
	* testsuite/27_io/stringbuf_virtuals.cc: Same.
	* testsuite/27_io/ostream_inserter_arith.cc: Same.
	* testsuite/26_numerics/valarray_operators.cc: Same.
	* testsuite/26_numerics/slice.cc: Same.
	* testsuite/26_numerics/slice_array_assignment.cc: Same.
	* testsuite/24_iterators/istream_iterator.cc: Same.
	* mkcheck.in (TESTS_FILE): Use dejagnu-generated file if possible.

2003-03-14  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/9581
	PR libstdc++/9870
	* config/locale/generic/ctype_members.cc,
	* config/locale/gnu/ctype_members.cc
	(ctype<wchar_t>::do_widen(char)):  Cast argument to
	unsigned char before passing to btowc.
	(ctype<wchar_t>::do_widen(const char*, const char*, wchar_t*)):
	Convert characters with btowc instead of mbsrtowcs.
	(ctype<wchar_t>::do_narrow(const wchar_t*, const wchar_t*,
	char, char*):
	Convert characters with wctob instead of wcsrtombs.
	* testsuite/22_locale/ctype/narrow/wchar_t/3.cc:  New test.
	* testsuite/22_locale/ctype/widen/wchar_t/2.cc:  New test.
	* testsuite/22_locale/ctype/widen/wchar_t/3.cc:  New test.

From-SVN: r64391
2003-03-15 04:53:52 +00:00
Benjamin Kosnik 628c731a48 stdc++.h: New.
2003-03-14  Benjamin Kosnik  <bkoz@redhat.com>

	* include/stdc++.h: New.
	* libsupc++/exception_defines.h (__EXCEPTION_DEFINES_H): Add guard.
	* include/Makefile.am (stamp-std-precompile): Generate stdc++.h.gch
        * include/Makefile.in: Regenerate.
        * testsuite_flags.in (--build-cxx): Add, but don't use PCHFLAGS.
	(--cxxflags): Put -g -O2 here.
	* testsuite/libstdc++-v3.dg/dg.exp: Remove -g -O2 here.

From-SVN: r64374
2003-03-14 22:16:06 +00:00
Loren J. Rittle 98d2dec7e3 testsuite_hooks.h: Suppress runtime exception thrown by missing named locale.
* testsuite/testsuite_hooks.h: Suppress runtime exception thrown by
	missing named locale.

From-SVN: r64372
2003-03-14 21:41:26 +00:00
Andreas Schwab 8d3f82aa3a configure.in: Only append to makefiles that are newly created to avoid multiple...
2003-03-14  Andreas Schwab  <schwab@suse.de>

	* configure.in: Only append to makefiles that are newly created to
	avoid multiple multi-do/multi-clean rules.
	* configure: Rebuilt.

From-SVN: r64363
2003-03-14 15:12:06 +00:00
Jonathan Wakely 21c93c390d configopts.html, [...]: Fix invalid XHTML and make page header style consistent.
2003-03-13  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/configopts.html, docs/html/documentation.html,
	docs/html/explanations.html, docs/html/install.html,
	docs/html/19_diagnostics/howto.html, docs/html/faq/index.html: Fix
	invalid XHTML and make page header style consistent.

From-SVN: r64312
2003-03-13 18:26:23 +00:00
Jonathan Wakely 408e31a2dd index.html: Explain memory "leaks" due to allocators.
2003-03-12  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/faq/index.html: Explain memory "leaks" due to allocators.
	* docs/html/faq/index.txt: Regenerate.
	* docs/html/debug.html: Add a bit to allocator text and fix XHTML.

From-SVN: r64273
2003-03-13 00:15:59 +00:00
Andreas Schwab ff8b9ca85f configure.in: Avoid trailing /.
2003-03-10  Andreas Schwab  <schwab@suse.de>

boehm-gc:
	* configure.in: Avoid trailing /. in toolexeclibdir.
	* configure: Rebuilt.

libf2c:
	* aclocal.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Avoid trailing /. in
	glibcpp_toolexeclibdir.
	* configure: Rebuilt.

libffi:
	* configure.in: Avoid trailing /. in toolexeclibdir.
	* configure: Rebuilt.

libjava:
	* configure.in: Avoid trailing /. in toolexeclibdir.
	* configure: Rebuilt.

libobjc:
	* aclocal.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Avoid trailing /. in
	glibcpp_toolexeclibdir.
	* configure: Rebuilt.

libstdc++-v3:
	* acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Avoid trailing /. in
	glibcpp_toolexeclibdir.
	* aclocal.m4, configure: Rebuilt.

zlib:
	* configure.in: Avoid trailing /. in toolexeclibdir.
	* configure: Rebuilt.

From-SVN: r64267
2003-03-12 21:34:31 +00:00
Jonathan Wakely 4959aa5e61 index.html: Update text about location of headers.
2003-03-11  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/faq/index.html: Update text about location of headers.
	* docs/html/faq/index.txt: Regenerate.

From-SVN: r64189
2003-03-11 21:33:30 +00:00
Carlo Wood 1be4def3c6 demangle.h: Prepend accessors of class qualifier with 'get_' in order to fix warnings when...
2003-03-11  Carlo Wood  <carlo@alinoe.com>

	* include/bits/demangle.h: Prepend accessors of
	class qualifier with 'get_' in order to fix warnings
	when compiling with -Wshadow.

From-SVN: r64172
2003-03-11 13:48:16 +00:00
Loren J. Rittle b0649028b4 ctype_inline.h: Support _M_table when so installed.
* config/os/bsd/freebsd/ctype_inline.h:  Support _M_table
	when so installed.
	* testsuite/22_locale/ctype/cons/char/1.cc: Fix typo.

From-SVN: r64163
2003-03-11 07:07:25 +00:00
Loren J. Rittle 5858cd26b2 testsuite_hooks.h (run_tests_wrapped_env): Do not report lack of setenv().
* testsuite/testsuite_hooks.h (run_tests_wrapped_env): Do not
	report lack of setenv().

From-SVN: r64161
2003-03-11 05:32:56 +00:00
Paolo Carlini f5d9895a06 basic_file_stdio.cc: include <unistd.h>.
2003-03-09  Paolo Carlini  <pcarlini@unitus.it>

	* config/io/basic_file_stdio.cc: include <unistd.h>.

From-SVN: r64069
2003-03-10 06:55:00 +00:00
Paolo Carlini 95dca20c9c re PR libstdc++/7744 (streambuf::in_avail() always returns 0 (zero) for cin input stream)
2003-03-09  Paolo Carlini  <pcarlini@unitus.it>
	    Nathan Myers  <ncm@cantrip.org>

	PR libstdc++/7744
	* config/io/basic_file_stdio.h (__basic_file<>::xsgetn, xsputn,
	seekoff, seekpos): Add a boolean parameter __stdio.
	* config/io/basic_file_stdio.cc (__basic_file<>::xsgetn, xsputn,
	seekoff, seekpos): If __stdio == true, use fread (fwrite, fseek/ftell,
	fseek/ftell, respectively), otherwise read (write, lseek, lseek,
	respectively).
	* include/bits/fstream.tcc (basic_filebuf<>::_M_convert_to_external,
	_M_really_overflow, seekoff): Use the boolean parameter in the calls.
	* include/std/std_fstream.h (sync): Likewise.
	* src/fstream.cc (basic_filebuf<>::_M_underflow_common): Likewise.
	* src/ios.cc (ios_base::Init::_S_ios_create(bool)): Revert libstdc++/8399
	commit involving isatty(0).
	* acinclude.m4 (GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1): Remove.
        (GLIBCPP_CHECK_UNISTD_SUPPORT): Remove
  	* configure.in: Remove call.
	* aclocal.m4: Regenerate.
       	* config.h.in: Regenerate.
        * configure: Regenerate.
	* testsuite/27_io/narrow_stream_objects.cc (test11): Add.

Co-Authored-By: Nathan Myers <ncm@cantrip.org>

From-SVN: r64051
2003-03-09 22:31:45 +00:00
Paolo Carlini 3006d72869 re PR libstdc++/9988 (filebuf::overflow writes EOF to file)
2003-03-09  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9988
	* include/bits/fstream.tcc (overflow): don't write EOF to file.
	* testsuite/27_io/filebuf_virtuals.cc (test15): Add.

From-SVN: r64045
2003-03-09 21:35:09 +00:00
Jerry Quinn 6f62fbd81a re PR libstdc++/9561 (ostream inserters rethrow exception of wrong type)
2003-03-08  Jerry Quinn  <jlquinn@optonline.net>

	PR libstdc++/9561
	* include/bits/basic_ios.h (_M_setstate): New.
	* include/bits/ostream.tcc (operator<<): Use it.
	* include/bits/istream.tcc (operator>>): Use it.
	* include/std/std_ostream.h (operator<<): Make friends.
	* include/std/std_istream.h (operator>>): Make friends.
	* testsuite/27_io/ostream_exception.cc,
	testsuite/27_io/istream_exception.cc: New tests.

From-SVN: r64021
2003-03-09 04:19:52 +00:00
Loren J. Rittle 4a07c08a47 * testsuite/26_numerics/c99_classification_macros_c.cc: Tweak test.
From-SVN: r63982
2003-03-08 10:13:36 +00:00
Benjamin Kosnik 6fef42173f locale_facets.tcc: Fix typo.
2003-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc: Fix typo.

From-SVN: r63976
2003-03-08 09:11:04 +00:00
Loren J. Rittle 85c39c6df1 c_locale.cc (locale::facet::_S_create_c_locale): Throw runtime exception when unsupported language is specified.
* config/locale/generic/c_locale.cc (locale::facet::_S_create_c_locale):
	Throw runtime exception when unsupported language is specified.
	* testsuite/testsuite_hooks.h
	(run_test_wrapped_generic_locale_exception_catcher): New function.
	* testsuite/testsuite_hooks.cc (run_tests_wrapped_locale):
	Suppress runtime exception thrown by generic implementation.
	(run_tests_wrapped_env): Likewise.
	(run_test_wrapped_generic_locale_exception_catcher): New function.
	* testsuite/22_locale/collate/compare/char/1.cc: New test wrap.
	* testsuite/22_locale/collate/compare/char/2.cc: New test wrap.
	* testsuite/22_locale/collate/compare/char/3.cc: New test wrap.
	* testsuite/22_locale/collate/hash/char/2.cc: New test wrap.
	* testsuite/22_locale/collate/transform/char/2.cc: New test wrap.
	* testsuite/22_locale/collate/transform/char/3.cc: New test wrap.
	* testsuite/22_locale/collate_byname/1.cc: New test wrap.
	* testsuite/22_locale/ctype/is/char/2.cc: New test wrap.
	* testsuite/22_locale/facet/2.cc: New test wrap.
	* testsuite/22_locale/locale/cons/4.cc: New test wrap.
	* testsuite/22_locale/locale/cons/5.cc: New test wrap.
	* testsuite/22_locale/locale/cons/7.cc: New test wrap.
	* testsuite/22_locale/messages/members/char/1.cc: New test wrap.
	* testsuite/22_locale/messages/members/char/2.cc: New test wrap.
	* testsuite/22_locale/messages/members/char/3.cc: New test wrap.
	* testsuite/22_locale/messages_byname/1.cc: New test wrap.
	* testsuite/22_locale/money_get/get/char/1.cc: New test wrap.
	* testsuite/22_locale/money_get/get/char/2.cc: New test wrap.
	* testsuite/22_locale/money_get/get/char/3.cc: New test wrap.
	* testsuite/22_locale/money_get/get/char/4.cc: New test wrap.
	* testsuite/22_locale/money_put/put/char/1.cc: New test wrap.
	* testsuite/22_locale/money_put/put/char/2.cc: New test wrap.
	* testsuite/22_locale/money_put/put/char/3.cc: New test wrap.
	* testsuite/22_locale/moneypunct/members/char/2.cc: New test wrap.
	* testsuite/22_locale/moneypunct_byname/1.cc: New test wrap.
	* testsuite/22_locale/num_get/get/char/1.cc: New test wrap.
	* testsuite/22_locale/num_get/get/char/2.cc: New test wrap.
	* testsuite/22_locale/num_get/get/char/3.cc: New test wrap.
	* testsuite/22_locale/num_get/get/char/5.cc: New test wrap.
	* testsuite/22_locale/num_get/get/char/6.cc: New test wrap.
	* testsuite/22_locale/num_put/put/char/1.cc: New test wrap.
	* testsuite/22_locale/num_put/put/char/2.cc: New test wrap.
	* testsuite/22_locale/num_put/put/char/3.cc: New test wrap.
	* testsuite/22_locale/num_put/put/char/5.cc: New test wrap.
	* testsuite/22_locale/numpunct/members/char/1.cc: New test wrap.
	* testsuite/22_locale/numpunct/members/char/2.cc: New test wrap.
	* testsuite/22_locale/numpunct_byname/1.cc: New test wrap.
	* testsuite/22_locale/numpunct_byname/2.cc: New test wrap.
	* testsuite/22_locale/time_get/date_order/char/1.cc: New test wrap.
	* testsuite/22_locale/time_get/get_date/char/1.cc: New test wrap.
	* testsuite/22_locale/time_get/get_date/char/2.cc: New test wrap.
	* testsuite/22_locale/time_get/get_monthname/char/1.cc: New test wrap.
	* testsuite/22_locale/time_get/get_monthname/char/2.cc: New test wrap.
	* testsuite/22_locale/time_get/get_time/char/1.cc: New test wrap.
	* testsuite/22_locale/time_get/get_time/char/2.cc: New test wrap.
	* testsuite/22_locale/time_get/get_weekday/char/1.cc: New test wrap.
	* testsuite/22_locale/time_get/get_weekday/char/2.cc: New test wrap.
	* testsuite/22_locale/time_get/get_year/char/1.cc: New test wrap.
	* testsuite/22_locale/time_put/put/char/1.cc: New test wrap.
	* testsuite/22_locale/time_put/put/char/2.cc: New test wrap.
	* testsuite/22_locale/time_put/put/char/3.cc: New test wrap.
	* testsuite/22_locale/time_put/put/char/4.cc: New test wrap.
	* testsuite/22_locale/time_put/put/char/5.cc: New test wrap.
	* testsuite/22_locale/time_put/put/char/6.cc: New test wrap.
	* testsuite/22_locale/time_put/put/char/7.cc: New test wrap.
	* testsuite/22_locale/time_put/put/char/8.cc: New test wrap.
	* testsuite/27_io/filebuf_virtuals.cc: New test wrap.
	* testsuite/27_io/ios_members.cc: New test wrap.
	* testsuite/27_io/ostream_inserter_arith.cc (test02): Make void.
	New test wrap.
	* testsuite/27_io/streambuf_members.cc: New test wrap.
	* testsuite/27_io/stringbuf_virtuals.cc: New test wrap.

From-SVN: r63975
2003-03-08 08:55:54 +00:00
Paolo Carlini feecf61403 re PR libstdc++/9424 (i/ostream::operator>>/<<(streambuf*) drops characters)
2003-03-08  Paolo Carlini <pcarlini@unitus.it>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/9424
	* include/bits/streambuf.tcc (__copy_streambufs): Use
	sgetn-sputn only when sputn cannot fail, otherwise fall back
	to safe snextc-sputc.
	* testsuite/27_io/streambuf_members.cc (test11, test12): Add.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r63974
2003-03-08 08:16:06 +00:00
Jerry Quinn 611db4979a locale_facets.tcc (num_put::do_put(bool)): Use locale cache for truename and falsename.
2003-03-08  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/locale_facets.tcc (num_put::do_put(bool)): Use
	locale cache for truename and falsename.

From-SVN: r63970
2003-03-08 06:28:20 +00:00
Jerry Quinn c562d51bb3 ios.cc (ios_base::ios_base): Correct order of _M_word and _M_word_size initialization.
2003-03-08  Jerry Quinn  <jlquinn@optonline.net>

	* src/ios.cc (ios_base::ios_base): Correct order of _M_word and
	_M_word_size initialization.

From-SVN: r63969
2003-03-08 06:17:11 +00:00
Paolo Carlini 9a97e40ae1 fstream.tcc (_M_convert_to_external): Set __elen to zero if codecvt::out eventually fails.
2003-03-07  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/fstream.tcc (_M_convert_to_external):
	Set __elen to zero if codecvt::out eventually fails.

From-SVN: r63954
2003-03-07 22:20:18 +00:00
Paolo Carlini 1deba98bd2 re PR libstdc++/9182 (basic_filebuf<> does not report errors in codecvt<>::out)
2003-03-07  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9182
	* include/bits/fstream.tcc (_M_really_overflow): Check
	for _M_convert_to_external possible failures.
	* include/std/std_fstream.h (sync): Check _M_really_overflow
	return value and return -1 in case of failure.
	* testsuite/27_io/filebuf_virtuals.cc (test13, test14): Add.

2003-03-07  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9826
	* include/bits/istream.tcc (operator>>(_CharT*),
	operator>>(basic_string&), ws): Pass a char_type to __ctype.is.
	* testsuite/27_io/stringstream.cc (test02): Add.

	* include/bits/istream.tcc (operator>>(_CharT*)):
	Assign a char_type to *__s.

From-SVN: r63953
2003-03-07 22:06:28 +00:00
Petur Runolfsson 5040d6912c re PR libstdc++/9817 (collate::compare doesn't handle nul characters.)
2003-03-07  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/9817
	* include/bits/locale_facets.tcc
	(collate::do_compare, collate::do_transform):
	Handle nul characters in input.
	* testsuite/22_locale/collate/compare/char/3.cc:  New test.
	* testsuite/22_locale/collate/compare/wchar_t/3.cc:  New test.
	* testsuite/22_locale/collate/transform/char/3.cc:  New test.
	* testsuite/22_locale/collate/transform/wchar_t/3.cc:  New test.

From-SVN: r63946
2003-03-07 17:24:47 +00:00
Jerry Quinn 53279c104f streambuf_iterator.h (_M_put): Set _M_failed if sputn fails.
2003-03-07  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/streambuf_iterator.h (_M_put): Set _M_failed if
	sputn fails.
	* testsuite/27_io/ostream_fail.cc: New test.

From-SVN: r63944
2003-03-07 14:14:11 +00:00
Matthias Klose 3bf74da29f Makefile.am (AM_MAKEFLAGS): Also pass gxx_include_dir.
2003-03-07  Matthias Klose  <doko@debian.org>

        * Makefile.am (AM_MAKEFLAGS): Also pass gxx_include_dir.
        FLAGS_TO_PASS: Set to AM_MAKEFLAGS
        * Makefile.in: Regenerate.
        * libsupc++/Makefile.am: Express glibcppinstalldir in terms
        of gxx_include_dir.
        AM_MAKEFLAGS: Pass gxx_include_dir.
        * libsupc++/Makefile.in: Regenerate.

From-SVN: r63939
2003-03-07 08:01:24 +00:00
Jerry Quinn a9aa7083ed ios_base_storage.cc (test02): Set exception mask.
2003-03-06  Jerry Quinn  <jlquinn@optonline.net>

	* testsuite/27_io/ios_base_storage.cc (test02): Set exception
	mask.  Test setting small-numbered pword and iword slots.  Test
	behavior at limit of numeric_limits::max.  Check that values are
	still good after failures.

From-SVN: r63908
2003-03-06 22:37:01 +00:00
Jerry Quinn 53ec7ec1f1 ios.cc (ios_base::_M_init): Remove _M_word_size.
2003-03-06  Jerry Quinn  <jlquinn@optonline.net>

	* src/ios.cc (ios_base::_M_init): Remove _M_word_size.
	(ios_base::ios_base): Set _M_word, _M_word_size.
	(ios_base::~ios_base): Remove redundant test.
	* testsuite/27_io/ios_base_storage.cc (test03): New.

From-SVN: r63896
2003-03-06 18:10:26 +00:00
Alexandre Oliva dd6eaaed37 strstream.cc, [...]: Remove incorrect whitespace added in my previous change.
* src/strstream.cc, include/bits/basic_string.tcc: Remove
incorrect whitespace added in my previous change.

From-SVN: r63869
2003-03-05 22:24:56 +00:00
Carlo Wood 0530d3b00b ios_base.h (ios_base::Init::_S_initialized()): Added _S_initialized() in order to allow debugging libraries to detect when...
2003-03-05  Carlo Wood  <carlo@alinoe.com>

        * include/bits/ios_base.h(ios_base::Init::_S_initialized()): Added
	_S_initialized() in order to allow debugging libraries to detect
	when the std streams are initialized from an overloaded operator
	new.

From-SVN: r63852
2003-03-05 18:53:18 +00:00
Benjamin Kosnik 83e924e101 demangle.h: Move to..
2003-03-05  Benjamin Kosnik  <bkoz@redhat.com>

	* libsupc++/demangle.h: Move to..
	* include/bits/demangle.h: ...here.
	* src/demangle.cc: Adjust include.
	* include/Makefile.am (bits_headers): Add.
	* include/Makefile.in: Regenerate.

From-SVN: r63851
2003-03-05 17:57:52 +00:00
Benjamin Kosnik 4e7a2c6f9a globals.cc: Clarify comments, remove c_locale_imp_compat.
2003-03-04  Benjamin Kosnik  <bkoz@redhat.com>

	* src/globals.cc: Clarify comments, remove c_locale_imp_compat.

	* config/linker-map.gnu: Filter typeinfo and vtable info.

From-SVN: r63826
2003-03-05 06:02:15 +00:00
Jerry Quinn c524ed5dc9 ios.cc (ios_base::_M_grow_words): Don't delete _M_word on new failure.
2003-03-04  Jerry Quinn  <jlquinn@optonline.net>

	* src/ios.cc (ios_base::_M_grow_words): Don't delete _M_word on
	new failure.  Throw exception if badbit and exception mask when ix
	>= numeric_limits<int>::max().

From-SVN: r63824
2003-03-05 03:01:42 +00:00
Alexandre Oliva 1a8f10da2c strstream.cc (strstreambuf::overflow): Make sure operands of min and max have the same type.
* src/strstream.cc (strstreambuf::overflow): Make sure operands of
min and max have the same type.
* include/bits/basic_string.tcc (append, rfind, compare): Likewise.

From-SVN: r63802
2003-03-04 21:21:44 +00:00
Benjamin Kosnik 6b919a8ab9 Makefile.am (allstamps): Remove stamp-std-precompile.
2003-03-04  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (allstamps): Remove stamp-std-precompile.
	* include/Makefile.in: Regenerate.

From-SVN: r63787
2003-03-04 16:22:17 +00:00
Benjamin Kosnik 3a15abf155 abi_check.cc (report_symbol_info): Add version info.
2003-03-03  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/abi_check.cc (report_symbol_info): Add version info.

	* config/linker-map.gnu: Hide more stuff.
	* include/Makefile.am: Cleanups.
	* include/Makefile.in: Regenerate.

From-SVN: r63764
2003-03-04 05:23:56 +00:00
Jerry Quinn 486f4cd1b2 messages_members.h (messages::messages): Remove name from unused parameter.
2003-02-27  Jerry Quinn  <jlquinn@optonline.net>

        * config/locale/generic/messages_members.h (messages::messages):
	Remove name from unused parameter.

From-SVN: r63545
2003-02-28 05:15:06 +00:00
Benjamin Kosnik 4ffbd0777c [multiple changes]
2003-02-27  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (sources): Add demangle.cc.
	(demangle.o): Add.
	(demangle.lo): Add.
	* src/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Remove old __cxa_demangle bits.
	* libsupc++/Makefile.in: Regenerate.

	* testsuite/testsuite_hooks.h
	(__gnu_cxx_test::verify_demangle): New.
	* testsuite/testsuite_hooks.cc: Define.

2003-02-27  Carlo Wood  <carlo@alinoe.com>

	* src/demangle.cc: New.
	* libsupc++/demangle.h: New.

2003-02-27  Benjamin Kosnik  <bkoz@redhat.com>
            Carlo Wood  <carlo@alinoe.com>

	* testsuite/demangle/abi_examples/01.cc: New.
	* testsuite/demangle/abi_examples/02.cc: New.
	* testsuite/demangle/abi_examples/03.cc: New.
	* testsuite/demangle/abi_examples/04.cc: New.
	* testsuite/demangle/abi_examples/05.cc: New.
	* testsuite/demangle/abi_examples/06.cc: New.
	* testsuite/demangle/abi_examples/07.cc: New.
	* testsuite/demangle/abi_examples/08.cc: New.
	* testsuite/demangle/abi_examples/09.cc: New.
	* testsuite/demangle/abi_examples/10.cc: New.
	* testsuite/demangle/abi_examples/11.cc: New.
	* testsuite/demangle/abi_examples/12.cc: New.
	* testsuite/demangle/abi_examples/13.cc: New.
	* testsuite/demangle/abi_examples/14.cc: New.
	* testsuite/demangle/abi_examples/15.cc: New.
	* testsuite/demangle/abi_examples/16.cc: New.
	* testsuite/demangle/abi_examples/17.cc: New.
	* testsuite/demangle/abi_examples/18.cc: New.
	* testsuite/demangle/abi_examples/19.cc: New.
	* testsuite/demangle/abi_examples/20.cc: New.
	* testsuite/demangle/abi_examples/21.cc: New.
	* testsuite/demangle/abi_examples/22.cc: New.
	* testsuite/demangle/abi_examples/23.cc: New.
	* testsuite/demangle/abi_examples/24.cc: New.
	* testsuite/demangle/abi_examples/25.cc: New.
	* testsuite/demangle/abi_examples/26.cc: New.
	* testsuite/demangle/abi_text/01.cc: New.
	* testsuite/demangle/abi_text/02.cc: New.
	* testsuite/demangle/abi_text/03.cc: New.
	* testsuite/demangle/abi_text/04.cc: New.
	* testsuite/demangle/abi_text/05.cc: New.
	* testsuite/demangle/abi_text/06.cc: New.
	* testsuite/demangle/abi_text/07.cc: New.
	* testsuite/demangle/abi_text/08.cc: New.
	* testsuite/demangle/abi_text/09.cc: New.
	* testsuite/demangle/abi_text/10.cc: New.
	* testsuite/demangle/abi_text/11.cc: New.
	* testsuite/demangle/abi_text/12.cc: New.
	* testsuite/demangle/abi_text/13.cc: New.
	* testsuite/demangle/abi_text/14.cc: New.
	* testsuite/demangle/regression/3111-1.cc: New.
	* testsuite/demangle/regression/3111-2.cc: New.
	* testsuite/demangle/regression/7986-01.cc: New.
	* testsuite/demangle/regression/7986-02.cc: New.
	* testsuite/demangle/regression/7986-03.cc: New.
	* testsuite/demangle/regression/7986-04.cc: New.
	* testsuite/demangle/regression/7986-05.cc: New.
	* testsuite/demangle/regression/7986-06.cc: New.
	* testsuite/demangle/regression/7986-07.cc: New.
	* testsuite/demangle/regression/7986-08.cc: New.
	* testsuite/demangle/regression/7986-09.cc: New.
	* testsuite/demangle/regression/7986-10.cc: New.
	* testsuite/demangle/regression/7986-11.cc: New.
	* testsuite/demangle/regression/7986-12.cc: New.
	* testsuite/demangle/regression/7986.cc: New.
	* testsuite/demangle/regression/8897.cc: New.
	* testsuite/demangle/regression/cw-01.cc: New.
	* testsuite/demangle/regression/cw-02.cc: New.
	* testsuite/demangle/regression/cw-03.cc: New.
	* testsuite/demangle/regression/cw-04.cc: New.
	* testsuite/demangle/regression/cw-05.cc: New.
	* testsuite/demangle/regression/cw-06.cc: New.
	* testsuite/demangle/regression/cw-07.cc: New.
	* testsuite/demangle/regression/cw-08.cc: New.
	* testsuite/demangle/regression/cw-09.cc: New.
	* testsuite/demangle/regression/cw-10.cc: New.
	* testsuite/demangle/regression/cw-11.cc: New.
	* testsuite/demangle/regression/cw-12.cc: New.
	* testsuite/demangle/regression/cw-13.cc: New.
	* testsuite/demangle/regression/cw-14.cc: New.
	* testsuite/demangle/regression/old.cc: New.

From-SVN: r63513
2003-02-27 16:57:26 +00:00
Phil Edwards bd2726e0ca Intro.3: Update with new (proper) names.
2003-02-25  Phil Edwards  <pme@gcc.gnu.org>

	* docs/doxygen/Intro.3:  Update with new (proper) names.
	* docs/doxygen/TODO:  Update.
	* docs/doxygen/run_doxygen:  More comments, fix up man pages.
	Fake entries for standard typedefs.
	* docs/doxygen/user.cfg.in:  Turn INLINE_INHERITED_MEMB back on.
	* docs/html/documentation.html:  Top-level man page is now called
	C++Intro.
	* include/std/std_limits.h:  Doxygenate.

From-SVN: r63433
2003-02-26 00:02:16 +00:00
Scott Snyder 63b1a6ba01 re PR libstdc++/9811 (incorrect documentation for std::map::lower_bound, etc.)
2003-02-25  Scott Snyder  <snyder@fnal.gov>

	PR libstdc++/9811
	* include/bits/stl_map.h (lower_bound, upper_bound, equal_range):
	Correct documentation.
	* include/bits/stl_multimap.h (lower_bound, upper_bound,
	equal_range): Likewise.

From-SVN: r63396
2003-02-25 06:27:10 +00:00
Paolo Carlini 57df94c8f6 re PR libstdc++/9825 (filebuf::sputbackc breaks sbumpc)
2003-02-24  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9825
	* src/fstream.cc
	(basic_filebuf<char/wchar_t>::_M_underflow_common): When
	__bump is true (uflow), always increment the read pointer
	(_M_in_cur) before returning successfully.
	* testsuite/27_io/filebuf_virtuals.cc (test12): Add.

From-SVN: r63378
2003-02-24 20:39:31 +00:00
Paolo Carlini 391cd0955e PR libstdc++/9404, PR libstdc++/9701 (partial)
2003-02-24  Paolo Carlini <pcarlini@unitus.it>
	    Nathan Myers <ncm@cantrip.org>

	PR libstdc++/9404, PR libstdc++/9701 (partial)
	(aka pptr == epptr implies overflow)
	* include/bits/fstream.tcc (_M_allocate_internal_buffer):
	Consistently, _M_out_end points to the end of the buffer just
	created.
	(overflow): Tweak to use _M_out_buf_size().
	(_M_convert_to_external): The role of the old _M_out_end is
	now played by _M_out_lim.
	(_M_really_overflow): Likewise.
	(seekoff): Likewise.
	(setbuf): _M_out_end points to the end of the external buffer.
	* include/bits/sstream.tcc (overflow): Rewrote, taking into
	account the resolution of DR 169 (TC).
	(seekoff): Use _M_string.capacity(); ios_base::end is now _M_out_lim.
	(seekpos): Use _M_string.capacity(); tweak.
	* include/bits/streambuf.tcc (sputc, xsputn): Remove comments.
	* include/std/std_fstream.h (sync): The role of the old
	_M_out_end is now played by _M_out_lim.
	(_M_set_indeterminate): Use _M_set_determinate.
	(_M_set_determinate): _M_out_end is now _M_out_lim.
	(_M_is_indeterminate): Likewise.
	* include/std/std_sstream.h (str()): _M_out_end is now _M_out_lim.
	(_M_stringbuf_init): Don't set _M_buf_size, unused for sstreams,
	which have the information readily available as _M_string.capacity();
	for ate and app modes, pass the string size to _M_really_sync.
	(_M_really_sync): Consistently set _M_out_end and _M_out_lim, to
	point to the end of the buffer (i.e., epptr) and to the string end,
	respectively.
	* include/std/std_streambuf.h: tweak comments, add _M_out_lim,
	which points to the right limit of the used put area.
	(_M_out_cur_move): The role of the old _M_out_end is now played
	by _M_out_lim.
	(_M_out_buf_size): Simplify: now (when _M_out_cur) return simply
	_M_out_end  - _M_out_cur (i.e., pptr), _very_ close to the letter
	of the standard.
	(basic_streambuf()): Initialize _M_out_lim too.
	* testsuite/27_io/filebuf_virtuals.cc (test10): Trivial tweak.
	* testsuite/27_io/filebuf_virtuals.cc (test11): Add.
 	* testsuite/27_io/stringbuf_virtuals.cc (test09): Add.

Co-Authored-By: Nathan Myers <ncm@cantrip.org>

From-SVN: r63367
2003-02-24 18:22:58 +00:00
Benjamin Kosnik 2e812a0a41 ios_base_storage.cc (main): Call set_memory_limits.
2003-02-24  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/ios_base_storage.cc (main): Call
	set_memory_limits.

From-SVN: r63366
2003-02-24 18:14:20 +00:00
Jerry Quinn d77478a5e5 locale_facets.tcc (_M_convert_float): Replace numpunct facet accesses with data from __locale_cache.
2003-02-21  Jerry Quinn  <jlquinn@optonline.net>

        * include/bits/locale_facets.tcc (_M_convert_float): Replace
	numpunct facet accesses with data from __locale_cache.

From-SVN: r63213
2003-02-21 08:34:18 +00:00
Phil Edwards 0385e9506b index.html (3.9): New note, wchar_t on FreeBSD.
2003-02-20  Phil Edwards  <pme@gcc.gnu.org>

	* docs/html/faq/index.html (3.9):  New note, wchar_t on FreeBSD.
	* docs/html/faq/index.txt:  Regenerate.

From-SVN: r63173
2003-02-20 17:57:05 +00:00
Phil Edwards 3a24c5134f linker-map.gnu: Also export locking symbols needed for the generic atomicity.h case.
2003-02-20  Phil Edwards  <pme@gcc.gnu.org>

	* config/linker-map.gnu:  Also export locking symbols needed for the
	generic atomicity.h case.

From-SVN: r63169
2003-02-20 16:47:39 +00:00
Alexandre Oliva 3343fdd21c configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to config.status.
* configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to
config.status.
* configure: Rebuilt.

From-SVN: r63159
2003-02-20 09:08:45 +00:00
Paolo Carlini c85dca2816 sstream.tcc (overflow): According to 27.7.1.3, p5, actual output is performed by sputc(c).
2003-02-19  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/sstream.tcc (overflow): According to
	27.7.1.3, p5, actual output is performed by sputc(c).

From-SVN: r63147
2003-02-20 00:55:45 +00:00
Phil Edwards 41662dbb4e re PR libstdc++/9582 (ODR violation in std::allocator)
2003-02-19  Phil Edwards  <pme@gcc.gnu.org>

	PR libstdc++/9582
	* include/bits/stl_alloc.h:  Remove all traces of assert().

From-SVN: r63136
2003-02-20 00:11:43 +00:00
Paolo Carlini de59bd27dc std_sstream.h (str()): the size of the current string may be different from the initial one whenever...
2003-02-18  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_sstream.h (str()): the size of the
	current string may be different from the initial one
	whenever _M_out_end > _M_out_beg.
	* testsuite/27_io/stringbuf_members.cc (test07): Add.

From-SVN: r63066
2003-02-18 23:26:32 +00:00
Paolo Carlini 14a65f50b0 re PR libstdc++/9582 (ODR violation in std::allocator)
2003-02-18  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9582
	* include/bits/stl_alloc.h (__pool_alloc::allocate):
	Remove assert.

From-SVN: r63031
2003-02-18 10:54:37 +00:00
Benjamin Kosnik 6067bea410 [multiple changes]
2003-02-17  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_ios.tcc (copyfmt): Copy locale data as well.
	* testsuite/27_io/ios_members.cc (test03): New.

2003-02-17  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/basic_ios.h (basic_ios::_M_cache_locale): Declare.
	(basic_ios::_M_cache_facets): Move into above.
	* include/bits/basic_ios.tcc (basic_ios::copyfmt): Rebuild locale
	cache.
	(basic_ios::imbue): Force locale cache to be built.
	(basic_ios::_M_init): Create and initialize locale cache.
	* include/bits/ios_base.h (__locale_cache_base): Declare.
	(ios_base::_M_locale_cache): New.
	(ios_base::_M_cache): Define.
	* include/bits/locale_facets.h:	(__num_base): Fix comment.  Add
	_S_end.
        (__locale_cache_base,__locale_cache<_CharT>):  New classes.
	(__locale_cache<char>, __locale_cache<wchar_t>): New specializations.
	* include/bits/locale_facets.tcc (num_put::_M_convert_int): Use locale
	cache literal string, grouping flag, thousands separator.
	(__locale_cache<_CharT>::__locale_cache): New.
	(__locale_cache<_CharT>::_M_init): New.
	(__locale_cache<_CharT>::_M_populate): New.
	* src/ios.cc: Clear _M_locale_cache in constructor.
	* src/locale-inst.cc (__locale_cache<char>, __locale_cache<_char_t>):
	New.

From-SVN: r63025
2003-02-18 05:45:07 +00:00
Paolo Carlini d407831d09 locale-inst.cc: Do not include <cassert>.
2003-02-17  Paolo Carlini  <pcarlini@unitus.it>

	* src/locale-inst.cc: Do not include <cassert>.
	* src/locale.cc: Likewise.

From-SVN: r63009
2003-02-17 21:42:05 +00:00
Paolo Carlini 1a1aed2466 re PR libstdc++/9580 (basic_filebuf<> with custom traits_type fails to link)
2003-02-17  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9580
	* include/std/std_fstream.h: Declare underflow and uflow
	specializations, change generic definitions to do nothing.
	* src/fstream.cc: Add underflow and uflow specializations.

From-SVN: r63008
2003-02-17 20:07:48 +00:00
Paolo Carlini 130cd3e1df re PR libstdc++/9169 (filebuf output fails if codecvt<>::out returns noconv)
2003-02-17  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9169
	* include/bits/fstream.tcc (_M_convert_to_external):
	Deal correctly with noconv, as prescribed by 27.8.1.4,p8.
	* testsuite/27_io/filebuf_virtuals.cc (test10): Add.

From-SVN: r63004
2003-02-17 19:05:01 +00:00
Benjamin Kosnik 1bc8b0ad4e c++config (_GLIBCPP_EXTERN_TEMPLATE): Define.
2003-02-13  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/c++config (_GLIBCPP_EXTERN_TEMPLATE): Define.
	* include/bits/basic_ios.tcc: Guard use of extern template.
	* include/std/std_iomanip.h: Same.
	* include/bits/streambuf.tcc: Same.
	* include/bits/stl_alloc.h: Same.
	* include/bits/locale_facets.tcc: Same.
	* include/bits/ostream.tcc: Same.
	* include/bits/istream.tcc: Same.
	* include/bits/fstream.tcc: Same.
	* include/bits/basic_string.tcc: Same.

From-SVN: r62865
2003-02-13 21:39:03 +00:00
Paolo Carlini b7bb6d4a6a ostream.tcc (sentry::sentry): Improve performance-wise the fix for libstdc++/9563.
2003-02-13  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/ostream.tcc (sentry::sentry): Improve
	performance-wise the fix for libstdc++/9563.

From-SVN: r62855
2003-02-13 17:43:58 +00:00
Phil Edwards 8d55a4aa3b atomicity.h (_Atomic_add_mutex): Fix declaration.
2003-02-12  Phil Edwards  <pme@gcc.gnu.org>

	* config/cpu/generic/atomicity.h (_Atomic_add_mutex):  Fix declaration.
	(_GLIBCPP_NEED_GENERIC_MUTEX):  Define for this file.
	(_Atomic_add_mutex_once, __gthread_atomic_add_mutex_once):  Declare
	when we don't have static mutex initialization.
	(__exchange_and_add):  Use _Atomic_add_mutex_once.
	* src/misc-inst.cc:  Definitions of all the above.

From-SVN: r62818
2003-02-13 04:02:20 +00:00
Paolo Carlini ff5d863fc2 re PR libstdc++/9563 (ostream::sentry returns true after a failed preparation)
2003-02-12  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9563
	* include/bits/ostream.tcc (sentry::sentry): Check
	the state of the stream after the preparation.
	* testsuite/27_io/ostream_sentry.cc (test02): Add.

From-SVN: r62779
2003-02-12 19:39:19 +00:00
Benjamin Kosnik ab77073fd7 Makefile.am (stamp-std-precompile): Add rule.
2003-02-11  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (stamp-std-precompile): Add rule.
	* include/Makefile.in: Regenerated.

From-SVN: r62752
2003-02-12 00:54:39 +00:00
Jerry Quinn ce3039af7d locale_facets.h (__num_base): Add _S_atoms_out.
2003-02-11 Jerry Quinn  <jlquinn@optonline.net>
           Benjamin Kosnik  <benjamin@redhat.com>

	* include/bits/locale_facets.h (__num_base): Add _S_atoms_out.
	Add indexes into this array.
	(__num_base::_S_atoms): To _S_atoms_in.
	(num_put::_M_insert): Rename to _M_pad.
	(num_put::_M_convert_int): Adjust remove __mod, __modl arguments.
	(num_put::_M_widen_int): Rename to _M_group_int.
	(num_put::_M_widen_float): Rename to _M_group_float.
	* include/bits/locale_facets.tcc (__int_to_char): New inline
	function and adapter functions.
	(num_put::_M_group_int): Streamline.
	(num_put::_M_group_float): Streamline.
	(num_put::_M_convert_int): Remove unused parameter names. Choose
	large enough buffer for text.  Use __int_to_char instead of
	__convert_from_v.  Formatted text is now at the end of the buffer.
	(num_put::_M_convert_float): Preliminary fixups.
	* src/locale-inst.cc (__convert_from_v<long long>): Add ifdef.
	(__int_to_char<unsigned long long>): Same.
	(__int_to_char<char, unsigned long>): New.
	(__int_to_char<char, unsigned long long>): New.
	(__int_to_char<wchar_t, unsigned long>): New.
	(__int_to_char<wchar_t, unsigned long long>): New.

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

From-SVN: r62731
2003-02-11 21:55:49 +00:00
Scott Snyder 74db146134 re PR libstdc++/9659 (3.3/3.4 seekoff overload problem with optimization)
2003-02-11  Scott Snyder  <snyder@fnal.gov>

	PR libstdc++/9659
	* include/bits/fstream.tcc (seekoff): Avoid operator+
	for pos_type.

From-SVN: r62712
2003-02-11 19:53:51 +00:00
Paolo Carlini dfc7d89965 re PR libstdc++/9320 (Incorrect usage of traits_type::int_type in stdio_filebuf)
2003-02-11  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9320
	* include/ext/stdio_filebuf.h
	(stdio_filebuf(int, std::ios_base::openmode, bool, int_type),
	stdio_filebuf(std::__c_file*, std::ios_base::openmode, int_type)):
	Change to take a __size parameter of type size_t, not
	of type (template parameter dependent) int_type.
	* src/ios.cc (ios_base::Init::_S_ios_create): Change type of
	size vars to size_t.
	* testsuite/ext/stdio_filebuf.cc: Add.

From-SVN: r62691
2003-02-11 10:43:49 +00:00
Paolo Carlini da61d02231 re PR libstdc++/9318 (i/ostream::operator>>/<<(streambuf*) broken)
2003-02-11  Paolo Carlini  <pcarlini@unitus.it>
	    Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/9318
	* include/bits/streambuf.tcc (__copy_streambufs):
	Don't conditionalize the copy to __testput.
	* testsuite/27_io/streambuf_members.cc (test09, test10): Add.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r62689
2003-02-11 09:59:19 +00:00
DJ Delorie 294901f879 acinclude.m4: Check for native targets that can't link at this point in the build.
* acinclude.m4: Check for native targets that can't link at
this point in the build.
* aclocal.m4: Regenerate.
* configure: Regenerate.

From-SVN: r62679
2003-02-11 00:50:01 -05:00
John David Anglin 5053bdf834 atomicity.h (__Atomicity_lock<__inst>::_S_atomicity_lock): Correct alignment.
* hppa/atomicity.h (__Atomicity_lock<__inst>::_S_atomicity_lock):
	Correct alignment.
	(__exchange_and_add, __atomic_add): Use PA 2.0 ordered store to reset
	lock.

From-SVN: r62593
2003-02-09 03:23:13 +00:00
Paolo Carlini ccef8307ff filebuf_virtuals.cc (test08): Fix for unsigned char platforms.
2003-02-07  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/filebuf_virtuals.cc (test08): Fix for
	unsigned char platforms.

From-SVN: r62519
2003-02-07 11:00:35 +00:00
Paolo Carlini afb6c265b7 re PR libstdc++/9562 (ostream::sentry::operator bool () should be const)
2003-02-06  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9562
	* include/std/std_istream.h
	(basic_istream::sentry::operator bool()): Make const.
	* include/std/std_ostream.h
	(basic_ostream::sentry::operator bool()): Likewise.
	* testsuite/27_io/istream_sentry.cc (test03): Add.
	* testsuite/27_io/ostream_sentry.cc: Add.

From-SVN: r62508
2003-02-07 00:26:44 +00:00
Paolo Carlini 5dc911525c re PR libstdc++/9548 (Incorrect results from setf(ios::fixed) and precision(-1) [DR231])
2003-02-06  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9548
	Implement resolution of DR 231 (Ready)
	* include/bits/locale_facets.h (__num_base::_S_format_float):
	Change declaration: return void, remove __prec parameter.
	* src/locale.cc (__num_base::_S_format_float): Implement
	resolution of DR 231.
	* include/bits/locale_facets.tcc (num_put::_M_convert_float):
	Tweak uses. Check for negative precision.
	* testsuite/22_locale/num_put/put/char/6.cc: Add
	* testsuite/22_locale/num_put/put/wchar_t/6.cc: Likewise.

From-SVN: r62492
2003-02-06 18:08:51 +00:00
Peter Soetens 6eeabb09a6 basic_file_libio.h: Fixups.
2003-02-06  Peter Soetens  <peter.soetens@mech.kuleuven.ac.be>

	* config/io/basic_file_libio.h: Fixups.
	* config/io/c_io_libio.h: Same.
	* libio/Makefile.am: Same.
	* libio/Makefile.in: Regenerated.

From-SVN: r62475
2003-02-06 08:10:47 +00:00
Benjamin Kosnik e61c8e230a [multiple changes]
2003-02-06  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/codecvt/encoding/wchar_t/1.cc (test01):
	Explicitly use the "C" locale.
	* testsuite/22_locale/codecvt/max_length/wchar_t/1.cc (test01): Same.

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

	DR 75
	DR 305
	PR libstdc++/9028 (partial)
	PR libstdc++/9224
	PR libstdc++/9246
	PR libstdc++/9247

	* src/codecvt.cc
	(codecvt<wchar_t, char, mbstate_t>::do_encoding,
	codecvt<wchar_t, char, mbstate_t>::do_length,
	codecvt<wchar_t, char, mbstate_t>::do_max_length):
	Move...
	* config/locale/generic/codecvt_members.cc:  ...here.
	* config/locale/gnu/codecvt_members.cc:  ...and here.

	* config/locale/generic/codecvt_members.cc,
	* config/locale/gnu/codecvt_members.cc
	(codecvt<wchar_t, char, mbstate_t>::do_encoding
	codecvt<wchar_t, char, mbstate_t>::do_in,
	codecvt<wchar_t, char, mbstate_t>::do_length,
	codecvt<wchar_t, char, mbstate_t>::do_max_length,
	codecvt<wchar_t, char, mbstate_t>::do_out):
	New implementation that handles stateless encodings,
	including UTF-8.

	* config/locale/generic/codecvt_members.cc,
	* config/locale/gnu/codecvt_members.cc,
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h,
	* include/bits/codecvt.h,
	* src/codecvt.cc
	(codecvt::length, codecvt::do_length):
	Change type of first argument of length and do_length from
	'const state_type&' to 'state_type&' according to DR 75.

	* testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc:  Cleanup.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc:  New test.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc:  New test.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc:  New test.
	* testsuite/22_locale/codecvt/encoding/wchar_t/1.cc:
	Cleanup and check for correct return value from encoding
	for "C" locale.
	* testsuite/22_locale/codecvt/encoding/wchar_t/2.cc:  New test.
	* testsuite/22_locale/codecvt/encoding/wchar_t/3.cc:  New test.
	* testsuite/22_locale/codecvt/encoding/wchar_t/4.cc:  New test.
	* testsuite/22_locale/codecvt/in/wchar_t/1.cc:  Cleanup.
	* testsuite/22_locale/codecvt/in/wchar_t/2.cc:  New test.
	* testsuite/22_locale/codecvt/in/wchar_t/3.cc:  New test.
	* testsuite/22_locale/codecvt/in/wchar_t/4.cc:  New test.
	* testsuite/22_locale/codecvt/in/wchar_t/5.cc:  New test.
	* testsuite/22_locale/codecvt/in/wchar_t/6.cc:  New test.
	* testsuite/22_locale/codecvt/in/wchar_t/7.cc:  New test.
	* testsuite/22_locale/codecvt/in/wchar_t/8.cc:  New test.
	* testsuite/22_locale/codecvt/in/wchar_t/9.cc:  New test.
	* testsuite/22_locale/codecvt/length/char/1.cc:  Cleanup.
	* testsuite/22_locale/codecvt/length/char/2.cc:  New test.
	* testsuite/22_locale/codecvt/length/wchar_t/1.cc:  Cleanup.
	* testsuite/22_locale/codecvt/length/wchar_t/2.cc:  New test.
	* testsuite/22_locale/codecvt/length/wchar_t/3.cc:  New test.
	* testsuite/22_locale/codecvt/length/wchar_t/4.cc:  New test.
	* testsuite/22_locale/codecvt/length/wchar_t/5.cc:  New test.
	* testsuite/22_locale/codecvt/length/wchar_t/6.cc:  New test.
	* testsuite/22_locale/codecvt/length/wchar_t/7.cc:  New test.
	* testsuite/22_locale/codecvt/max_length/wchar_t/1.cc:  Cleanup.
	* testsuite/22_locale/codecvt/max_length/wchar_t/2.cc:  New test.
	* testsuite/22_locale/codecvt/max_length/wchar_t/3.cc:  New test.
	* testsuite/22_locale/codecvt/max_length/wchar_t/4.cc:  New test.
	* testsuite/22_locale/codecvt/out/wchar_t/1.cc:  Cleanup.
	* testsuite/22_locale/codecvt/out/wchar_t/2.cc:  New test.
	* testsuite/22_locale/codecvt/out/wchar_t/3.cc:  New test.
	* testsuite/22_locale/codecvt/out/wchar_t/4.cc:  New test.
	* testsuite/22_locale/codecvt/out/wchar_t/5.cc:  New test.
	* testsuite/22_locale/codecvt/out/wchar_t/6.cc:  New test.
	* testsuite/22_locale/codecvt/out/wchar_t/7.cc:  New test.
	* testsuite/22_locale/codecvt/unicode/1.cc:  New test.
	* testsuite/22_locale/codecvt/unshift/wchar_t/1.cc:  Cleanup.
	* testsuite/22_locale/codecvt/unshift/wchar_t/2.cc:  New test.
	* testsuite/22_locale/codecvt/unshift/wchar_t/3.cc:  New test.
	* testsuite/22_locale/codecvt/unshfit/wchar_t/4.cc:  New test.

From-SVN: r62474
2003-02-06 06:24:21 +00:00
Benjamin Kosnik 2e2a38cd06 [multiple changes]
2003-02-05  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc (time_put::do_put): Use __write.
	(money_put::do_put): Same.

2003-02-05  Jerry Quinn  <jlquinn@optonline.net>

	* include/bits/ios_base.h (ios_base): Document reserved storage.

	* include/bits/locale_facets.h:	(struct __pad): Comment on
	implementation.
	(__verify_grouping): Same.
	(__add_grouping): Same.
	* include/bits/locale_facets.tcc (__verify_grouping): Move
	comments to declaration.
	(__add_grouping): Same.

	* include/bits/locale_facets.tcc:
	(__write<_CharT, _OutIter>): New function.
	(__write<_CharT>): New function specialization.
	(num_put::_M_insert): Remove explicit loop over iterator.  Use
	__write.
	(num_put::_M_widen_float): Remove __basefield.
	(num_put::_M_widen_int): Move __basefield to within grouping block.

	* include/bits/streambuf_iterator.h: Include <streambuf>.
	(ostreambuf_iterator::_M_put): Add.

From-SVN: r62473
2003-02-06 05:58:10 +00:00
Paolo Carlini 37d055f87f valarray_name_lookup.cc: Fix typo.
2003-02-05  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/26_numerics/valarray_name_lookup.cc: Fix typo.

From-SVN: r62450
2003-02-05 19:26:24 +00:00
Nathan Myers 7ec2271788 min_max.cc (test02): Add.
2003-02-04  Nathan Myers  <ncm@cantrip.org>

	* testsuite/25_algorithms/min_max.cc (test02): Add.

From-SVN: r62412
2003-02-04 23:42:21 +00:00
Paolo Carlini 52b62c0e1a PR libstdc++/9439, PR libstdc++/9425
2003-02-04  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9439, PR libstdc++/9425
	* config/io/basic_file_stdio.cc
	(__basic_file<char>::seekoff, seekpos): Return -1L if
	fseek fails.
	* include/bits/fstream.tcc (basic_filebuf::seekoff):
	Check _M_file.seekoff return value; always return
	pos_type(off_type(-1)) in case of failure.
	(basic_filebuf::pbackfail): Check this->seekoff return
	value and return traits_type::eof() in case of failure.
	* testsuite/27_io/filebuf_virtuals.cc (test09): Add.

From-SVN: r62408
2003-02-04 22:42:32 +00:00
Jerry Quinn 8d0a564bba std_ostream.h (ostream::_M_write): Declare.
2003-02-04  Jerry Quinn  <jlquinn@optonline.net>

	* include/std/std_ostream.h (ostream::_M_write): Declare.
        * ostream.tcc (ostream::_M_write): Define.
	(basic_ostream::write): Use it.
	(operator<<(basic_ostream, _CharT)): Ditto.
	(operator<<(basic_ostream, char)): Ditto.
	(operator<<(basic_ostream, _CharT*)): Ditto.
	(operator<<(basic_ostream, char*)): Ditto.
	(operator<<(basic_ostream, basic_string)): Ditto.

From-SVN: r62399
2003-02-04 20:56:50 +00:00
Benjamin Kosnik 431a736388 valarray_name_lookup.cc: Fix.
2003-02-04  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/26_numerics/valarray_name_lookup.cc: Fix.

From-SVN: r62398
2003-02-04 20:53:19 +00:00
Jonathan Wakely 6e40349a80 howto.html: Link to Dietmar Kuehl's IOStream page...
2002-02-04  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/27_io/howto.html: Link to Dietmar Kuehl's IOStream page,
	add HTML comment about updating links if numbering changes.

From-SVN: r62390
2003-02-04 18:24:07 +00:00
Paolo Carlini 7cd3907b57 [multiple changes]
2003-02-04  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9538
	* include/bits/streambuf.tcc (sputbackc): Access
	this->gptr()[-1] only if _M_in_beg < _M_in_cur.
	* testsuite/27_io/filebuf_virtuals.cc (test08): Add.

2003-02-04  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/9507
	* include/bits/fstream.tcc (open): If the 'ate' repositioning
	operation fails, calls close _and_ returns a null pointer
	to indicate failure (27.8.1.3,4).
	* testsuite/27_io/filebuf_members.cc (test_06): Add.

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

	* testsuite/27_io/filebuf_members.cc (test_04): Remove exit(0).

From-SVN: r62388
2003-02-04 18:08:45 +00:00
Jonathan Wakely e7cc090e91 howto.html: New section on stdio_filebuf.
2002-02-04  Jonathan Wakely  <redi@gcc.gnu.org>

	* docs/html/27_io/howto.html: New section on stdio_filebuf.
	* docs/html/ext/howto.html: Move stdio_filebuf notes to 27_io.
	* docs/html/documentation.html: Regenerate.

From-SVN: r62383
2003-02-04 17:42:19 +00:00
Joseph Myers b3a8389d18 fastjar.texi: Update to GFDL 1.2.
fastjar:
	* fastjar.texi: Update to GFDL 1.2.

gcc:
	* doc/gcc.texi, doc/gccint.texi, doc/gcov.texi,
	doc/include/fdl.texi, doc/invoke.texi: Update to GFDL 1.2.
	* doc/install.texi: Update copyright dates.  Update to GFDL 1.2.

gcc/ada:
	* gnat_rm.texi, gnat_ug.texi: Update to GFDL 1.2.
	* gnat_ug_unx.texi, gnat_ug_vms.texi, gnat_ug_vxw.texi,
	gnat_ug_wnt.texi: Regenerate.

gcc/f:
	* g77.texi, invoke.texi: Update to GFDL 1.2.

gcc/java:
	* gcj.texi: Update to GFDL 1.2.

gcc/treelang:
	* treelang.texi: Update to GFDL 1.2.

libiberty:
	* libiberty.texi: Update to GFDL 1.2.

libstdc++-v3:
	* docs/html/17_intro/porting.texi: Update to GFDL 1.2.
	* docs/html/17_intro/porting.html: Regenerate.

From-SVN: r62365
2003-02-04 01:27:53 +00:00