Commit Graph

677 Commits

Author SHA1 Message Date
Paolo Carlini b1af5a30a5 locale_facets.tcc (num_put::_M_widen_int): Deal correctly with grouped, showbased (oct or hex) zero.
2002-09-27  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/locale_facets.tcc (num_put::_M_widen_int):
	Deal correctly with grouped, showbased (oct or hex) zero.
	* testsuite/22_locale/num_put_members_char.cc: Add test05.
	* testsuite/22_locale/num_put_members_wchar_t.cc: Ditto.

From-SVN: r57598
2002-09-27 23:08:22 +00:00
Benjamin Kosnik ca017eef3a Makefile.am (target_headers): Remove cpu_limits.h.
2002-09-25  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (target_headers): Remove cpu_limits.h.
	* include/Makefile.in: Regenerate.
	* configure.in (CPU_LIMITS_INC_SRCDIR): Remove
	* configure: Regenerate.
	* configure.target (CPULIMITS): Remove.

	* include/std/std_limits.h: Remove cpu_limits.h include.

	* config/os/solaris/solaris2.7/os_defines.h (__glibcpp_long_bits):
	Remove.
	* config/os/irix/irix6.5/os_defines.h
	(__glibcpp_long_double_bits): Remove.
	(__glibcpp_wchar_t_bits): Remove.
	(__glibcpp_long_bits): Remove.
	* config/os/irix/irix5.2/os_defines.h
	(__glibcpp_long_double_bits): Remove.
	(__glibcpp_long_bits): Remove.
	* config/os/hpux/os_defines.h (__glibcpp_wchar_t_is_signed): Remove.
	* config/os/bsd/freebsd/os_defines.h:
	(__glibcpp_long_double_bits): Remove.
	* config/os/aix/os_defines.h (__glibcpp_wchar_t_bits): Remove.
	(__glibcpp_wchar_t_is_signed): Remove.
	(__glibcpp_long_bits): Remove.
	* config/os/gnu-linux/os_defines.h (__glibcpp_long_bits): Remove.
	(__glibcpp_long_double_bits): Remove.

	* config/os/osf/osf5.0/cpu_limits.h: Remove.
	* config/cpu/alpha/cpu_limits.h: Remove.
	* config/cpu/arm/cpu_limits.h: Remove.
	* config/cpu/cris/cpu_limits.h: Remove.
	* config/cpu/generic/cpu_limits.h: Remove.
	* config/cpu/generic/limits.h: Remove.
	* config/cpu/ia64/cpu_limits.h: Remove.
	* config/cpu/m68k/cpu_limits.h: Remove.
	* config/cpu/mmix/cpu_limits.h: Remove.
	* config/cpu/powerpc/cpu_limits.h: Remove.
	* config/cpu/S390/cpu_limits.h: Remove.

From-SVN: r57524
2002-09-26 05:25:14 +00:00
Peter Schmid dac2c906db numeric_limits.cc: Check the maximum and minimum values of the wchar_t type.
2002-09-25  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* testsuite/18_support/numeric_limits.cc: Check the maximum and
	minimum values of the wchar_t type.

From-SVN: r57512
2002-09-25 19:37:04 +00:00
Richard Henderson 6ad8f94953 std_limits.h (__glibcpp_plain_char_is_signed, [...]): Remove.
* include/std/std_limits.h (__glibcpp_plain_char_is_signed,
	__glibcpp_wchar_t_is_signed, __glibcpp_s8_max, __glibcpp_s8_min,
	__glibcpp_s8_digits, __glibcpp_s8_digits10, __glibcpp_u8_min,
	__glibcpp_u8_max, __glibcpp_u8_digits, __glibcpp_u8_digits10,
	__glibcpp_s16_max, __glibcpp_s16_min, __glibcpp_s16_digits,
	__glibcpp_s16_digits10, __glibcpp_u16_min, __glibcpp_u16_max,
	__glibcpp_u16_digits, __glibcpp_u16_digits10, __glibcpp_s32_max,
	__glibcpp_s32_min, __glibcpp_s32_digits, __glibcpp_s32_digits10,
	__glibcpp_u32_min, __glibcpp_u32_max, __glibcpp_u32_digits,
	__glibcpp_u32_digits10, __glibcpp_s64_max, __glibcpp_s64_min,
	__glibcpp_s64_digits, __glibcpp_s64_digits10, __glibcpp_u64_min,
	__glibcpp_u64_max, __glibcpp_u64_digits, __glibcpp_u64_digits10,
	__glibcpp_bool_digits, __glibcpp_signed_char_min,
	__glibcpp_signed_char_max, __glibcpp_signed_char_digits,
	__glibcpp_signed_char_digits10, __glibcpp_unsigned_char_min,
	__glibcpp_unsigned_char_max, __glibcpp_unsigned_char_digits,
	__glibcpp_unsigned_char_digits10, __glibcpp_char_min,
	__glibcpp_char_max, __glibcpp_char_digits, __glibcpp_char_digits10,
	__glibcpp_signed_short_min, __glibcpp_signed_short_max,
	__glibcpp_signed_short_digits, __glibcpp_signed_short_digits10,
	__glibcpp_unsigned_short_min, __glibcpp_unsigned_short_max,
	__glibcpp_unsigned_short_digits, __glibcpp_unsigned_short_digits10,
	__glibcpp_signed_int_min, __glibcpp_signed_int_max,
	__glibcpp_signed_int_digits, __glibcpp_signed_int_digits10,
	__glibcpp_unsigned_int_min, __glibcpp_unsigned_int_max,
	__glibcpp_unsigned_int_digits, __glibcpp_unsigned_int_digits10,
	__glibcpp_signed_long_min, __glibcpp_signed_long_max,
	__glibcpp_unsigned_long_digits, __glibcpp_unsigned_long_digits10,
	__glibcpp_signed_long_long_min, __glibcpp_signed_long_long_max,
	__glibcpp_signed_long_long_digits, __glibcpp_signed_long_long_digits10,
	__glibcpp_wchar_t_min, __glibcpp_wchar_t_max, __glibcpp_wchar_t_digits,
	__glibcpp_wchar_t_digits10): Remove.
	(__glibcpp_byte, __glibcpp_word_bits, __glibcpp_word): Remove.
	(__float_storage, __double_storage, __long_double_storage): Remove.
	(__glibcpp_signed, __glibcpp_min, __glibcpp_max): New.
	(__glibcpp_digits, __glibcpp_digits10): New.
	(numeric_limits<T>::min): Use __glibcpp_min or limits.h builtins.
	(numeric_limits<T>::max): Use __glibcpp_max or limits.h builtins.
	(numeric_limits<T>::is_signed, T=char,wchar_t): Use __glibcpp_signed.
	(numeric_limits<T>::digits): Use __glibcpp_digits.
	(numeric_limits<T>::digits10): Use __glibcpp_digits10.
	* testsuite/18_support/numeric_limits.cc (test03): Don't use
	__glibcpp_s8_digits10 et al; check vs the installed versions
	of digits10 for particular sizes.

        * include/std/std_limits.h (__glibcpp_float_is_modulo,
        __glibcpp_double_is_modulo, __glibcpp_long_double_is_modulo): Kill.
        (numeric_limits<T>::is_modulo, T floating): Use false.

From-SVN: r57434
2002-09-23 04:24:57 -07:00
Loren J. Rittle b433da3cac * testsuite/18_support/numeric_limits.cc (test_epsilon): New.
From-SVN: r57295
2002-09-19 04:26:25 +00:00
Richard Henderson 62f1a74c0f * testsuite/18_support/numeric_limits.cc: Add -mieee for alpha.
From-SVN: r57280
2002-09-18 11:06:13 -07:00
Richard Henderson 1472e41cb3 builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
gcc/
        * builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
        (BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New.
        * builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New.
        (__builtin_nans, __builtin_nansf, __builtin_nansl): New.
        * builtins.c (fold_builtin_nan): New.
        (fold_builtin): Call it.
        * real.c (real_nan): Parse a non-empty string.
        (round_for_format): Fix NaN significand truncation.
        * real.h (real_nan): Return bool.
        * doc/extend.texi: Document new builtins.

libstdc++/
        * include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
        __glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
        __glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
        __glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
        __glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
        __glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
        __glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
        __glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
        __glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
        __glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
        __glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
        __glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
        __glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
        __glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
        __glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
        __glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
        __glibcpp_long_double_has_SNaN): Remove.
        (__glibcpp_f128_is_iec559): True if IEEE.
        (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
        (__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
        (__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
        (std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
        (std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
        (std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
        (std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
        (std::numeric_limits<double>): Similarly.
        (std::numeric_limits<long double>): Similarly.
        * src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
        (__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
        (__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.

        * testsuite/18_support/numeric_limits.cc (test_infinity): New.
        (test_denorm_min, test_qnan, test_is_iec559): New.

From-SVN: r57221
2002-09-16 18:28:50 -07:00
Phil Edwards 0e9cab878b abi_check.cc: Pull shell fragments out into...
2002-09-16  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/abi_check.cc:  Pull shell fragments out into...
	* config/abi/extract_symvers:  ...here.  New file.
	* Makefile.am (check_abi):  Change to match.
	(new-abi-baseline):  New target.
	* Makefile.in:  Regenerated.

From-SVN: r57208
2002-09-16 18:58:48 +00:00
Benjamin Kosnik 38cca75024 Makefile.am (sources): Edit.
2002-09-10  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (sources): Edit.
	(target_sources): New.
	(target_sources_extra): New.
	* src/Makefile.in: Regenerate.
	* acinclude.m4: Set CCODECVT_CC.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* src/locale.cc: Move ctype definitions...
	* src/ctype.cc: ...here. New file.
	* src/locale.cc: Move codecvt definitions...
	* src/codecvt.cc: ...here.
	* config/generic/codecvt_members.cc: ...and here.
	* config/gnu/codecvt_members.cc: ...and here.
	* include/bits/codecvt.h: Tweak.
	* include/bits/locale_facets: Tweak.

	* src/bitset.cc: Correct license text.
	* src/concept-inst.cc: Same.
	* src/strstream.cc: Same.
	* src/vterminate.cc: Same.

From-SVN: r57020
2002-09-11 03:36:45 +00:00
Benjamin Kosnik f7be254940 configopts.html: Change grouping.
2002-09-09  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/configopts.html: Change grouping. Note ABI impacts.
	Update information for locale model defaults.
	* docs/html/install.html: Update include directory
	information.
	Update testing information.
	Update linux issues for named locales.
	* docs/html/abi.txt: Fix typos.
	Add more info.

	* src/misc-inst.cc: Add missing instantiations.

	* testsuite/abi_check.cc: Make output results more verbose.

	* config/os/gnu-linux/ctype_base.h: Remove shadow headers injections.

From-SVN: r56979
2002-09-09 20:26:42 +00:00
Paolo Carlini e2cbee7fd1 re PR libstdc++/7811 (default locale not taken from environment)
2002-09-05  Paolo Carlini  <pcarlini@unitus.it>
	    Roland McGrath  <roland@redhat.com>

	PR libstdc++/7811
	* src/locale.cc (locale::locale(__s)): Use getenv instead
	of setenv for the environment locale.
	* testsuite/22_locale/ctor_copy_dtor.cc (test03): New.

Co-Authored-By: Roland McGrath <roland@redhat.com>

From-SVN: r56865
2002-09-05 21:13:07 +00:00
Phil Edwards 5ec62d440b Makefile.am: Use LD_RUN_PATH when linking abi_check.
2002-09-01  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/Makefile.am:  Use LD_RUN_PATH when linking abi_check.
	Fix spelling in comment.
	* testsuite/Makefile.in:  Regenerate.
	* testsuite/abi_check.cc:  Use string literals to build 'cmd' rather
	than 'quote' and 'bslash'.

From-SVN: r56722
2002-09-01 18:09:18 +00:00
Phil Edwards 314b5a68e3 Makefile.am (check-abi): Specify current directory.
2002-08-23  Phil Edwards  <pme@gcc.gnu.org>

	* Makefile.am (check-abi):  Specify current directory.
	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE):  Fix shell syntax, use
	abi_baseline_triplet in baseline_file.
	* Makefile.in, aclocal.m4, configure:  Regenerate.
	* configure.target:  Add abi_baseline_triplet with default.
	* testsuite/abi_check.cc:  More error checking.

From-SVN: r56545
2002-08-23 19:33:41 +00:00
Benjamin Kosnik e21c2e1c38 acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Set GLIBCPP_BUILD_ABI_CHECK based on cross compiling, build, host variables.
2002-08-22  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Set
	GLIBCPP_BUILD_ABI_CHECK based on cross compiling, build, host
	variables.
	* aclocal.m4: Regenerate.
	* testsuite/Makefile.am (noinst_PROGRAMS): Make conditional on
	native compiling.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r56531
2002-08-23 03:39:51 +00:00
Loren J. Rittle 809abaff7e * testsuite/abi_check.cc: Support older binutils/readelf.
From-SVN: r56530
2002-08-23 02:57:11 +00:00
Loren J. Rittle 1f8151cf73 abi_check.cc: Enhance shell portability.
* testsuite/abi_check.cc: Enhance shell portability.
	* config/abi/i386-unknown-freebsd4.6: Add.
	* config/abi/i386-unknown-freebsd4.6/baseline_symbols.txt: New file.

From-SVN: r56527
2002-08-23 01:50:15 +00:00
Benjamin Kosnik 747d096709 Makefile.am (check-abi): New rule.
2002-08-22  Benjamin Kosnik  <bkoz@redhat.com>
	    Phil Edwards  <pme@gcc.gnu.org>
	    Ulrich Drepper  <drepper@redhat.com>

	* Makefile.am (check-abi): New rule.
	* Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Export baseline_file.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.am (noinst_PROGRAMS): Add abi_check.
	(abi_check_SOURCES): Add.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/abi_check.cc: New file.
	* config/abi: Add.
	* config/abi/i686-pc-linux-gnu: Add.
	* config/abi/i686-pc-linux-gnu/baseline_symbols.txt: New file.

Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>
Co-Authored-By: Ulrich Drepper <drepper@redhat.com>

From-SVN: r56515
2002-08-22 20:06:01 +00:00
Danny Smith f45f9aedfc istream.tcc (basic_istream::ignore): Use sbumpc, not snextc.
2002-08-08  Danny Smith  <dannysmith@users.sourceforge.net>
            Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/istream.tcc (basic_istream::ignore): Use sbumpc,
	not snextc.
	* testsuite/27_io/narrow_stream_objects.cc (test10): Add.

From-SVN: r56154
2002-08-09 06:00:46 +00:00
Danny Smith a2554733cc istream.tcc (basic_istream::ignore): Use sbumpc, not snextc.
2002-08-08  Danny Smith  <dannysmith@users.sourceforge.net>
            Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/istream.tcc (basic_istream::ignore): Use sbumpc,
	not snextc.

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

From-SVN: r56153
2002-08-09 06:00:18 +00:00
Gabriel Dos Reis 7a9ffd82b6 valarray_name_lookup.cc: Rename from testsuite/26_numerics/valarray_name_lookup.C
* testsuite/26_numerics/valarray_name_lookup.cc: Rename from
	testsuite/26_numerics/valarray_name_lookup.C

From-SVN: r56008
2002-08-03 19:56:17 +00:00
Gabriel Dos Reis 971cfc6f10 valarray_array.h (_DEFINE_ARRAY_FUNCTION): Use our object function surrogates.
* include/bits/valarray_array.h (_DEFINE_ARRAY_FUNCTION): Use our
	object function surrogates.
	* include/bits/valarray_meta.h (__shift_left): Fix typo.
	(_BinFunClos<>): Remove.
	(_BinFunBase<>): Likewise.
	(_BinFunBase1<>):Likewise.
	(_BinFunBase2<>): Likewise.
	(_DEFINE_EXPR_RELATIONAL_OPERATOR): Likewise.
	(_DEFINE_EXPR_UNARY_OPERATOR): Adjust definition.
	(_DEFINE_EXPR_BINARY_OPERATOR): Likewise.
	(_DEFINE_EXPR_BINARY_FUNCTION): Likewise.
	* include/std/std_valarray.h: Dont #include <functional> anymore.
	(_Bitwise_or<>, _Bitwise_and<>, _Bitwise_xor<>, _Shift_left<>,
	_Shift_right<>): Remove.
	(_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT): Adjust instantiation.
	(_DEFINE_BINARY_OPERATOR): Tweak definition.
	(_DEFINE_LOGICAL_OPERATOR): Remove.
	* testsuite/26_numerics/valarray_name_lookup.C (main): Add more tests.

From-SVN: r56001
2002-08-02 23:08:40 +00:00
Gabriel Dos Reis 74d6b8ca63 valarray_meta.h (_UnFunBase<>): Remove.
* include/bits/valarray_meta.h (_UnFunBase<>): Remove.
	(_UnFunClos<>): Same.
	(_UnBase<>): Reformat.  Make first template-parameter non
	template.
	(_UnClos<>): Likewise.
	(_Expr<>): Reformate.  Adjust unary member operator return types.
	(_DEFINE_EXPR_UNARY_OPERATOR): Adjust definition.
	(_DEFINE_EXPR_UNARY_FUNCTION): Likewise.
	* include/std/std_valarray.h (_UnClos<>): Adjust declaration.
	(valarray<>::_UnaryOp<>):  New nested traits. Adjust unary member
	operator return types.  Reformat.
	(_Bitwise_not): Remove.
	(_DEFINE_VALARRAY_UNARY_OPERATOR): Adjust definition.
	* testsuite/26_numerics/valarray_name_lookup.C: New test.

From-SVN: r55993
2002-08-02 18:10:38 +00:00
Benjamin Kosnik 49bc23b7f9 Revert PR libstdc++/6594
2002-08-02  Benjamin Kosnik  <bkoz@redhat.com>

	Revert PR libstdc++/6594
	* src/strstream.cc (strstreambuf): Revert.
	(strstreambuf::overflow): Same.
	(strstreambuf::~strstreambuf): Same.
	* testsuite/backward/strstream_members.cc (test02): Add.

	* docs/html/abi.txt: Update. Spell check.

	* testsuite/19_diagnostics/stdexceptions.cc (test04): Add bool test.

	* testsuite/Makefile.am (INCLUDES): Add LIBSUPCXX_INCLUDES.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/testsuite_hooks.h: Use __throw_exception_again,
	include functexcept.h so that -fno-exceptions will build.

From-SVN: r55988
2002-08-02 16:04:16 +00:00
Benjamin Kosnik f13a69eccf char_traits.h: Remove generic definitions.
2002-07-30  Benjamin Kosnik  <bkoz@redhat.com>
            Gabriel Dos Reis  <gdr@nerim.net>

	* include/bits/char_traits.h: Remove generic definitions.
	* include/bits/streambuf_iterator.h (istreambuf_iterator): Use
	eof, not -2.
	* include/bits/istream.tcc (istream::readsome): Don't check
	against eof, instead use constants.
	(istream::sync): Same.
	(istream::sentry::sentry): Use eq_int_type.
	(istream::get): Same.
	* include/bits/ostream.tcc: Change __pad to
	__pad<_CharT, _Traits>::_S_pad.
	* include/bits/locale_facets.h: Add __pad_traits generic and
	ostreambuf_iterator specialization.
	* include/bits/locale_facets.tcc: Change __pad into struct __pad
	with a _CharT and _Traits template parameter and _S_pad static
	member function.
	* src/locale-inst.cc: Update __pad instantiations.

	* include/std/std_fstream.h: Declare _M_underflow_common
	specializations.
	* src/fstream.cc: New. Add _M_underflow_common specializations.
	* include/bits/fstream.tcc (filebuf::close): Use traits_type.
	(filebuf::_M_underflow_common(bool)): Remove generic version, as
	sys_ungetc and custom int_types don't get along.
	* include/std/std_streambuf.h: Add _M_pos.
	* src/Makefile.am (sources): Add fstream.cc.
	* src/Makefile.in: Regenerate.

	* testsuite/21_strings/capacity.cc: Add char_traits specializations.
	* testsuite/22_locale/codecvt_members_unicode_char.cc: Same.
	* testsuite/22_locale/codecvt_members_unicode_wchar_t.cc: Same.
	* testsuite/22_locale/ctor_copy_dtor.cc: Same.
	* testsuite/27_io/filebuf_virtuals.cc (test07): Move to...
	* testsuite/27_io/filebuf.cc: ...here.
	* testsuite/testsuite_hooks.h: Add gnu_char, gnu_int, char_traits
	specialization for both.
	* testsuite/27_io/streambuf.cc: Add instantiation test,
	testsuite_hooks include.
	* testsuite/27_io/istream.cc: Same.
	* testsuite/27_io/ostream.cc: Same.
	* testsuite/27_io/fstream.cc: Same.
	* testsuite/27_io/stringstream.cc: Same.
	* testsuite/27_io/filebuf.cc: Same.
	* testsuite/27_io/stringbuf.cc: Same.

Co-Authored-By: Gabriel Dos Reis <gdr@nerim.net>

From-SVN: r55893
2002-07-31 02:47:36 +00:00
Benjamin Kosnik bcc6a03a0a re PR libstdc++/7216 (basic_iostream::traits_type is ambiguous issue)
2002-07-25  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/7216
	* include/std/std_istream.h (basic_iostream): Add typedefs for
	char_type, int_type, pos_type, off_type, and traits_type.
	* testsuite/27_io/iostream.cc (test01): Add typedef tests.
	* testsuite/27_io/istream.cc: Same.
	* testsuite/27_io/ostream.cc: Same.
	* testsuite/27_io/filebuf.cc: Same.
	* testsuite/27_io/stringbuf.cc: Replace content, move to...
	* testsuite/27_io/stringbuf_members.cc: ...here.
	* testsuite/27_io/streambuf.cc: Replace content, move to...
	* testsuite/27_io/streambuf_members.cc: ...here.
	* testsuite/27_io/stringstream.cc: Replace content, move to...
	* testsuite/27_io/stringstream_members.cc: ...here.
	* testsuite/27_io/ios.cc: New file.
	* testsuite/27_io/fstream.cc: New file.
	* testsuite/27_io/ifstream.cc: New file.
	* testsuite/27_io/ofstream.cc: New file.
	* testsuite/27_io/istringstream.cc: New file.
	* testsuite/27_io/ostringstream.cc: New file.

From-SVN: r55767
2002-07-26 01:49:36 +00:00
Benjamin Kosnik 325fceb395 re PR libstdc++/7220 (g++ 3.1: basic_istream::ignore(0,delimiter) issue.)
2002-07-25  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/7220
	* include/bits/istream.tcc (istream::ignore): Don't extract on
	zero.
	* testsuite/27_io/istream_unformatted.cc (test10): Add.

From-SVN: r55763
2002-07-25 23:20:49 +00:00
Benjamin Kosnik ef6838b11c ios_base_type.cc: Move to...
2002-07-25  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/ios_base_type.cc: Move to...
	* testsuite/27_io/ios_base_types.cc: ...here.

From-SVN: r55743
2002-07-25 07:19:40 +00:00
Benjamin Kosnik c82efc81c0 re PR libstdc++/7222 (g++ 3.1: locale::operator ==() doesn`t work on std::locale("") locales)
2002-07-24  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/7222
	* src/locale.cc (locale::locale(const char*)): Use setlocale NULL.
	* testsuite/22_locale/ctor_copy_dtor.cc (test02): New.

From-SVN: r55736
2002-07-25 06:42:00 +00:00
Benjamin Kosnik 9a56333e55 re PR libstdc++/7230 (<strstream> header file is missing (trunk))
2002-07-24  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/7230
	* config/linker-map.gnu: Revert strstream patch from 2002-07-01.
	* include/Makefile.am (backward_headers): Use strstream, not
	strstream.h.
	* include/Makefile.in: Regenerate.
	* include/backward/strstream: Revert.
	* include/backward/strstream.h: Remove.
	* src/strstream.cc: Revert.
	* testsuite/backward/strstream_members.cc: Change include.

From-SVN: r55730
2002-07-25 00:04:37 +00:00
Benjamin Kosnik 922045978d re PR libstdc++/7219 (_GLIBCPP_DEPRECATED on (ios_base::streamoff and ios_base::streampos types))
2002-07-24  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/7219
	* testsuite/27_io/ios_base_type.cc: New.
	* include/bits/ios_base.h (ios_base::streampos): Add.
	(ios_base::streamoff): Add.

From-SVN: r55726
2002-07-24 23:17:13 +00:00
Benjamin Kosnik 51937d2c98 re PR libstdc++/7286 (placement operator delete issue)
2002-07-24  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/7286
	* libsupc++/new: Add placement delete.
	* testsuite/18_support/new_delete_placement.cc: New.

	* docs/html/abi.txt: Fix typos.

From-SVN: r55718
2002-07-24 19:49:21 +00:00
Gabriel Dos Reis 5068f54685 Makefile.am (bits_headers): Remove slice.h
* include/Makefile.am (bits_headers): Remove slice.h
	* include/Makefile.in: Regenerate.
	* include/bits/slice.h (slice): move to include/bits/slice_array.h
	* include/bits/slice.h Remove.
	* include/std/std_valarray.h: Don't #include bits/slice.h anymore.
	* include/bits/slice_array.h: Comply to official coding styles.
	* testsuite/26_numerics/slice.cc: New test.
:w
:q

From-SVN: r55470
2002-07-16 00:19:18 +00:00
Paolo Carlini 276e31ec6e re PR libstdc++/7186 (DR179 for std::deque::iterator and const_iterator)
2002-07-07  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/7186
	* include/bits/stl_deque.h (_Deque_iterator::operator-):
	Make non-member, as already happens for the comparison
	operators in accord with DR179 (Ready).
	* testsuite/23_containers/deque_operators.cc: Add test02.

From-SVN: r55301
2002-07-07 10:15:06 +00:00
Benjamin Kosnik 5acf59f8e1 std_memory.h: Fix formatting.
2002-07-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/std_memory.h: Fix formatting.
	* testsuite/20_util/auto_ptr_neg.cc: New.
	* testsuite/20_util/auto_ptr.cc: Tweaks.
	* testsuite/23_containers/map_operators.cc (test01): Split into..
	* testsuite/23_containers/map_operators_neg.cc (test01): ...this. New.
	* testsuite/23_containers/set_operators.cc: Move to...
	* testsuite/23_containers/set_operators_neg.cc: ...here.
	* testsuite/README: Add some more naming rules.

From-SVN: r55241
2002-07-04 07:25:19 +00:00
Steev Wilcox ec4d88f907 re PR libstdc++/7057 (Operator== on hashtables doesn't appear to work correctly (patch included))
2002-07-03  Steev Wilcox  <steev@paradigmds.com>

	PR libstdc++/7057
	* include/ext/stl_hashtable.h: Fix.
	* testsuite/ext/hash_map.cc: New.

From-SVN: r55229
2002-07-04 00:28:03 +00:00
Jack Reeves 16ad69a19d re PR libstdc++/3946 (auto_ptr_ref constructor allows dangerous conversion)
2002-07-03  Jack Reeves  <jackw_reeves@hotmail.com>
            Kenny Simpson  <theonetruekenny@yahoo.com>
            Phil Edwards  <pme@gcc.gnu.org>

	PR libstdc++/3946
	* testsuite/20_util/auto_ptr.cc (test08):  New test.
	* include/std/std_memory.h (auto_ref_ptr):  Make constructor explicit.
	(auto_ptr::operator auto_ptr_ref):  Fix typo.
	General reformatting and doxygenating of the whole file.

Co-Authored-By: Kenny Simpson <theonetruekenny@yahoo.com>
Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>

From-SVN: r55223
2002-07-03 22:25:06 +00:00
Paolo Carlini d16ecaec1d re PR libstdc++/6642 (Constness prevents substraction of iterators)
2002-07-02  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/6642
	* include/bits/stl_iterator.h
	(__normal_iterator::operator-(const __normal_iterator&)):
	Make non-member, as already happens for the comparison
	operators in accord with DR179 (Ready).
	* testsuite/24_iterators/iterator.cc: Add test from the PR.

From-SVN: r55188
2002-07-02 18:42:58 +00:00
Phil Edwards 446c5b11aa PR libstdc++/7157, PR libstdc++/7158, PR libstdc++/7161
2002-06-28  Phil Edwards  <pme@gcc.gnu.org>

	PR libstdc++/7157, PR libstdc++/7158, PR libstdc++/7161
	* include/std/std_queue.h:  Include deque.tcc, vector.tcc.
	* include/std/std_stack.h:  Include deque.tcc.
	* testsuite/23_containers/adaptors.cc:  New file.

From-SVN: r55090
2002-06-29 01:10:51 +00:00
Benjamin Kosnik 41970073a9 configure.in (INTERFACE): Remove.
2002-06-26  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.in (INTERFACE): Remove.
	(release_VERSION): Remove.
	* acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Change include placement.
	(libstdcxx_interface): Change. Use gcc methods to determine version.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r55028
2002-06-27 10:16:50 +00:00
Benjamin Kosnik 8081da07e5 c_compatibility: New.
2002-06-21  Benjamin Kosnik  <bkoz@redhat.com>

	* include/c_compatibility: New.
	* include/c_compatibility/assert.h: New.
	* include/c_compatibility/ctype.h: New.
	* include/c_compatibility/errno.h: New.
	* include/c_compatibility/float.h: New.
	* include/c_compatibility/iso646.h: New.
	* include/c_compatibility/limits.h: New.
	* include/c_compatibility/locale.h: New.
	* include/c_compatibility/math.h: New.
	* include/c_compatibility/setjmp.h: New.
	* include/c_compatibility/signal.h: New.
	* include/c_compatibility/stdarg.h: New.
	* include/c_compatibility/stddef.h: New.
	* include/c_compatibility/stdio.h: New.
	* include/c_compatibility/stdlib.h: New.
	* include/c_compatibility/string.h: New.
	* include/c_compatibility/time.h: New.
	* include/c_compatibility/wchar.h: New.
	* include/c_compatibility/wctype.h: New.

	* include/c/std_cerrno.h: Get out of the way... define errno.
	* include/c/std_cmath.h: Add abs, modf overloads.
	Undefine C99 isms. Still not sure how to deal with this sanely.
	* include/c/std_csetjmp.h: Tweak.
	* include/c/std_cwchar.h: Include cstddef for size_t.

	* include/c_std/std_cmath.h: Remove extra function.

	Pendantic std usage in testsuites.
	* testsuite/17_intro/header_cstdlib.cc (test01): Qualify ldiv_t
	with std.
	* testsuite/17_intro/header_cwchar.cc: Tweak.
	* testsuite/22_locale/codecvt_members_char_char.cc (test03): Use
	std::setlocale.
	* testsuite/22_locale/ctype_to_wchar_t.cc (test05): Same.
	* testsuite/22_locale/ctype_to_char.cc (test05): Same.
	* testsuite/22_locale/ctype_is_wchar_t.cc (test05): Same.
	* testsuite/22_locale/ctype_is_char.cc (test05): Same.
	* testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Same.
	* testsuite/22_locale/time_get_members_wchar_t.cc (test08): Same.
	* testsuite/22_locale/time_get_members_char.cc (test08): Same.
	* testsuite/22_locale/time_put_members_wchar_t.cc (test04): Same.
	* testsuite/22_locale/time_put_members_char.cc (test04): Same.
	* testsuite/22_locale/num_put_members_wchar_t.cc (test04): Same.
	* testsuite/22_locale/num_put_members_char.cc (test04): Same.
	* testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Same.
	* testsuite/22_locale/numpunct_members_char.cc (test03): Same.
	* testsuite/22_locale/num_get_members_wchar_t.cc: Same.
	* testsuite/22_locale/num_get_members_char.cc: Same.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test07): Same.
	* testsuite/22_locale/money_put_members_char.cc (test07): Same.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Same.
	* testsuite/22_locale/moneypunct_members_char.cc (test03): Same.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test08): Same.
	* testsuite/22_locale/money_get_members_char.cc (test08): Same.
	* testsuite/22_locale/messages_members_char.cc (test03): Same.
	* testsuite/22_locale/collate_members_wchar_t.cc (test04): Same.
	* testsuite/22_locale/collate_members_char.cc (test04): Same.
	* testsuite/26_numerics/fabs_inline.cc: Use std::printf.
	* testsuite/27_io/istream_seeks.cc (test02): Qualify abort.
	* testsuite/27_io/istream_extractor_arith.cc (test11): Qualify strtol.

From-SVN: r54891
2002-06-21 20:21:03 +00:00
Benjamin Kosnik e01c9849c9 Makefile.am: Add rules.
2002-06-20  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am: Add rules.
	* include/Makefile.in: Regenerate.

	* acinclude.m4: Define GLIBCPP_C_HEADERS_COMPATIBILITY.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* configure.target (c_model, c_compatibility): Add.

	* libsupc++/Makefile.am (c_sources): New.
	(libsupc___la_SOURCES): Add c_sources.
	(LTCOMPILE): Remove INCLUDES.
	(GCC_INCLUDES): New.
	(C_COMPILE): New, like COMPILE but without INCLUDES.
	(cxa_demangle.o): Use C_COMPILE.
	(dyn-string.o): Use C_COMPILE.

	* include/c/std_cstdarg.h: Define __need___va_list.
	* include/c/std_cstddef.h: Define need_size_t, need_ptrdiff_t,
	need_NULL, need_offsetof.

From-SVN: r54849
2002-06-20 19:08:42 +00:00
Benjamin Kosnik 93b855862a std_cwchar.h: Guard.
2002-06-18  Benjamin Kosnik  <bkoz@redhat.com>

	* include/c/std_cwchar.h: Guard. Add mbstate_t bits.
	* include/c/std_cwctype.h: Guard.

	* libsupc++/eh_alloc.cc: Tweak include order.
	* libsupc++/pure.cc: Use cstdio.
	* libsupc++/new_op.cc: Remove malloc forward declaration, as
	cstdlib brings it in. Use std::malloc.

	* src/Makefile.am (sources): Remove cmath.cc.
	* src/Makefile.in: Regenerate.
	* src/cmath.cc: Remove.

From-SVN: r54782
2002-06-19 15:19:53 +00:00
Phil Edwards 2c839a4e1f configure.host: Delete file.
2002-06-18  Phil Edwards  <pme@gcc.gnu.org>

	* configure.host:  Delete file.
	* configure.target:  More documentation.  Factor out common parts of
	script into "intelligent" settings about defaults.  Remove redundancy.

	* acinclude.m4:  Update comments.  Do not call configure.host.
	(GLIBCPP_ENABLE_SYMVERS):  If disabled, do not bother checking for
	libgcc_s.
	* configure.in:  Slight reformatting, more comments.  Factor out
	"config/" from all the directories.
	* docs/html/17_intro/porting.texi:  Update and expand.
	* testsuite/Makefile.am (AM_RUNTESTFLAGS):  Move empty setting
	from configure.host.

	* aclocal.m4, configure, docs/html/17_intro/porting.html,
	testsuite/Makefile.in:  Regenerate.

From-SVN: r54757
2002-06-18 19:07:12 +00:00
Loren J. Rittle 158d04aa28 acinclude.m4 (GLIBCPP_CHECK_SETRLIMIT_ancilliary): Reorder and include all required headers for test against older POSIX standard.
* acinclude.m4 (GLIBCPP_CHECK_SETRLIMIT_ancilliary): Reorder and
	include all required headers for test against older POSIX standard.
	(GLIBCPP_CHECK_SETRLIMIT): Likewise.
	(ac_setrlimit): Likewise.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/testsuite_hooks.cc: Reorder and include all
	required headers for use against older POSIX standard.

From-SVN: r54452
2002-06-10 20:52:12 +00:00
Benjamin Kosnik 497e42fdf4 [multiple changes]
2002-06-08  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/backwards/strstream_members.cc: New.

2002-06-08  Benjamin Kosnik  <bkoz@redhat.com>

	* include/backwards/strstream: Format.
	* src/strstream.cc: Format.

2002-06-08  Andreas Schwab  <schwab@suse.de>

	* src/strstream.cc (strstreambuf::overflow): Set _M_buf,
	_M_buf_size and _M_buf_size_opt to the new buffer and size.

From-SVN: r54375
2002-06-08 15:14:56 +00:00
Phil Edwards ce5c872270 mkcheck.in: Link against local testsuite library.
2002-06-07  Phil Edwards  <pme@gcc.gnu.org>

	* mkcheck.in:  Link against local testsuite library.
	* testsuite/testsuite_hooks.h (__set_testsuite_memlimit):  Move null
	implementation out...
	* testsuite/testsuite_hooks.cc:  ...to here.

From-SVN: r54349
2002-06-07 20:25:04 +00:00
Loren J. Rittle 8b5fd4691d Makefile.am (AUTOMAKE_OPTIONS): Use cygnus-style generation.
* src/Makefile.am (AUTOMAKE_OPTIONS): Use cygnus-style generation.
	* include/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
	* testsuite/Makefile.am (AUTOMAKE_OPTIONS): Likewise.
	* src/Makefile.in: Regenerate (explicitly with --cygnus option).
	* testsuite/Makefile.in: Likewise.

From-SVN: r54310
2002-06-06 07:32:57 +00:00
Rainer Orth d6c7e0738b libstdc++-v3-dg.exp (libstdc++-v3_target_compile): Search correct multilib testsuite dir for libv3test.
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3_target_compile):
	Search correct multilib testsuite dir for libv3test.

From-SVN: r54256
2002-06-04 18:44:35 +00:00
Paolo Carlini 05261e700c 2002-06-04 Paolo Carlini <pcarlini@unitus.it>
Gaby Dos Reis  <gdr@codesourcery.com>

	* include/bits/basic_string.tcc
	(basic_string::_S_construct(forward_iterator_tag):
	Fix typo in null pointer check.
	* testsuite/21_strings/ctor_copy_dtor.cc: Add test04.

Co-Authored-By: Gabriel Dos Reis <gdr@codesourcery.com>

From-SVN: r54255
2002-06-04 18:20:38 +00:00
Paolo Carlini 23992195af 2002-06-04 Paolo Carlini <pcarlini@unitus.it>
* testsuite/22_locale/money_get_members_char.cc
	(test02): Add decimal point to long double constants.
	* testsuite/22_locale/money_get_members_wchar_t.cc
	(test02): Likewise.
	* testsuite/22_locale/money_put_members_char.cc
	(test02, test03, test06): Likewise.
	* testsuite/22_locale/money_put_members_wchar_t.cc:
	(test02, test03, test06): Likewise.
	* testsuite/22_locale/num_get_members_char.cc:
	(test02, test01): Likewise; suffix long long constants with LL.
	* testsuite/22_locale/num_get_members_wchar_t.cc:
	(test02, test01): Likewise.
	* testsuite/22_locale/num_put_members_char.cc:
	(test02, test01): Likewise.
	* testsuite/22_locale/num_put_members_wchar_t.cc:
	(test02, test01): Likewise.

From-SVN: r54243
2002-06-04 13:38:07 +00:00
Marcus Meissner 6c8ce02fcd stl_bvector.h: Use UL suffix for unsigned longs.
2002-05-31  Marcus Meissner  <meissner@suse.de>

	* include/bits/stl_bvector.h:  Use UL suffix for unsigned longs.
	* testsuite/23_containers/vector_bool.cc (test02):  New test.

From-SVN: r54128
2002-06-01 00:48:21 +00:00
Nick Clifton 6746a2999d (libstdc++-v3-init): Rebuild the wrapper file every time this proc is called.
From-SVN: r53987
2002-05-29 08:59:45 +00:00
Phil Edwards 8ea08b7d7b Makefile.am (noinst_LIBRARIES): New target.
2002-05-28  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/Makefile.am (noinst_LIBRARIES):  New target.  Pull in
	CXX/INCLUDES.
	* testsuite/Makefile.in:  Regenerate.
	* testsuite/testsuite_hooks.h (gnu_copy_tracker):  Move from
	list_modifiers.cc and rename from 'T'.  Move code bodies...
	* testsuite/testsuite_hooks.cc:  ...to here.  New file.
	* testsuite/23_containers/list_modifiers.cc:  Move 'T' class out.
	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3_target_compile):
	Add libv3test.a to link options.

From-SVN: r53977
2002-05-28 23:15:18 +00:00
Benjamin Kosnik 248a9163e1 misc-inst.cc: Define unnecessary algorithm instantiations.
c
2002-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	* src/misc-inst.cc: Define unnecessary algorithm
	instantiations. Break apart instantiations into groupings below.
	* src/fstream-inst.cc: New.
	* src/io-inst.cc: New.
	* src/istream-inst.cc: New.
	* src/ostream-inst.cc: New.
	* src/streambuf-inst.cc: New.
	* src/sstream-inst.cc: New.
	* src/Makefile.am (sources): Add files.
	* src/Makefile.in: Regenerate.

	* acinclude.m4: Work around automake 1.4-p5 bug, change
	AM_GNU_GETTEXT in comments to AM-GNU-GETTEXT.

From-SVN: r53930
2002-05-27 14:55:57 +00:00
Benjamin Kosnik bed1bd8c51 re PR libstdc++/6795 (stringbuf failure)
2002-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6795.
	* config/os/solaris/solaris2.6/bits/ctype_noninline.h
	(classic_table): Fix.
	* config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.

2002-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/ctype_is_wchar_t.cc: Guard with
	_GLIBCPP_USE_WCHAR_T.
	* testsuite/22_locale/ctype_narrow_wchar_t.cc: Same.
	* testsuite/22_locale/ctype_to_wchar_t.cc: Same.
	* testsuite/22_locale/ctype_widen_wchar_t.cc: Same.

From-SVN: r53921
2002-05-27 11:42:59 +00:00
Phil Edwards bb12c8093d std_bitset.h (_Base_biteset<0>): New specialization.
2002-05-24  Phil Edwards  <pme@gcc.gnu.org>

	libstdc++/6282
	* include/std/std_bitset.h (_Base_biteset<0>):  New specialization.
	(operator>>):  If nothing was extracted, don't fail in the
	zero-length case.
	* testsuite/23_containers/bitset_ctor.cc (test02):  New test.

From-SVN: r53844
2002-05-24 18:16:00 +00:00
Benjamin Kosnik f64ce6c6e8 [multiple changes]
2002-05-24  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6701
	* testsuite/22_locale/ctype_narrow_char.cc: New.
	* testsuite/22_locale/ctype_narrow_wchar_t.cc: New.
	* testsuite/22_locale/ctype_widen_char.cc: New.
	* testsuite/22_locale/ctype_widen_wchar_t.cc: New.
	* testsuite/22_locale/ctype_members_char.cc: Move some bits into...
	* testsuite/22_locale/ctype_is_char.cc: ...this.
	* testsuite/22_locale/ctype_to_char.cc: ...and this.
	* testsuite/22_locale/ctype_members_wchar_t.cc: Move some bits into...
	* testsuite/22_locale/ctype_is_wchar_t.cc: ...this.
	* testsuite/22_locale/ctype_to_wchar_t.cc: ...and this.

	* testsuite/22_locale/ctype_scan_wchar_t.cc: Should pass.

2002-05-24  Dale Peakall <dale@peakall.net>

	PR libstdc++/6701
	* config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_narrow): Fix.
	* config/locale/generic/ctype_members.cc: Same.

From-SVN: r53841
2002-05-24 16:02:39 +00:00
Benjamin Kosnik 52f02d949e re PR libstdc++/6750 (ofstream incorrectly sets failbit (severe regression))
2002-05-24  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6750
	* include/bits/ostream.tcc (ostream::operator<<(const char*)): Fix
	for empty string literal.
	(ostream::operator<<(const _CharT*)): Same.
	(ostream<char>::operator<<(const char*)): Same.
	(ostream<char>::operator<<(streambuf*)): Same.
	* testsuite/27_io/ostream_inserter_char.cc (test08): Add tests.
	* testsuite/27_io/ostream_inserter_other.cc (test02): Modify.

From-SVN: r53839
2002-05-24 15:50:51 +00:00
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
Paolo Carlini 53723190aa 2002-03-15 Paolo Carlini <pcarlini@unitus.it>
* testsuite/22_locale/collate_members_char.cc
	(test01): compare the result of collate::compare with
	that of collate::transform + string::compare, not with
	that of collate::transform + collate::compare.
	(test01): values returned by collate::compare are
	normalized, therefore test against +-1.
	* testsuite/22_locale/collate_members_wchar_t.cc: Ditto.

From-SVN: r50808
2002-03-15 16:05:56 +00:00
Loren J. Rittle 56d4fe31c5 reported by Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
reported by Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
	* testsuite/thread/pthread4.cc: Lower nominal iteration counter.

From-SVN: r50709
2002-03-13 02:53:27 +00:00
Benjamin Kosnik f714575791 ctype_noninline.h: Cast to unsigned char.
2002-03-12  Benjamin Kosnik  <bkoz@redhat.com>
            Per Liboriussen  <liborius@stofanet.dk>

	* config/os/gnu-linux/bits/ctype_noninline.h: Cast to
	unsigned char.
	* config/os/gnu-linux/bits/ctype_inline.h: Same.

	* config/os/irix/irix6.5/bits/ctype_inline.h: Same.

	* config/os/solaris/solaris2.5/bits/ctype_inline.h: Same.
	* config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.

	* config/os/solaris/solaris2.6/bits/ctype_inline.h: Same.
	* config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.

	* config/os/solaris/solaris2.7/bits/ctype_inline.h: Same.
	* config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.

	* testsuite/22_locale/ctype_members_char.cc (main): Add tests.

Co-Authored-By: Per Liboriussen <liborius@stofanet.dk>

From-SVN: r50708
2002-03-13 02:32:08 +00:00
Benjamin Kosnik fcaa810173 basic_string.tcc (string::_S_construct(_InIter, _InIter, const _Alloc&, forward_iterator_tag): Check for null.
2002-03-12  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_string.tcc (string::_S_construct(_InIter,
	_InIter, const _Alloc&, forward_iterator_tag): Check for null.
	(string::basic_string(const _CharT* __s, const _Alloc& __a)): Same.
	* testsuite/21_strings/ctor_copy_dtor.cc (test01): Re-enable, now
	that memory limits are in place.
	(test03): Add tests.

From-SVN: r50683
2002-03-12 22:10:34 +00:00
Phil Edwards abd3d6007c libstdc++-v3-dg.exp (libstdc++-v3-list-sourcefiles): New function.
2002-03-11  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-list-sourcefiles):
	New function.  Build the list of tests to run in testsuite_files.
	* testsuite/libstdc++-v3.dg/dg.exp:  Use it.

From-SVN: r50598
2002-03-11 21:11:07 +00:00
Phil Edwards 72c9b0629d capacity.cc: Only explicitly instantiate on platforms with no weak support.
2002-03-11  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/21_strings/capacity.cc:  Only explicitly instantiate on
	platforms with no weak support.
	* testsuite/27_io/ios_init.cc:  Likewise.

From-SVN: r50597
2002-03-11 21:08:06 +00:00
Scott Snyder 96854fe254 locale_facets.tcc (num_put::_M_convert_float): Allow one more digit of precision.
2002-03-08  scott snyder  <snyder@fnal.gov>

	libstdc++/5875
	* include/bits/locale_facets.tcc (num_put::_M_convert_float):
	Allow one more digit of precision.
	* testsuite/27_io/ostream_inserter_arith.cc: Test that we can
	write a double and read back in the same value.

From-SVN: r50470
2002-03-09 02:01:34 +00:00
Benjamin Kosnik 8497934433 std_limits.h: Move static const data members out of generic template...
2002-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/std_limits.h: Move static const data members out of
	generic template, into base class __numeric_limits_base.
	* src/limits.cc: Add definitions.
	* config/linker-map.gnu: Add __numeric_limits_base.
	* testsuite/18_support/numeric_limits.cc: Declare test in scope.

From-SVN: r50447
2002-03-08 17:59:14 +00:00
Benjamin Kosnik 41b4d44bac stl_alloc.h: Add extern implicit allocator instantiations.
2002-03-07  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_alloc.h: Add extern implicit allocator
	instantiations.
	* include/bits/basic_string.tcc: Tweak.
	* include/bits/locale_facets.tcc: Remove default args. Add
	has_facet, use_facet extern instantiations.
	* src/stl-inst.cc: Add explicit instantiation.
	* src/locale-inst.cc: Clean. Remove locale member template
	instantiations.

	* testsuite/22_locale/operators.cc (test02): Enable.

From-SVN: r50426
2002-03-08 06:05:21 +00:00
Benjamin Kosnik d3d526aca6 stl_tree.h (_S_rb_tree_red): Make enum.
2002-03-06  Benjamin Kosnik  <bkoz@redhat.com>
	    Stephen M. Webb  <stephen.webb@bregmasoft.com>

	* include/bits/stl_tree.h (_S_rb_tree_red): Make enum.
	(_S_rb_tree_black): Make enum.
	Clean. Format.
	* include/bits/stl_bvector.h (__WORD_BIT): To _M_word_bit, enum.
	* include/bits/stl_algo.h (__stl_chunk_size): _M_chunk_size, enum.
	(__stl_threshold): _M_threshold, enum.
	* src/stl-inst.cc: Same.
	* config/linker-map.gnu: Remove.

	* testsuite/23_containers/vector_bool.cc: New.

Co-Authored-By: Stephen M. Webb <stephen.webb@bregmasoft.com>

From-SVN: r50393
2002-03-07 06:53:23 +00:00
Paolo Carlini 84eb48794c 2002-03-05 Paolo Carlini <pcarlini@unitus.it>
libstdc++/5816
	* include/bits/locale_facets.tcc
	(num_get::_M_extract_float): Fix the parsing of __dec, since
	the standard prescribes that if no grouping characters are
	seen, no grouping check is applied.
        * testsuite/22_locale/num_get_members_char.cc: Add test05
	distilled from the PR.
        * testsuite/22_locale/num_get_members_wchar_t.cc: Ditto.

From-SVN: r50317
2002-03-05 12:09:45 +00:00
Phil Edwards 798355a229 std_sstream.h: Remove trailing spaces.
2002-03-03  Phil Edwards  <pme@gcc.gnu.org>

	* include/std/std_sstream.h:  Remove trailing spaces.
	(basic_stringbuf::_M_stringbuf_init):  Also check for ios_base::app.
	* testsuite/27_io/stringbuf.cc (test05, test06):  New tests.

From-SVN: r50258
2002-03-03 17:48:42 +00:00
Paolo Carlini 658499e7b4 num_get_members_char.cc (test04): Use a named locale expecting grouping (de_DE).
2002-03-02  Paolo Carlini  <pcarlini@unitus.it>

        * testsuite/22_locale/num_get_members_char.cc (test04):
	Use a named locale expecting grouping (de_DE).
        * testsuite/22_locale/num_get_members_wchar_t.cc (test04):
	Ditto.
        * testsuite/27_io/ios_manip_basefield.cc (test01):
	Extend coverage, uniform treatment of hexs and octs.

From-SVN: r50234
2002-03-02 21:32:56 +00:00
Paolo Carlini 694d519fb0 locale_facets.tcc (num_get::_M_extract_int): Admit grouping for octals and hexadecimals too.
2002-02-28  Paolo Carlini  <pcarlini@unitus.it>

        * include/bits/locale_facets.tcc (num_get::_M_extract_int):
        Admit grouping for octals and hexadecimals too.
        * testsuite/22_locale/num_get_members_char.cc: Add test04.
        (test01): Tweak "." -> "," in void* test.
        * testsuite/22_locale/num_get_members_wchar_t.cc: Ditto.

        * testsuite/27_io/ios_manip_basefield.cc: Remove static keyword.
        * testsuite/27_io/ios_manip_fmtflags.cc: Remove two of them.

From-SVN: r50162
2002-02-28 21:16:45 +00:00
Paolo Carlini bded68b108 ios_manip_basefield.cc (test01): Fix for 64 bit machines.
2002-02-27  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/ios_manip_basefield.cc (test01):
	Fix for 64 bit machines.

From-SVN: r50111
2002-02-27 19:54:32 +00:00
Benjamin Kosnik ac39fabb8b basic_ios.tcc (basic_ios::init): Set _M_fill to zero.
2002-02-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_ios.tcc (basic_ios::init): Set _M_fill to zero.
	Adjust comment.
	* include/bits/basic_ios.h (basic_ios::_M_fill): Make mutable.
	(basic_ios::_M_fill_init): New.
	(basic_ios::fill()): Deal with _M_fill lazily.
	Adjust comment.
	* testsuite/27_io/ios_init.cc (test02): Adjust testcase.

From-SVN: r50076
2002-02-27 01:01:31 +00:00
Paolo Carlini 2d13abcf86 locale_facets.tcc (num_put::_M_widen_int): Group all the integral types, not only decs.
2002-02-26  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/locale_facets.tcc (num_put::_M_widen_int):
	Group all the integral types, not only decs.
	* testsuite/27_io/ios_manip_basefield.cc (test01): Tweak existing
	tests, add a few more.

From-SVN: r50057
2002-02-26 20:56:24 +00:00
Benjamin Kosnik 1bc59af523 ios.cc (ios_base::~ios_base): Tweak.
2002-02-25  Benjamin Kosnik  <bkoz@redhat.com>

	* src/ios.cc (ios_base::~ios_base): Tweak.
	(ios_base::_M_call_callbacks): Deal with null __p.
	(ios_base::ios_base): Set _M_callbacks.
	* include/bits/basic_ios.tcc (basic_ios::init): Adjust comment.
	* testsuite/27_io/ios_init.cc (test02): Fix.

	* mkcheck.in (static_fail): Failed links go to output file.

From-SVN: r50032
2002-02-26 04:55:48 +00:00
Benjamin Kosnik ab3bc736d9 configure.in (target_alias): Default to yes.
2002-02-21  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.in (target_alias): Default to yes.
	* acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Add check for shared
	libgcc to default case.

From-SVN: r49959
2002-02-22 11:36:26 +00:00
Benjamin Kosnik 04fc13943f money_put_members_char.cc: Fix.
2002-02-20  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/money_put_members_char.cc: Fix.
	* testsuite/22_locale/money_put_members_wchar_t.cc: Fix.

	* testsuite/27_io/standard_manipulators.cc: New file.

	* testsuite/27_io/ios_manip_basefield.cc: Check results, now failing.
	* testsuite/27_io/ios_manip_fmtflags.cc: Use locale::classic().

From-SVN: r49910
2002-02-20 21:06:42 +00:00
Benjamin Kosnik 0d223e3a4e std_iomanip.h: Inline, tweaks.
2002-02-19  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/std_iomanip.h: Inline, tweaks.
	* config/linker-map.gnu: Remove hacks.

	* testsuite/21_strings/capacity.cc: Add explicit instantiations.
	* testsuite/27_io/ios_init.cc: Same.
	* testsuite/22_locale/money_get_members_char.cc (test07): Fix.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test07): Same.

From-SVN: r49884
2002-02-20 00:58:17 +00:00
Peter Schmid 1c417030f4 collate_byname.cc (test01): Replace size4 with size3 for the string collations of str5.
2002-02-18  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* testsuite/22_locale/collate_byname.cc (test01): Replace size4
          with size3 for the string collations of str5.

From-SVN: r49857
2002-02-19 05:59:09 +00:00
Paolo Carlini 577f406186 locale_facets.tcc (money_put::do_put): For the space field use __fill instead of ' ', uniformly.
2002-02-18  Paolo Carlini  <pcarlini@unitus.it>

	libstdc++/5708
	* include/bits/locale_facets.tcc (money_put::do_put):
	For the space field use __fill instead of ' ', uniformly.
	* testsuite/22_locale/money_put_members_char.cc:
	Add test05 distilled from PR.
	(test01-02-03): Trim some '*' to ' '.
	* testsuite/22_locale/money_put_members_wchar_t.cc: Ditto.

From-SVN: r49847
2002-02-18 21:23:26 +00:00
Benjamin Kosnik 8dba028f10 localename.cc: Remove stdexcept include.
2002-02-13  Benjamin Kosnik  <bkoz@redhat.com>

	* src/localename.cc: Remove stdexcept include.
	* src/locale-inst.cc: Same.
	* src/locale.cc: Same.
	* src/functexcept.cc: Remove string includes.
	* include/std/std_bitset.h: Remove stdexcept include.
	* testsuite/23_containers/bitset_members.cc: Add stdexcept.

From-SVN: r49740
2002-02-13 18:29:12 +00:00
Aaron W. LaFramboise 4e2f8bcf6f locale_facets.tcc (collate::do_hash): Fix.
2002-02-11  Aaron W LaFramboise  <AWLaFramboise@aol.com>

	* include/bits/locale_facets.tcc (collate::do_hash): Fix.
	* testsuite/22_locale/collate_members_char.cc (test03): New test.
	* testsuite/22_locale/collate_members_wchar_t.cc (test03): Same.

From-SVN: r49682
2002-02-11 18:56:24 +00:00
Benjamin Kosnik 07814743cf std_fstream.h (filebuf::__file_type): Change to __basic_file<char>.
2002-02-07  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/5286
	libstdc++/3860
	* include/std/std_fstream.h (filebuf::__file_type): Change to
	__basic_file<char>.
	(filebuf::_M_convert_to_external): Declare.
	* include/bits/fstream.tcc (filebuf::_M_convert_to_external): Define
	codecvt bits for wide streams.
	(filebuf::_M_really_overflow): Use it.
	(filebuf::underflow): Use codecvt.
	* config/locale/codecvt_specializations_ieee_1003.1-200x.h:
	(codecvt<__enc_traits>::do_out): Deal with partial.
	(codecvt<__enc_traits>::do_encoding): Return something useful.
	* src/codecvt.cc (codecvt<wchar_t>::do_encoding): Return sizeof
	wchar_t.
	* testsuite/22_locale/codecvt_members_unicode_char.cc (test01):
	Change expected encoding output.
	(test02): Same.
	* testsuite/22_locale/codecvt_members_wchar_t_char.cc (test01): Same.
	(test02): Same.

From-SVN: r49601
2002-02-08 01:34:41 +00:00
Paolo Carlini a092e4ebba money_get_members_char.cc: Add comment, tidy up.
2002-02-07  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/22_locale/money_get_members_char.cc:
	Add comment, tidy up.
	(test01): more "en_HK" tests (without showbase).
	* testsuite/22_locale/money_get_members_wchar_t.cc: Ditto.

From-SVN: r49587
2002-02-07 19:27:38 +00:00
Paolo Carlini 6662d4c337 locale_facets.tcc (money_get::do_get(string)): In case money_base::symbol deal properly with multi-char sign for patterns...
2002-02-06  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/locale_facets.tcc (money_get::do_get(string)):
	In case money_base::symbol deal properly with multi-char sign
	for patterns {X,Y,Z,symbol} and {X,Y,symbol,none}.
	* testsuite/22_locale/money_get_members_char.cc: Add test07.
	* testsuite/22_locale/money_get_members_wchar_t.cc: Add test07.

From-SVN: r49543
2002-02-06 12:13:00 +00:00
Paolo Carlini e07554eb17 locale_facets.tcc (money_get::do_get(string)): First construct a tentative returned string...
2002-02-05  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/locale_facets.tcc (money_get::do_get(string)):
	First construct a tentative returned string, then, only if the
	parsing succeeds, copy it into the string passed by reference.
	* testsuite/22_locale/money_get_members_char.cc: Add test06.
	* testsuite/22_locale/money_get_members_wchar_t.cc: Add test06.

From-SVN: r49523
2002-02-05 11:35:48 +00:00
Paolo Carlini 53804e7c80 locale_facets.tcc (money_get::do_get(string)): Deal correctly with !(__io.flags() & ios_base::showbase) for case...
2002-02-04  Paolo Carlini  <pcarlini@unitus.it>

        libstdc++/5579
        * include/bits/locale_facets.tcc (money_get::do_get(string)):
        Deal correctly with !(__io.flags() & ios_base::showbase)
        for case money_base::symbol.
        * testsuite/22_locale/money_get_members_char.cc: Add test05.
        * testsuite/22_locale/money_get_members_wchar_t.cc: Add test05.

From-SVN: r49489
2002-02-04 19:51:32 +00:00
Paolo Carlini b6f642d59c 2002-02-02 Paolo Carlini <pcarlini@unitus.it>
* testsuite/22_locale/operators.cc
	(gnu_collate::do_compare()): Add return statement to
	suppress "no return statement" warning.

From-SVN: r49441
2002-02-02 13:46:47 +00:00
Paolo Carlini 866c9e660e ostream_manip.cc: Enable test02.
2002-02-01  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/ostream_manip.cc: Enable test02.

From-SVN: r49440
2002-02-02 13:13:00 +00:00
Loren J. Rittle 4a78d8641c codecvt_members_char_char.cc: Do not allow NULL argument to be passed to setenv().
* testsuite/22_locale/codecvt_members_char_char.cc: Do not
	allow NULL argument to be passed to setenv().
	* testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise.
	* testsuite/22_locale/collate_members_char.cc: Likewise.
	* testsuite/22_locale/collate_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/ctype_members_char.cc: Likewise.
	* testsuite/22_locale/ctype_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/messages_members_char.cc: Likewise.
	* testsuite/22_locale/money_get_members_char.cc: Likewise.
	* testsuite/22_locale/money_get_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/money_put_members_char.cc: Likewise.
	* testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/moneypunct_members_char.cc: Likewise.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/num_get_members_char.cc: Likewise.
	* testsuite/22_locale/num_get_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/num_put_members_char.cc: Likewise.
	* testsuite/22_locale/num_put_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/numpunct_members_char.cc: Likewise.
	* testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/time_get_members_char.cc: Likewise.
	* testsuite/22_locale/time_get_members_wchar_t.cc: Likewise.
	* testsuite/22_locale/time_put_members_char.cc: Likewise.
	* testsuite/22_locale/time_put_members_wchar_t.cc: Likewise.

From-SVN: r49384
2002-02-01 00:24:12 +00:00
Richard Henderson 2a4a2f1da2 ostream_inserter_arith.cc (test03_check): Break out from test03 and templatize.
* testsuite/27_io/ostream_inserter_arith.cc (test03_check): Break
        out from test03 and templatize.
        (test03): Use it.

From-SVN: r49348
2002-01-30 16:03:31 -08:00
Paolo Carlini f2e7381d8e 2002-01-30 Paolo Carlini <pcarlini@unitus.it>
* config/locale/numpunct_members_gnu.cc
	(numpunct<char, wchar_t>::_M_initialize_numpunct()):
	Fix initialization of _M_grouping for locales which have
	_M_thousands_sep == '\0'(L'\0', respectively).
	* testsuite/22_locale/numpunct_byname.cc (test02): Add test.

From-SVN: r49343
2002-01-30 21:00:40 +00:00
Paolo Carlini a852d50fb4 ostream_inserter_arith.cc (test03): Better fix for 32/64 bit architectures...
2002-01-30  Paolo Carlini  <pcarlini@unitus.it>

        * testsuite/27_io/ostream_inserter_arith.cc (test03):
        Better fix for 32/64 bit architectures, avoiding the
        implicit assumption that CHAR_BIT == 8.

From-SVN: r49342
2002-01-30 20:45:18 +00:00
Phil Edwards ffe94f8380 Makefile.am (doxygen, [...]): Tweak targets.
2002-01-28  Phil Edwards  <pme@gcc.gnu.org>

	* Makefile.am (doxygen, doxygen-maint, doxygen-man):  Tweak targets.
	* Makefile.in:  Regenerate.

	* docs/doxygen/run_doxygen:  Update, mostly for man pages.
	* docs/doxygen/Intro.3:  Update.
	* docs/doxygen/TODO:  Update.
	* docs/doxygen/doxygroups.cc:  Add namespace hook for __gnu_cxx.
	* docs/doxygen/mainpage.doxy:  Update.
	* docs/doxygen/user.cfg.in:  Update for header rename.  Also
	regenerate comments and variables with 1.2.12.
	* docs/doxygen/maint.cfg.in:  Remove file.

	* include/bits/stl_relops.h:  Doxygenate.
	* include/bits/stl_tempbuf.h (std::_Temporary_buffer):  Likewise.

	* include/c_std/std_cassert.h, include/c_std/std_cctype.h,
	include/c_std/std_cerrno.h, include/c_std/std_cfloat.h,
	include/c_std/std_ciso646.h, include/c_std/std_climits.h,
	include/c_std/std_clocale.h, include/c_std/std_cmath.h,
	include/c_std/std_csetjmp.h, include/c_std/std_csignal.h,
	include/c_std/std_cstdarg.h, include/c_std/std_cstddef.h,
	include/c_std/std_cstdio.h, include/c_std/std_cstdlib.h,
	include/c_std/std_cstring.h, include/c_std/std_ctime.h,
	include/c_std/std_cwchar.h, include/c_std/std_cwctype.h,
	include/ext/algorithm, include/ext/functional, include/ext/hash_map,
	include/ext/hash_set, include/ext/iterator, include/ext/memory,
	include/ext/numeric, include/ext/rb_tree, include/ext/rope,
	include/ext/ropeimpl.h, include/ext/slist, include/ext/stl_hash_fun.h,
	include/ext/stl_hashtable.h, include/ext/stl_rope.h,
	include/std/std_algorithm.h, include/std/std_bitset.h,
	include/std/std_complex.h, include/std/std_deque.h,
	include/std/std_fstream.h, include/std/std_functional.h,
	include/std/std_iomanip.h, include/std/std_ios.h,
	include/std/std_iosfwd.h, include/std/std_iostream.h,
	include/std/std_istream.h, include/std/std_iterator.h,
	include/std/std_limits.h, include/std/std_list.h,
	include/std/std_locale.h, include/std/std_map.h,
	include/std/std_memory.h, include/std/std_numeric.h,
	include/std/std_ostream.h, include/std/std_queue.h,
	include/std/std_set.h, include/std/std_sstream.h,
	include/std/std_stack.h, include/std/std_stdexcept.h,
	include/std/std_streambuf.h, include/std/std_string.h,
	include/std/std_utility.h, include/std/std_valarray.h,
	include/std/std_vector.h:  Add/correct @file doxygen hook.

	* include/ext/memory:  Doxygenate most of rest of file.
	* libsupc++/exception:  Doxygen output formatting.
	* libsupc++/new:  Say which header it is.

	* testsuite/lib/libstdc++-v3-dg.exp:  Fix spacing.
	* docs/html/19_diagnostics/howto.html:  Describe concept-checks switch.
	* docs/html/23_containers/howto.html:  Describe O(n) list::size().
	* docs/html/27_io/howto.html:  Also link to Langer and Kreft text.

From-SVN: r49300
2002-01-28 22:13:12 +00:00
Paolo Carlini 11e174221b filebuf_members.cc (test_05): Add test.
2002-01-28  Paolo Carlini  <pcarlini@unitus.it>
	    Charles Leggett <CGLeggett@lbl.gov>

	* testsuite/27_io/filebuf_members.cc (test_05): Add test.

Co-Authored-By: Charles Leggett <CGLeggett@lbl.gov>

From-SVN: r49297
2002-01-28 20:07:57 +00:00
Paolo Carlini 4debe14deb ostream_inserter_arith.cc (test03): Fix to deal correctly with both 32 bit and 64 bit architectures
2002-01-28  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/ostream_inserter_arith.cc (test03):
	Fix to deal correctly with both 32 bit and 64 bit architectures

From-SVN: r49295
2002-01-28 20:06:15 +00:00
Loren J. Rittle 63b3a44f03 pthread1.cc: Use one condition variable per predicate instead of tricky use of one condition...
* testsuite/thread/pthread1.cc: Use one condition variable
        per predicate instead of tricky use of one condition variable.

From-SVN: r49239
2002-01-26 03:26:14 +00:00
Benjamin Kosnik e67051746f fstream.tcc (filebuf::close()): Fix close for input streams.
2002-01-25  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/fstream.tcc (filebuf::close()): Fix close for input
	streams.
	(filebuf::_M_really_overflow): Match indeterminate and sync calls.
	* testsuite/27_io/filebuf.cc: Compile only.
	* testsuite/27_io/filebuf_members.cc: Move tests to here.
	* testsuite/27_io/filebuf_virtuals.cc: And here.
	Revert sungetc, sync changes for expected values.
	* testsuite/27_io/filebuf-*: Move to...
	* testsuite/27_io/filebuf_virtuals-*: ...here.
	* testsuite/27_io/istream.cc: Compile only, activate.
	* testsuite/27_io/ostream.cc: Same.
	* testsuite/27_io/iostream.cc: New.
	* testsuite/27_io/iostream_members.cc: New.

From-SVN: r49236
2002-01-26 01:55:09 +00:00
David Billinghurst a68d024dfc pthread1.cc: Enable on cygwin.
* testsuite/thread/pthread1.cc: Enable on cygwin.
	* testsuite/thread/pthread2.cc: Likewise.
	* testsuite/thread/pthread3.cc: Likewise.
	* testsuite/thread/pthread4.cc: Likewise.
	* testsuite/thread/pthread5.cc: Likewise.
	* testsuite/thread/pthread6.cc: Likewise.

From-SVN: r49214
2002-01-25 16:05:48 +00:00
Benjamin Kosnik 3a9ebf3ced ostream_inserter_char.cc (test07): New.
2002-01-24  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/ostream_inserter_char.cc (test07): New.

2002-01-24  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_ios.h (basic_ios::_M_check_facet): Make
	const, tweak.
	(basic_ios::fill(char_type)): Use fill().
	* include/bits/basic_ios.tcc (basic_ios::widen): Use _M_check_facet.
	(basic_ios::narrow): Same.
	(basic_ios::_M_cache_facets): Explicitly set cached facets to zero
	if they are invalid.
	(basic_ios::init): Comment.
	* testsuite/27_io/ios_init.cc (test02): New.

From-SVN: r49205
2002-01-25 06:36:32 +00:00
Phil Edwards 6b20f9b59a stl_tempbuf.h (_Temporary_buffer): Add doxygen hook.
2002-01-24  Phil Edwards  <pme@gcc.gnu.org>

	* include/bits/stl_tempbuf.h (_Temporary_buffer):  Add doxygen hook.
	* include/bits/stl_algo.h:  Include stl_tempbuf.h.
	* include/ext/memory:  Do not include stl_tempbuf.h.
	(temporary_buffer):  Add doxygen hook.
	(__get_temporary_buffer, get_temporary_buffer,
	return_temporary_buffer):  Move back to std:: header...
	* include/std/std_memory.h:  ...here.  Do not include stl_tempbuf.h.
	* include/ext/rope:  Do not include stl_tempbuf.h.
	* include/ext/stl_hashtable.h:  Likewise.
	* include/std/std_algorithm.h:  Likewise.
	* testsuite/20_util/temporary_buffer.cc:  New file.

From-SVN: r49199
2002-01-25 04:14:40 +00:00
Benjamin Kosnik b6a95741e8 num_put_members_wchar_t.cc (test03): Use _GLIBCPP_HAVE_SETENV.
2002-01-24   Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/num_put_members_wchar_t.cc (test03): Use
	_GLIBCPP_HAVE_SETENV.
	* testsuite/22_locale/codecvt_members_wchar_t_char.cc (test02): Same.
	* testsuite/22_locale/collate_members_char.cc (test02): Same.
	* testsuite/22_locale/ctype_members_char.cc (test03): Same.
	* testsuite/22_locale/ctype_members_wchar_t.cc (test03): Same.
	* testsuite/22_locale/messages_members_char.cc (test02): Same.
	* testsuite/22_locale/moneypunct_members_char.cc (test02): Same.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc (test02): Same.
	* testsuite/22_locale/money_put_members_char.cc (test04): Same.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test04): Same.
	* testsuite/22_locale/num_get_members_char.cc (test03): Same.
	* testsuite/22_locale/num_get_members_wchar_t.cc (test03): Same.
	* testsuite/22_locale/numpunct_members_char.cc (test02): Same.
	* testsuite/22_locale/numpunct_members_wchar_t.cc (test02): Same.
	* testsuite/22_locale/time_get_members_char.cc (test07): Same.
	* testsuite/22_locale/time_get_members_wchar_t.cc (test07): Same.
	* testsuite/22_locale/time_put_members_char.cc (test03): Same.
	* testsuite/22_locale/time_put_members_wchar_t.cc (test03): Same.
	* testsuite/22_locale/num_put_members_char.cc (test03): Same.
	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Check for setenv.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* config.h.in: Regenerate.

From-SVN: r49191
2002-01-24 20:46:34 +00:00
Loren J. Rittle ddd6960743 pthread1.cc: New test.
* testsuite/thread/pthread1.cc: New test.
	* testsuite/thread/pthread2.cc: New test adapted from libstdc++/5347.
	* testsuite/thread/pthread3.cc: Likewise.
	* testsuite/thread/pthread4.cc: New test adapted from
	http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00679.html
	* testsuite/thread/pthread5.cc: New test adapted from libstdc++/5464.
	* testsuite/thread/pthread6.cc: New test adapted from libstdc++/5444.

From-SVN: r49173
2002-01-24 07:35:11 +00:00
Paolo Carlini b4ae79f745 ios_manip_basefield.cc: Enable test02.
2002-01-22  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/ios_manip_basefield.cc: Enable test02.
	* testsuite/27_io/ostream_inserter_arith.cc: Enable test03.
	* testsuite/27_io/ostream_inserter_char.cc: Enable test01.
	* testsuite/27_io/ostream_inserter_other.cc: Enable test04.

From-SVN: r49116
2002-01-23 01:12:10 +00:00
Benjamin Kosnik 4b9aaf6379 Audit for LANG independence.
2002-01-22  Benjamin Kosnik  <bkoz@redhat.com>

	Audit for LANG independence.
	* include/bits/localefwd.h: Tweaks.
	* include/bits/locale_facets.tcc (money_get::do_get(long double)):
	Use __convert_to_v.
	(time_get::do_get_year): Same.
	(__convert_from_v): Add.
	(num_put::_M_convert_float): Use.
	(num_put::_M_convert_int): Same.
	(money_put::do_put): Same.

	* src/locale-inst.cc: Add instantiations for __convert_from_v.
	* config/locale/time_members_gnu.cc: Cleanup setlocale usage.
	* config/locale/time_members_generic.cc:
	* config/locale/messages_members_gnu.cc: Same.
	* config/locale/messages_members_gnu.h: Same.

	* testsuite/22_locale/codecvt_members_wchar_t_char.cc (test02): New.
	* testsuite/22_locale/codecvt_members_char_char.cc (test02): New.
	* testsuite/22_locale/collate_members_wchar_t.cc (test02): New.
	* testsuite/22_locale/collate_members_char.cc (test02): New.
	* testsuite/22_locale/ctype_members_wchar_t.cc (test03): New.
	* testsuite/22_locale/ctype_members_char.cc (test03): New.
	* testsuite/22_locale/messages_members_char.cc (test02): New.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc (test02): New.
	* testsuite/22_locale/moneypunct_members_char.cc (test02): New.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test04): New.
	* testsuite/22_locale/money_get_members_char.cc (test04): New.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test04): New.
	* testsuite/22_locale/money_put_members_char.cc (test04): New.
	* testsuite/22_locale/numpunct_members_wchar_t.cc (test02): New.
	* testsuite/22_locale/numpunct_members_char.cc (test02): New.
	* testsuite/22_locale/time_put_members_wchar_t.cc (test03): New.
	* testsuite/22_locale/time_put_members_char.cc (test03): New.
	* testsuite/22_locale/time_get_members_wchar_t.cc (test07): New.
	* testsuite/22_locale/time_get_members_char.cc (test07): New.
	* testsuite/22_locale/num_get_members_wchar_t.cc (test03): New.
	* testsuite/22_locale/num_get_members_char.cc (test03): New.
	* testsuite/22_locale/num_put_members_wchar_t.cc (test03): New.
	* testsuite/22_locale/num_put_members_char.cc (test03): New.

	* testsuite/22_locale/time_get_members_char.cc: Fixups for global
	locale issues.
	* testsuite/22_locale/time_get_members_char.cc: Same.

2002-01-22  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/5280
	* include/bits/localefwd.h: Tweak comments.
	* include/bits/locale_facets.h (__convert_to_v): Add.
	* include/bits/locale_facets.tcc (num_get::do_get(double)): Use it.
	(num_get::do_get(float)): Same.
	(num_get::do_get(long double)): Same.
	(num_get::do_get(bool)): Same.
	(num_get::do_get(long)): Same.
	(num_get::do_get(long long)): Same.
	(num_get::do_get(unsigned int)): Same.
	(num_get::do_get(unsigned short)): Same.
	(num_get::do_get(unsigned long)): Same.
	(num_get::do_get(unsigned long long)): Same.
	* config/locale/c_locale_gnu.cc (__convert_to_v): Specialize.
	* config/locale/c_locale_generic.cc: Same.

From-SVN: r49108
2002-01-22 23:09:04 +00:00
Loren J. Rittle 46827fdd40 numeric_limits.cc (test_extrema<long double>): Add specialization for FreeBSD systems only to avoid losing test only due to...
* testsuite/18_support/numeric_limits.cc (test_extrema<long double>):
	Add specialization for FreeBSD systems only to avoid losing test
	only due to extra precision unmentioned in system headers.

From-SVN: r48997
2002-01-18 22:07:27 +00:00
Nick Clifton c429752231 fix typo in comment
From-SVN: r48973
2002-01-17 23:37:43 +00:00
Peter Schmid 715e561616 ctor_copy_dtor.cc: Remove check.
2002-01-17  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* testsuite/22_locale/ctor_copy_dtor.cc: Remove check.

From-SVN: r48967
2002-01-17 22:29:44 +00:00
Benjamin Kosnik 8f7a401515 stl_iterator.h (reverse_iterator::_M_current): Deuglify, should be current.
2002-01-16  Benjamin Kosnik  <bkoz@redhat.com>
            Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* include/bits/stl_iterator.h (reverse_iterator::_M_current):
	Deuglify, should be current.
	(back_insert_iterator::_M_container): Deuglify, should be container.
	(front_insert_iterator::_M_container): Same.
	(insert_iterator::_M_container): Same.
	* testsuite/24_iterators/reverse_iterator.cc: Add check.
	* testsuite/24_iterators/back_insert_iterator.cc: Add check.
	* testsuite/24_iterators/front_insert_iterator.cc: Same.
	* testsuite/24_iterators/insert_iterator.cc: Same.

2002-01-16  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h (ctype<char>::classic_table): Make
	static.
	(ctype<char>::_M_ctable): Make static, change name to _S_ctable.
	* config/os/gnu-linux/bits/ctype_noninline.h: Define _S_ctable.
	* config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.
	* config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.
	* config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
	* config/os/newlib/bits/ctype_noninline.h: Same.
	* config/os/irix/irix6.5/bits/ctype_noninline.h: Same.
	* config/os/irix/irix5.2/bits/ctype_noninline.h: Same.
	* config/os/hpux/bits/ctype_noninline.h: Same.
	* config/os/djgpp/bits/ctype_noninline.h: Same.
	* config/os/bsd/netbsd/bits/ctype_noninline.h: Same.
	* config/os/bsd/freebsd/bits/ctype_noninline.h: Same.
	* config/os/aix/bits/ctype_noninline.h: Same.

	Testcase by Dietmar K�hl via Peter Schmid
	* testsuite/22_locale/ctype_members_char.cc (char>): Add test for
	classic_table().

Co-Authored-By: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>

From-SVN: r48938
2002-01-17 03:59:42 +00:00
Benjamin Kosnik aefb3380dd signbitl.c: Copyright years as list, not range.
2002-01-16  Benjamin Kosnik  <bkoz@redhat.com>

	* libmath/signbitl.c: Copyright years as list, not range.
	* libmath/Makefile.am: Same.
	* libmath/Makefie.in: Regenerate.
	* libmath/signbit.c: Same.
	* libmath/nan.c: Same.
	* libmath/copysignf.c: Same.
	* libmath/signbitf.c: Same.
	* testsuite/22_locale/money_get_members_char.cc: Same.
	* testsuite/22_locale/money_get_members_wchar_t.cc: Same.
	* testsuite/22_locale/money_put_members_char.cc: Same.
	* testsuite/22_locale/money_put_members_wchar_t.cc: Same.
	* testsuite/22_locale/time_get_members_char.cc: Same.
	* testsuite/22_locale/time_get_members_wchar_t.cc: Same.
	* testsuite/22_locale/time_put_members_char.cc: Same.
	* testsuite/22_locale/time_put_members_wchar_t.cc: Same.
	* testsuite/21_strings/nonmember.cc: Same.
	* testsuite/21_strings/compare.cc: Same.
	* testsuite/27_io/stringstream.cc: Same.
	* testsuite/27_io/stringbuf.cc: Same.
	* testsuite/27_io/filebuf.cc: Same.
	* testsuite/27_io/ios_manip_basefield.cc: Same.
	* testsuite/27_io/ios_manip_fmtflags.cc: Same.
	* include/bits/cpp_type_traits.h: Same.
	* include/bits/generic_shadow.h: Same.
	* include/bits/gslice_array.h: Same.
	* include/bits/gslice.h: Same.
	* include/bits/indirect_array.h: Same.
	* include/bits/slice_array.h: Same.
	* include/bits/sstream.tcc: Same.
	* include/bits/streambuf_iterator.h: Same.
	* include/bits/valarray_array.tcc: Same.
	* include/bits/valarray_meta.h: Same.
	* include/bits/valarray_array.h: Same.
	* config/os/mingw32/bits/ctype_noninline.h: Same.
	* config/os/mingw32/bits/ctype_base.h: Same.
	* config/os/hpux/bits/ctype_noninline.h: Same.
	* config/os/hpux/bits/ctype_base.h: Same.
	* config/os/gnu-linux/bits/ctype_noninline.h: Same.
	* config/os/gnu-linux/bits/ctype_base.h: Same.
	* config/os/generic/bits/ctype_noninline.h: Same.
	* config/os/generic/bits/ctype_base.h: Same.

	* libsupc++/tinfo.h: Tweaks.

From-SVN: r48922
2002-01-16 19:57:39 +00:00
Benjamin Kosnik def9746c13 num_put_members_wchar_t.cc (test02): Same.
2002-01-15  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/num_put_members_wchar_t.cc (test02): Same.
	* testsuite/22_locale/num_put_members_char.cc (test01): Tweak.
	* testsuite/22_locale/ctype_members_char.cc: Tweak.

From-SVN: r48902
2002-01-16 06:11:41 +00:00
Benjamin Kosnik c22e177db7 num_put_members_wchar_t.cc (test02): Same.
2002-01-15  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/num_put_members_wchar_t.cc (test02): Same.
	* testsuite/22_locale/num_put_members_char.cc (test01): Tweak.

From-SVN: r48901
2002-01-16 06:06:59 +00:00
Benjamin Kosnik bed9a20d55 locale_facets.tcc (num_put::do_put(bool): Fix.
2002-01-15  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc (num_put::do_put(bool): Fix.
	(num_put::do_put(void*)): Fix.
	* testsuite/22_locale/num_put_members_char.cc (test02): Add.
	* testsuite/22_locale/num_put_members_wchar_t.cc (test02): Add.
	* testsuite/22_locale/num_get_members_char.cc (test02): Add
	long double, void, bool types.
	* testsuite/22_locale/num_get_members_wchar_t.cc (test02): Add.

From-SVN: r48892
2002-01-16 00:51:45 +00:00
David Billinghurst 80a86f2176 2002-01-08 David Billinghurst <David.Billinghurst@riotinto.com>
* testsuite/26_numerics/c99_classification_macros_c.cc
	Remove dg-error and dg-excess-errors comments.

From-SVN: r48862
2002-01-15 04:29:56 +00:00
Benjamin Kosnik 8f88da406b locale_facets.tcc (time_put::put): Correct output iterator positions.
2002-01-14  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc (time_put::put): Correct output
	iterator positions.
	* testsuite/22_locale/time_put_members_char.cc (test02): Add.
	* testsuite/22_locale/time_put_members_wchar_t.cc (test02): Add.
	* testsuite/22_locale/time_get_members_wchar_t.cc (test06): Add.
	* testsuite/22_locale/time_get_members_char.cc (test06): Add.

From-SVN: r48861
2002-01-15 04:23:46 +00:00
Paolo Carlini c68cd521fa 2002-01-14 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers  <ncm@cantrip.org>

	* include/bits/basic_string.h
	(replace(__pos, __n1, __s, __n2)): Optimize by avoiding
	temporaries (i.e., call _M_replace_safe) when possible.
	(replace(__pos, __n, __str)): Call replace(__pos, __n1, __s, __n2).
	(replace(__pos, __n1, __s)): Call replace(__pos, __n1, __s , __n2).
	(replace(__i1, __i2, __str)): Call replace(__i1, __i2, __s, __n).
	(replace(__i1, __i2, __s)): Call replace(__i1, __i2, __s, __n).
	(replace(__i1, __i2, __s, __n)): Call replace(__pos1, __n1, __s, __n2).
	* include/bits/basic_string.tcc
	(replace(__pos1, __n1, __str, __pos2, __n2)): Call
	replace(__pos, __n1, __s, __n2).
	* testsuite/21_strings/replace.cc (test03): New testcases.

	* include/bits/basic_string.h (insert(__pos, __s, __n)):
	Adjust comparison wrt overflow.

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

From-SVN: r48834
2002-01-14 19:04:15 +00:00
Benjamin Kosnik ae72572be9 locale_facets.tcc (money_put::do_put(string): Correct output iterator value.
2002-01-12  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc (money_put::do_put(string):
	Correct output iterator value.
	* testsuite/22_locale/money_put_members_char.cc (test03): Add.
	* testsuite/22_locale/money_put_members_wchar_t.cc: Same.

From-SVN: r48809
2002-01-13 04:27:18 +00:00
Benjamin Kosnik 87a9c33cb1 locale_facets.tcc (money_get::do_get(string)): Check for zero-length negative sign before adding it to output string.
2002-01-11  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc (money_get::do_get(string)):
	Check for zero-length negative sign before adding it to output
	string.
	(money_get::do_get(long double)): Return beg.
	* testsuite/22_locale/money_get_members_char.cc (test02): Add
	iterator checks.
	* testsuite/22_locale/money_get_members_wchar_t.cc: Same.

From-SVN: r48777
2002-01-11 20:12:02 +00:00
David Seymour 3ac3829f8e locale_facets.h (num_get<>): Return advanced iterator for _M_extract_float and _M_extract_int
2002-01-10  David Seymour  <seymour_dj@yahoo.com>

	libstdc++/5331
	* include/bits/locale_facets.h (num_get<>): Return advanced iterator
	for _M_extract_float and _M_extract_int
	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float)
	(num_get<>::_M_extract_int): Likewise, all callers changed
	* testsuite/22_locale/num_get_members_char.cc: Testcase

From-SVN: r48765
2002-01-11 05:14:47 +00:00
David Seymour 631ba05e3d locale_facets.h (num_get<>): Return advanced iterator for _M_extract_float and _M_extract_int
2002-01-10  David Seymour  <seymour_dj@yahoo.com>

	* include/bits/locale_facets.h (num_get<>): Return advanced iterator
	for _M_extract_float and _M_extract_int
	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float)
	(num_get<>::_M_extract_int): Likewise, all callers changed
	* testsuite/22_locale/num_get_members_char.cc: Testcase

From-SVN: r48764
2002-01-11 05:07:22 +00:00
Benjamin Kosnik 9fbcb61abb [multiple changes]
2002-01-08  Benjamin Kosnik  <bkoz@redhat.com>

        libstdc++/2913
        libstdc++/4879
	* include/bits/fstream.tcc (filebuf::_M_really_overflow): Test
	return value of _M_file->sync().
	(filebuf::showmanyc): Check for is_open.
	* include/std/fstream (filebuf::sync): Tweak.
	* testsuite/27_io/filebuf.cc: Tweak.

2002-01-08  John Fardo  <jfardo@laurelnetworks.com>
	    Brad Garcia  <garsh@attbi.com>

	* testsuite/27_io/filebuf_members.cc: Add test.

From-SVN: r48654
2002-01-08 19:57:01 +00:00
David Billinghurst ab10a269bb testsuite_flags.in: Add -fmessage-length=0 to CXXFLAGS testsuite/lib/prune.exp...
2002-01-07  David Billinghurst <David.Billinghurst@riotinto.com>

	* testsuite_flags.in:  Add -fmessage-length=0 to CXXFLAGS
	testsuite/lib/prune.exp: Delete lines ":In function ..."
	from compiler output
	testsuite/23_containers/map_operators.cc: Remove
	dg-excess-errors comment
	testsuite/23_containers/set_operators.cc: Likewise

From-SVN: r48590
2002-01-07 00:07:27 +00:00
Paolo Carlini 3b007b5d6b stl_tree.h (rb_tree): Move to...
2002-01-04  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/stl_tree.h (rb_tree):  Move to...
	* include/ext/rb_tree:  ...here, new file.
        * include/Makefile.am (ext_headers):  Add new file.
        * include/Makefile.in:  Regenerate.
        * include/bits/stl_tempbuf.h (get_temporary_buffer + helper,
	return_temporary_buffer, struct temporary_buffer):  Move to...
        * include/ext/memory:  ...here.
        * testsuite/ext/headers.cc:  Include <ext/rb_tree>.
	* include/backward/tempbuf.h:  Include <ext/memory>, tweak.
	* include/backward/tree.h:  Include <ext/rb_tree), tweak.

From-SVN: r48538
2002-01-04 17:02:28 +00:00
Paolo Carlini 01b0d4b85a stl_numeric.h (power + helpers, iota): Move to...
2002-01-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/stl_numeric.h (power + helpers, iota):  Move to...
	* include/ext/numeric:  ...here, new file.
        * include/bits/stl_function.h (identity_element, unary_compose,
	binary_compose, compose1, compose2, identity, select1st,
	select2nd, project1st + helper, project2nd + helper,
	constant_void_fun + helper, constant_unary_fun + helper,
	costant_binary_fun + helper, constant0, constant1, constant2,
	subtractive_rng, mem_fun1, mem_fun1_ref):  Move to...
        * include/ext/functional:  ...here, new file.
        * include/Makefile.am (ext_headers):  Add new files.
        * include/Makefile.in:  Regenerate.
        * testsuite/ext/headers.cc:  Include <ext/numeric> and
	<ext/functional>.
	* include/backward/algo.h:  Include <ext/numeric>, tweak.
	* include/backward/function.h:  Include <ext/functional>, tweak.
        * include/ext/ropeimpl.h:  Include <ext/numeric>.

From-SVN: r48519
2002-01-03 19:02:18 +00:00
David Billinghurst dd37368c6d prune.exp: Correct regular expression for -ffunction-sections
2002-01-03  David Billinghurst <David.Billinghurst@riotinto.com>

	* testsuite/lib/prune.exp: Correct regular expression for
	-ffunction-sections

From-SVN: r48511
2002-01-03 14:25:14 +00:00
Phil Edwards bf7edb60c8 re PR libstdc++/2054 (g++-3 rejects legal code, accepted by g++-2.95.2 (functors))
2002-01-02  Phil Edwards  <pme@gcc.gnu.org>

	* include/bits/stl_algo.h (upper_bound, equal_range, binary_search):
	Change concept checks, as with lower_bound and PR 2054.
	* testsuite/ext/concept_checks.cc:  Expand test to include those.

From-SVN: r48492
2002-01-03 04:44:07 +00:00
Paolo Carlini f53d0ff143 stl_algobase.h (copy_n + helpers, [...]): Move to...
2002-01-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/stl_algobase.h (copy_n + helpers,
	lexicographical_compare_3way + helpers):  Move to...
	* include/ext/algorithm:  ...here.
        * include/bits/stl_uninitialized.h (uninitialized_copy_n +
        helpers):  Move to...
        * include/ext/memory:  ...here, new file.
        * include/Makefile.am (ext_headers):  Add new file.
        * include/Makefile.in:  Regenerate.
        * testsuite/ext/headers.cc:  Include <ext/memory>.
	* include/backward/algobase.h:  Include <ext/memory> and
	<ext/algorithm>, tweak.
        * include/ext/ropeimpl.h:  Include <ext/memory>, tweak.
	* include/ext/stl_rope.h:  Include <ext/memory>, tweak.

From-SVN: r48467
2002-01-02 12:16:56 +00:00
Paolo Carlini 6d66e50d52 iterator: Add #include <bits/std_iterator.h>, tweak.
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/iterator:  Add #include <bits/std_iterator.h>, tweak.
	* testsuite/ext/headers.cc:  Add <ext/iterator>.

From-SVN: r48430
2001-12-31 19:30:24 +00:00
Paolo Carlini e538847e1c hash_map: Move into __gnu_cxx, tweak, add using declarations.
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/hash_map:  Move into __gnu_cxx,
	tweak, add using declarations.
	* include/ext/hash_set:  Ditto.
	* include/ext/ropeimpl.h:  Ditto.
	* include/ext/stl_hash_fun.h:  Ditto.
	* include/ext/stl_hashtable.h:  Ditto.
	* include/ext/stl_rope.h:  Ditto.
	* src/ext-inst.cc: Tweak.
	* testsuite/ext/rope.cc: Tweak.

From-SVN: r48422
2001-12-31 10:22:00 +00:00
Phil Edwards be3996918f re PR libstdc++/2054 (g++-3 rejects legal code, accepted by g++-2.95.2 (functors))
2001-12-28  Phil Edwards  <pme@gcc.gnu.org>

	PR libstdc++/2054
	* include/bits/stl_algo.h (lower_bound):  Relax concept checks.
	* testsuite/ext/concept_checks.cc:  New file.

From-SVN: r48351
2001-12-28 21:57:47 +00:00
Paolo Carlini 2c1bc4ebc9 stl_algo.h (count returning void, [...]): Move to...
2001-12-28  Paolo Carlini  <pcarlini@unitus.it>

        * include/bits/stl_algo.h (count returning void,
        count_if returning void, __random_sample, random_sample,
        random_sample_n, __is_heap, is_heap, is_sorted):  Move to...
        * include/ext/algorithm:  ...here, new file.
	* include/Makefile.am (ext_headers):  Add new file.
        * include/Makefile.in:  Regenerate.
	* testsuite/ext/headers.cc:  Include <ext/algorithm>.

From-SVN: r48350
2001-12-28 18:46:54 +00:00
Paolo Carlini bf95248579 basic_string.h (insert(__pos, __s, __n)): Optimize by avoiding temporaries and working in-place when possible.
2001-12-28  Paolo Carlini  <pcarlini@unitus.it>
            Nathan Myers  <ncm@cantrip.org>

	* include/bits/basic_string.h (insert(__pos, __s, __n)):
	Optimize by avoiding temporaries and working in-place when possible.
	(insert(__pos1, __str)): Call insert(__pos1, __str, __pos2, __n).
	(insert(__pos1, __str, __pos2, __n)): Call insert(__pos, __s, __n).
	* testsuite/21_strings/insert.cc (test02): New testcases.

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

From-SVN: r48345
2001-12-28 14:00:18 +00:00
Phil Edwards bb2ae697ab testsuite_hooks.h (gnu_counting_struct): Add.
2001-12-27  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/testsuite_hooks.h (gnu_counting_struct):  Add.
	* testsuite/23_containers/deque_ctor.cc:  New file.

From-SVN: r48332
2001-12-27 21:51:28 +00:00
Phil Edwards 2d53d9ebe7 re PR libstdc++/3829 (missing template instantiations)
2001-12-27  Phil Edwards  <pme@gcc.gnu.org>

	PR libstdc++/3829
	* src/misc-inst.cc:  Many additional I/O-related instantiations.
	* testsuite/27_io/instantiations.cc:  New file.

From-SVN: r48324
2001-12-27 07:26:00 +00:00
Benjamin Kosnik f591eb23d1 insert_iterator.cc (test02): Add.
2001-12-26  Benjamin Kosnik  <bkoz@waller.constant.com>

	* testsuite/24_iterators/insert_iterator.cc (test02): Add.
	* testsuite/24_iterators/front_insert_iterator.cc (test02): Add.
	* testsuite/24_iterators/back_insert_iterator.cc (test02): Add.
	* testsuite/24_iterators/reverse_iterator.cc (test02): Add.

	* include/bits/stl_iterator.h (reverse_iterator): Uglify member
	current to _M_current.
	(back_insert_iterator): Ulify member container to _M_container.
	(front_insert_iterator): Same.
	(insert_iterator): Same.

From-SVN: r48318
2001-12-26 21:56:17 +00:00
David Billinghurst c6d96f20fd libstdc++-v3-dg.exp: Append .exe to executable filenames
2001-12-19  David Billinghurst <David.Billinghurst@riotinto.com>

        libstdc++-v3/5148
        * testsuite/lib/libstdc++-v3-dg.exp:  Append .exe to
        executable filenames

From-SVN: r48167
2001-12-18 23:34:06 +00:00
David Billinghurst 9e78e45a8d prune.exp: New file
2001-12-17  David Billinghurst <David.Billinghurst@riotinto.com>

	libstdc++/5136
	* testsuite/lib/prune.exp: New file
	* testsuite/lib/libstdc++-v3-dg.exp: Use it

From-SVN: r48133
2001-12-17 22:39:00 +00:00
Phil Edwards e9c46bb75e basic_file.h (__basic_file::fd): New function.
2001-12-17  Phil Edwards  <pme@gcc.gnu.org>

	* include/bits/basic_file.h (__basic_file::fd):  New function.
	* config/io/basic_file_stdio.h (__basic_file::fd):  Define.
	* include/bits/std_fstream.h (basic_filebuf::fd):  New function.
	* include/bits/fstream.tcc (basic_filebuf::fd):  Define.
	* testsuite/27_io/filebuf_members.cc (test_02):  New test.

From-SVN: r48107
2001-12-17 17:08:57 +00:00
Paolo Carlini 4b428ee570 assign.cc (test01): Add tests.
2001-12-16  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/21_strings/assign.cc (test01): Add tests.

From-SVN: r48078
2001-12-16 20:21:20 +00:00
Paolo Carlini bd1f473825 2001-12-15 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers  <ncm@cantrip.org>

        * include/bits/basic_string.h
	(assign(__str, __pos, __n), assign(__s, __n)):  Optimize
	by avoiding unnecessary temporaries.
	(assign(__s)): Call assign(__s, __n).
	* include/bits/basic_string.tcc (_M_replace_safe): Adjust comment.
	* include/bits/std_string.h: include stl_function.h.
        * testsuite/21_strings/assign.cc (test02, test03): New tests.

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

From-SVN: r48053
2001-12-16 01:02:17 +00:00
Benjamin Kosnik def9790d51 Clean up initialization and simplfy caching of underlying "C" locale objects.
2001-12-14  Benjamin Kosnik  <bkoz@redhat.com>

	Clean up initialization and simplfy caching of underlying "C"
	locale objects.
	* src/localename.cc (locale::_Impl::_Impl(string, size_t):
	Unconditionally create __clocale object for all named locales,
	including "C" and "POSIX".
	* config/locale/c_locale_generic.cc
	(locale::facet::_S_create_c_locale): Always set __cloc to zero.
	* config/locale/c_locale_gnu.cc: Always delete.
	* include/bits/localefwd.h (locale::facet::_S_c_locale): New.
	* src/locale.cc (locale::classic()): Initialize
	locale::facet::_S_c_locale.
	(locale::facet::_S_c_locale): Define.

	* include/bits/locale_facets.h: Add ctype_byname<wchar_t> ctor
	specialization.
	* src/locale.cc: Add definition here.
	* config/os/gnu-linux/bits/ctype_inline.h: Tweak.
	* config/os/gnu-linux/bits/ctype_noninline.h: Adjust initializations.
	* include/bits/locale_facets.h (ctype<char>::_M_c_locale_ctype): Add.
	Adjust ctors, dtors.
	(ctype<char>::_M_toupper): Remove const&.
	(ctype<char>::_M_tolower): Remove const&.
	(ctype<char>::_M_ctable): Remove const&.

	* include/bits/locale_facets.h (collate): Clean up initialization
	of _M_c_locale_collate in ctors and dtors.
	* config/locale/collate_members_gnu.cc: Always use extended
	functions.

	* include/bits/locale_facets.h (messages): Clean up inits in ctor/dtor.
	(messages_byname): Same.
	* config/locale/messages_members_generic.h (messages::~messages):
	Remove.
	* config/locale/messages_members_gnu.h: Same.

	* include/bits/localefwd.h: Clean. Move dtor definitions to
	* src/locale.cc: Here.
	* testsuite/22_locale/facet.cc: Fix spelling.

	Named locale support for ctype<wchar_t>.
        * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add variable
        ctype_members_* bits.
        * aclocal.m4: Regenerate.
        * configure: Regenerate.
        * src/Makefile.am (sources): Add ctype.cc.
        * src/Makefile.in: Regenerate.
        * config/locale/ctype_members_generic.cc: New file.
        * config/locale/ctype_members_gnu.cc: New file.
        * src/locale.cc: Remove ctype<wchart_t> definitions.

From-SVN: r48034
2001-12-15 07:05:04 +00:00
Benjamin Kosnik 85230e5255 locale.cc (locale::locale(const char*)): Deal with locales named "".
2001-12-13  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3679
	* src/locale.cc (locale::locale(const char*)): Deal with locales
	named "".
	* testsuite/22_locale/ctor_copy_dtor.cc (test01): Modify.

From-SVN: r47968
2001-12-13 11:12:56 +00:00
Paolo Carlini 897bb55fe3 ropeimpl.h (rope::_S_leaf_concat_char_iter, [...]): Adjust implicit typename.
2001-12-12  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/ropeimpl.h (rope::_S_leaf_concat_char_iter,
	_S_destr_leaf_concat_char_iter, _S_tree_concat, _S_concat_char_iter,
	_S_destr_concat_char_iter, _S_concat, _S_substring, _S_balance)
	: Adjust implicit typename.
	* include/ext/stl_rope.h (_Rope_iterator::operator=, rope::npos):
	Adjust implicit typename.
	* testsuite/27_io/streambuf.cc: Adjust implicit typename.

From-SVN: r47958
2001-12-13 00:41:03 +00:00
Benjamin Kosnik 9e5c7dba50 Named locale support for ctype<char>.
2001-12-12  Benjamin Kosnik  <bkoz@redhat.com>

	Named locale support for ctype<char>.
	* config/locale/c_locale_gnu.h (_GLIBCPP_C_LOCALE_GNU): New.
	* config/os/gnu-linux/bits/ctype_noninline.h (ctype<char>): Add
	definitions for alternate constructor.
	* config/os/solaris/solaris2.7/bits/ctype_noninline.h (ctype): Same.
	* config/os/solaris/solaris2.6/bits/ctype_noninline.h (ctype): Same.
	* config/os/solaris/solaris2.5/bits/ctype_noninline.h (ctype): Same.
	* config/os/newlib/bits/ctype_noninline.h (ctype): Same.
	* config/os/irix/irix6.5/bits/ctype_noninline.h (ctype): Same.
	* config/os/irix/irix5.2/bits/ctype_noninline.h (ctype): Same.
	* config/os/hpux/bits/ctype_noninline.h (ctype): Same.
	* config/os/generic/bits/ctype_noninline.h (ctype): Same.
	* config/os/djgpp/bits/ctype_noninline.h (ctype): Same.
	* config/os/bsd/netbsd/bits/ctype_noninline.h (ctype): Same.
	* config/os/bsd/freebsd/bits/ctype_noninline.h (ctype): Same.
	* config/os/aix/bits/ctype_noninline.h (ctype): Same.
	* include/bits/locale_facets.h (ctype<_CharT>): Remove dummy
	definitions for all virtual functions. These are now explicitly
	undefined for non-required factets, ie any non-char, non-wchar_t
	instantiations.
	* src/localename.cc (locale::_Impl::_Impl(string, size_t): Named
	locales use alternate constructor for ctype facet.
	* include/bits/locale_facets.h (ctype<char>::ctype(__c_locale, const
	mask*, bool, size_t): Add.
	(ctype<wchar_t>::ctype(__c_locale, size_t): Add.
	* src/locale.cc (ctype<wchar_t>::ctype(__c_locale, size_t)): Add
	definition.

	* testsuite/22_locale/ctype_members_char.cc (test02): Add, mark
	XFAIL for non-gnu locale models.

From-SVN: r47953
2001-12-12 23:16:35 +00:00
Philip Martin cb93dfb4a0 Ross Smith <r-smith@ihug.co.nz> Paolo Carlini <pcarlini@unitus.it>
2001-12-12  Philip Martin  <philip@codematters.co.uk>
            Ross Smith     <r-smith@ihug.co.nz>
            Paolo Carlini  <pcarlini@unitus.it>

	libstdc++/5045
	* include/bits/std_limits.h (defines, numeric_limits<bool>::digits10):
	Fix digits10 values for integral types.
	* include/bits/locale_facets.tcc (num_get::do_get for integral types):
	Tweak _M_extract_int call.
	* testsuite/27_io/istream_extractor_arith.cc (test13, test12_aux):
	Tweak overflowing number of digits.
	* testsuite/18_support/numeric_limits.cc (test03): New testcase.

Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>
Co-Authored-By: Ross Smith <r-smith@ihug.co.nz>

From-SVN: r47947
2001-12-12 20:23:30 +00:00
Phil Edwards 3c612a619d allocators.cc: New file.
2001-12-11  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/ext/allocators.cc:  New file.

From-SVN: r47888
2001-12-11 19:04:58 +00:00
Benjamin Kosnik 2a74463013 locale_facets.h (__num_base::_S_scale_hex): Add.
2001-12-09  Benjamin Kosnik  <bkoz@redhat.com>
	    Philip Martin <pmartin@uklinux.net>

	* include/bits/locale_facets.h (__num_base::_S_scale_hex): Add.
	(__num_base::_S_scale_oct): Add.
	* src/locale.cc: Add definitions.
	* testsuite/27_io/istream_extractor_arith.cc (main): Call test13.

	* testsuite/testsuite_hooks.h: Remove duplicate VERIFY define.

Co-Authored-By: Philip Martin <pmartin@uklinux.net>

From-SVN: r47837
2001-12-10 08:41:03 +00:00
Benjamin Kosnik 823b4f7daa [multiple changes]
2001-12-06  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3720
	* include/bits/locale_facets.tcc (num_put): Clean.
	(num_get::_M_extract_float): Change argument to string.
	(num_get::do_get(float)): Fixup.
	(num_get::do_get(double)): Same.
	(num_get::do_get(long double)): Same.
	(num_get::_M_extract_int): Add maximum length parameter, __max.
	(num_get::_M_extract_float): Correct zeros, use string.
	* include/bits/locale_facets.h (num_get::_M_extract_float): Change
	declaration here.
	* src/locale.cc (__num_base::_S_atoms): Remove x, X.
	* testsuite/27_io/istream_extractor_arith.cc (test13): Add.

2001-12-06  Philip Martin  <pmartin@uklinux.net>

	* testsuite/27_io/istream_extractor_arith.cc (test12): Add
	tests for excess input digits.

From-SVN: r47743
2001-12-07 02:58:36 +00:00
Benjamin Kosnik 0228de0c4f [multiple changes]
2001-12-05  Benjamin Kosnik  <bkoz@redhat.com>

	DR/282
	* include/bits/locale_facets.tcc (num_put::_M_widen_float): Add
	grouping to floating point types.
	* testsuite/27_io/ostream_inserter_arith.cc (test02): Add test.

2001-12-04  Paolo Carlini <pcarlini@unitus.it>

        libstdc++/4402
        * testsuite/27_io/ostream_inserter_arith.cc (test02): add testcase
	from the PR.
        * include/bits/locale_facets.tcc (num_put::_M_convert_float):
        Deal properly with long ios_base::fixed floats.
        (num_put::_M_widen_float): use
	__len in __builtin_alloca call.

From-SVN: r47696
2001-12-05 22:07:36 +00:00
Benjamin Kosnik 5b5e609d03 [multiple changes]
2001-12-04  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (sources): Add ext-inst.cc.
	* src/Makefile.in: Regenerate.
	* src/ext-inst.cc: New file.
	* include/bits/stl_threads.h: Format.
	* src/globals.cc: Add instantiation for _S_swap_lock.

	* testsuite/18_support/numeric_limits.cc: Add numeric_limits<B>
	instantiation.

2001-12-04  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* testsuite/22_locale/numpunct_members_wchar_t.cc: Only compile
	and execute test01 if _GLIBCPP_USE_WCHAR_T is defined.
	* testsuite/26_numerics/complex_inserters_extractors.cc: Provide
	for explicit instantiation of class std::basic_string<char,
	gnu_char_traits, std::allocator<char> >.

From-SVN: r47622
2001-12-04 20:13:41 +00:00
Benjamin Kosnik dbb27f267a collate.cc: Compile-only.
2001-12-03  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/collate.cc: Compile-only.
	* testsuite/22_locale/time_get.cc: Same.
	* testsuite/22_locale/time_put.cc: Same.
	* testsuite/22_locale/numpunct.cc: Same.
	* testsuite/22_locale/num_put.cc: Same.
	* testsuite/22_locale/num_get.cc: Same.
	* testsuite/22_locale/moneypunct.cc: Same.
	* testsuite/22_locale/money_get.cc: Same.
	* testsuite/22_locale/messages.cc: Same.
	* testsuite/22_locale/ctype.cc: Same.

From-SVN: r47592
2001-12-04 07:15:01 +00:00
Paolo Carlini b334004616 locale_facets.tcc (__pad): Add bool parameter to correctly pad internal-adjusted const char*-type objects.
2001-11-29  Paolo Carlini  <pcarlini@unitus.it>

	libstdc++/3655
	* include/bits/locale_facets.tcc (__pad): Add bool parameter to
	correctly pad internal-adjusted const char*-type objects.
	* include/bits/locale_facts.tcc (num_put::_M_insert): Update call.
	* include/bits/ostream.tcc (operator<<(_CharT , char, const
	_CharT*, const char*, const basic_string&): Update calls.
	* src/locale-inst.tcc: Update declarations.
	* testsuite/27_io/ostream_inserter_arith.cc (test04): Add test.

From-SVN: r47459
2001-11-29 22:31:02 +00:00
Paolo Carlini 5a4c85886a locale_facets.tcc (__pad): correctly output hex numbers internally aligned.
2001-11-28  Paolo Carlini  <pcarlini@unitus.it>

	libstdc++/3655
	* include/bits/locale_facets.tcc (__pad): correctly output hex
	numbers internally aligned.
	* testsuite/27_io/ostream_inserter_arith.cc: Add testcase.

From-SVN: r47433
2001-11-29 00:27:54 +00:00
Benjamin Kosnik 074a8e74dd locale_facets.tcc: Formatting tweaks.
2001-11-27  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc: Formatting tweaks.

	* testsuite/23_containers/map_operators.cc: Don't xfail.
	* testsuite/23_containers/set_operators.cc: Same.
	* testsuite/backward/header_iterator_h.cc: Pass in -Wno-deprecated.
	* testsuite/backward/header_deque_h.cc: Same.

From-SVN: r47401
2001-11-28 06:53:29 +00:00
Benjamin Kosnik 5fd0af8754 locale_facets.tcc: Formatting tweaks.
2001-11-27  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc: Formatting tweaks.

	* testsuite/23_containers/map_operators.cc: Don't xfail.
	* testsuite/23_containers/set_operators.cc: Same.

From-SVN: r47400
2001-11-28 06:35:00 +00:00
Benjamin Kosnik ec9d6e9f45 Numeric facets cleanup.
2001-11-27  Benjamin Kosnik  <bkoz@redhat.com>

	Numeric facets cleanup.
	* include/bits/locale_facets.h (__num_base::_S_atoms): Add, remove
	+ and - signs.
	(__num_base::_M_zero): Add
	(__num_base::_M_e): Add.
	(__num_base::_M_E): Add.
	* include/bits/locale_facets.tcc (num_get::_M_extract): Remove.
	(num_get::_M_extract_float): New.
	(num_get::_M_extract_int): New.
	* src/locale.cc (num_get::_M_extract): Remove.

	* include/bits/locale_facets.tcc (num_put::_M_insert_float):
	Simplify, use _M_insert.
	(num_put::do_put(bool)): Simplify, remove __pad.
	(__pad): Remove.
	(__pad_output): Change to __pad.
	* include/bits/ostream.tcc: And here.
	* src/locale-inst: Remove instantiations.

	* include/bits/locale_facets.h: Move helper functions in to class
	num_put.
	(num_put::_M_insert_float): Same, for __output_integer.
	(num_put::_M_insert_int): Same, for __output_float.
	(num_put::_M_insert): New.
	(__num_base): Add.
	(__num_base::_S_format_float): Move
	__build_float_format into class __num_base.
	(__num_base::_S_format_int): Move __build_int_format into class
	__num_base.
	* include/bits/locale_facets.tcc (__group_digits): Change to
	(__add_grouping): This.
	* src/locale-inst.cc: And here. Tweak instantiations.
	* src/misc-inst.cc: Remove instantiations.

	* include/bits/ostream.tcc (__pad_char): Rename, adjust inserters
	for new calling conventions, move to...
	* include/bits/locale_facets.tcc (__pad_output): Here. Adjust
	signature to make it useful for both ostream and num_put.
	(__pad_numeric): Remove.
	* src/misc-inst.cc: Remove instantiations.
	* src/locale-inst.cc: Same.

	* include/bits/locale_facets.h (_Numeric_get): Remove.
 	(_Numeric_put): Remove.
	(num_get::get(short)): Remove.
	(num_get::get(int)): Remove.
	(num_get::do_get(short)): Remove.
	(num_get::do_get(int)): Remove.
	* include/bits/istream.tcc (istream::operator>>(short)): Fix as
	per DR 118.
	(istream::operator>>(int)): Same.

	* include/bits/locale_facets.h (_Format_cache): Remove.
	* include/bits/locale_facets.tcc: Same.
	* src/locale.cc: Same.
	* src/locale-inst.cc: Same.
	* include/bits/ostream.tcc: Same.
	* src/ios.cc (ios_base::imbue): Remove here as well.

	* testsuite/22_locale/num_get.cc: New file.
	* testsuite/22_locale/num_get_members_char.cc: New file.
	* testsuite/22_locale/num_get_members_wchar_t.cc: New.
	* testsuite/22_locale/numpunct_members_wchar_t.cc: New file.
	* testsuite/22_locale/num_put.cc: New file.
	* testsuite/22_locale/num_put_members_char.cc: New file.
	* testsuite/22_locale/num_put_members_wchar_t.cc: New file.
	* testsuite/27_io/ostream_inserter_arith.cc: Fix.
	* testsuite/27_io/istream_extractor_arith.cc: Fix.

From-SVN: r47399
2001-11-28 06:29:55 +00:00
Benjamin Kosnik 86ade44cb2 Numeric facets cleanup.
2001-11-27  Benjamin Kosnik  <bkoz@redhat.com>

	Numeric facets cleanup.
	* include/bits/locale_facets.h (__num_base::_S_atoms): Add, remove
	+ and - signs.
	(__num_base::_M_zero): Add
	(__num_base::_M_e): Add.
	(__num_base::_M_E): Add.
	* include/bits/locale_facets.tcc (num_get::_M_extract): Remove.
	(num_get::_M_extract_float): New.
	(num_get::_M_extract_int): New.
	* src/locale.cc (num_get::_M_extract): Remove.

	* include/bits/locale_facets.tcc (num_put::_M_insert_float):
	Simplify, use _M_insert.
	(num_put::do_put(bool)): Simplify, remove __pad.
	(__pad): Remove.
	(__pad_output): Change to __pad.
	* include/bits/ostream.tcc: And here.
	* src/locale-inst: Remove instantiations.

	* include/bits/locale_facets.h: Move helper functions in to class
	num_put.
	(num_put::_M_insert_float): Same, for __output_integer.
	(num_put::_M_insert_int): Same, for __output_float.
	(num_put::_M_insert): New.
	(__num_base): Add.
	(__num_base::_S_format_float): Move
	__build_float_format into class __num_base.
	(__num_base::_S_format_int): Move __build_int_format into class
	__num_base.
	* include/bits/locale_facets.tcc (__group_digits): Change to
	(__add_grouping): This.
	* src/locale-inst.cc: And here. Tweak instantiations.
	* src/misc-inst.cc: Remove instantiations.

	* include/bits/ostream.tcc (__pad_char): Rename, adjust inserters
	for new calling conventions, move to...
	* include/bits/locale_facets.tcc (__pad_output): Here. Adjust
	signature to make it useful for both ostream and num_put.
	(__pad_numeric): Remove.
	* src/misc-inst.cc: Remove instantiations.
	* src/locale-inst.cc: Same.

	* include/bits/locale_facets.h (_Numeric_get): Remove.
 	(_Numeric_put): Remove.
	(num_get::get(short)): Remove.
	(num_get::get(int)): Remove.
	(num_get::do_get(short)): Remove.
	(num_get::do_get(int)): Remove.
	* include/bits/istream.tcc (istream::operator>>(short)): Fix as
	per DR 118.
	(istream::operator>>(int)): Same.

	* include/bits/locale_facets.h (_Format_cache): Remove.
	* include/bits/locale_facets.tcc: Same.
	* src/locale.cc: Same.
	* src/locale-inst.cc: Same.
	* include/bits/ostream.tcc: Same.
	* src/ios.cc (ios_base::imbue): Remove here as well.

	* testsuite/22_locale/num_get.cc: New file.
	* testsuite/22_locale/num_get_members_char.cc: New file.
	* testsuite/22_locale/num_get_members_wchar_t.cc: New.
	* testsuite/22_locale/numpunct_members_wchar_t.cc: New file.
	* testsuite/22_locale/num_put.cc: New file.
	* testsuite/22_locale/num_put_members_char.cc: New file.
	* testsuite/22_locale/num_put_members_wchar_t.cc: New file.
	* testsuite/27_io/ostream_inserter_arith.cc: Fix.
	* testsuite/27_io/istream_extractor_arith.cc: Fix.

From-SVN: r47397
2001-11-28 04:07:11 +00:00
Joseph Myers c5504edb75 ChangeLog, [...]: Fix spelling errors.
* ChangeLog, docs/doxygen/maint.cfg.in, docs/doxygen/user.cfg.in,
	docs/doxygen/doxygroups.cc, docs/doxygen/Intro.3,
	docs/html/17_intro/BUGS, docs/html/17_intro/C++STYLE,
	docs/html/17_intro/CHECKLIST, docs/html/17_intro/DESIGN,
	docs/html/17_intro/howto.html, docs/html/17_intro/porting.html,
	docs/html/17_intro/porting.texi, docs/html/18_support/howto.html,
	docs/html/19_diagnostics/howto.html, docs/html/20_util/howto.html,
	docs/html/21_strings/howto.html,
	docs/html/23_containers/howto.html,
	docs/html/26_numerics/howto.html, docs/html/27_io/howto.html,
	docs/html/27_io/binary_iostreams_kuehl.txt,
	docs/html/ext/sgiexts.html, docs/html/faq/index.html,
	docs/html/faq/index.txt, testsuite/24_iterators/iterator.cc,
	include/bits/basic_file.h, include/bits/locale_facets.h,
	include/bits/locale_facets.tcc, include/bits/std_sstream.h,
	include/ext/ropeimpl.h, include/ext/stl_rope.h,
	libsupc++/tinfo.cc, libsupc++/cxxabi.h, libsupc++/typeinfo,
	libsupc++/eh_throw.cc, acinclude.m4, aclocal.m4, configure,
	configure.target, ChangeLog-2000: Fix spelling errors.

From-SVN: r47291
2001-11-23 16:29:02 +00:00
Stephen M. Webb 1fc610939a list_capacity.cc: New file.
2001-11-22  Stephen M. Webb  <stephen@bregmasoft.com>

        * testsuite/23_containers/list_capacity.cc: New file.
        * testsuite/23_containers/list_ctor.cc: New file.
        * testsuite/23_containers/list_modifiers.cc: New file.
        * testsuite/23_containers/list_operators.cc: New file.

2001-11-22  Stephen M. Webb  <stephen@bregmasoft.com>

	* include/bits/stl_list.h: Reformatted according to C++STYLE rules.
	(size): Replaced nonstandard distance() call with the standard one.
	(transfer): Uglified to _M_transfer.

From-SVN: r47277
2001-11-22 19:19:23 +00:00
Paolo Carlini dcc61724f1 re PR libstdc++/4548 (When reserving a string to become smaller, program crashes)
2001-11-21  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/4548
	* include/bits/basic_string.tcc (basic_string::reserve):  Never shrink
	below the current size.
	* testsuite/21_strings/capacity.cc (test02):  Add test.

From-SVN: r47246
2001-11-21 22:04:53 +00:00
Phil Edwards 1b4a6975f7 Intro.3: More notes.
2001-11-19  Phil Edwards  <pme@gcc.gnu.org>

	* docs/doxygen/Intro.3:  More notes.
	* docs/doxygen/style.css:  Update to default style from Doxygen 1.2.10.
	* include/bits/stl_algobase.h:  Add doxygen hooks for functions.
	* include/ext/hash_map:  Add @file hook.
	* include/ext/hash_set:  Likewise.
	* include/ext/rope:  Likewise.
	* include/ext/ropeimpl.h:  Likewise.
	* include/ext/slist:  Likewise.
	* include/ext/stl_hash_fun.h:  Likewise.
	* include/ext/stl_hashtable.h:  Likewise.
	* include/ext/stl_rope.h:  Likewise.

	* docs/html/17_intro/license.html:  Remove "experimental" sentence.
	* docs/html/19_diagnostics/howto.html:  Document new verbose
	terminate handler.
	* testsuite/27_io/filebuf.cc:  Fix comment, move tweakable parameter
	to more visible (closer to description) position.

	* libsupc++/eh_type.cc:  Formatting tweak.
	* libsupc++/exception:  Likewise.
	* src/vterminate.cc:  Likewise.

	* docs/html/17_intro/porting.html:  Regenerate.
	* docs/html/faq/index.txt:  Regenerate.

From-SVN: r47193
2001-11-20 00:51:37 +00:00
Paolo Carlini 2dc8835ac8 ios_manip_fmtflags.cc: Fix for non-interactive output.
2001-11-01  Paolo Carlini  <pcarlini@unitus.it>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/ios_manip_fmtflags.cc: Fix for non-interactive
	output.
	* include/bits/locale_facets.tcc (num_put::do_put(bool)): Fix.

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

From-SVN: r46709
2001-11-02 03:48:09 +00:00
Benjamin Kosnik c7e2dba59a codecvt.h: Add virtual member function declarations.
2001-10-31  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/4749
	* include/bits/codecvt.h: Add virtual member function declarations.
	* src/codecvt.cc: Tweaks.
	* testsuite/22_locale/codecvt.cc: Test compilation only,
	non-required facets not required to have linkage.

From-SVN: r46685
2001-10-31 20:05:33 +00:00
Paolo Carlini 9a304d1766 basic_string.h: Tweaks.
2001-10-30  Paolo Carlini  <pcarlini@unitus.it>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_string.h: Tweaks.
	* include/bits/basic_string.tcc (string::_M_replace(iterator,
	iterator, _ForwardIter, _ForwardIter, forward_iterator_tag): Fix.
	* src/string-inst.cc: Tweaks, add instantiation.
	* testsuite/21_strings/replace.cc (test02): Add test.
	* testsuite/21_strings/assign.cc (test01): New file.

0

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

From-SVN: r46674
2001-10-31 08:27:20 +00:00
Benjamin Kosnik 99e9125d77 fstream.tcc (filebuf::showmanyc): Simplify.
2001-10-29  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3647
	* include/bits/fstream.tcc (filebuf::showmanyc): Simplify.
	* testsuite/27_io/filebuf.cc (test07): New test.
	(test03): Modify showmanyc test.

From-SVN: r46610
2001-10-29 19:29:29 +00:00
Benjamin Kosnik 322821b9ad Make -fno-exceptions work.
2001-10-23  Benjamin Kosnik  <bkoz@redhat.com>

	Make -fno-exceptions work.
	* config/locale/c_locale_gnu.cc: Use functexcept.
	* include/bits/c++config (__stl_assert): Remove.
	(__STL_USE_EXCEPTIONS): Same.
	(__STL_TRY): Same.
	(__STL_CATCH_ALL): Same.
	(__STL_THROW): Same.
	(__STL_RETHROW): Same.
	(__STL_NOTHROW): Same.
	(__STL_UNWIND): Same.
	* include/bits/pthread_allocimpl.h: Fix.
	* include/bits/std_bitset.h: Same.
	* include/bits/std_list.h: Same.
	* include/bits/std_memory.h: Same.
	* include/bits/std_queue.h: Same.
	* include/bits/stl_alloc.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/stl_list.h: Same.
	* include/bits/stl_queue.h: Same.
	* include/bits/stl_tempbuf.h: Same.
	* include/bits/stl_tree.h: Same.
	* include/bits/stl_uninitialized.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/ext/ropeimpl.h: Same.
	* include/ext/slist: Same.
	* include/ext/stl_hashtable.h: Same.
	* include/ext/stl_rope.h: Same.
	* libsupc++/new_op.cc: Include cstdlib.
	* libsupc++/eh_personality.cc: Add exception_defines include. Use
	__throw_exception_again, tweak.
	* libsupc++/eh_aux_runtime.cc: Include stdlib for abort.
	* libsupc++/vec.cc: Tweak.
	* src/functexcept.cc: Remove unused arguments.
	* testsuite/23_containers/bitset_members.cc: Tweak.

From-SVN: r46455
2001-10-24 02:37:56 +00:00
Benjamin Kosnik f295ecef02 limits.h: Move to...
2001-10-22  Benjamin Kosnik  <bkoz@redhat.com>

	* config/cpu/i386/bits/limits.h: Move to...
	* config/cpu/i386/bits/cpu_limits.h: ...here.
	* config/cpu/cris/bits/cpu_limits.h: Same.
	* config/cpu/powerpc/bits/cpu_limits.h: Same.
	* config/cpu/x86-64/bits/cpu_limits.h: Same.
	* config/cpu/alpha/bits/cpu_limits.h: New.
	* config/cpu/m68k/bits/cpu_limits.h: New.
	* config/cpu/s390/bits/cpu_limits.h: New.
	* config/os/aix/bits/os_defines.h: Tweaks.
	* config/os/bsd/freebsd/bits/os_defines.h: Same.
	* config/os/bsd/netbsd/bits/os_defines.h: Same.
	* config/os/djgpp/bits/os_defines.h: Same.
	* config/os/generic/bits/os_defines.h: Same.
	* config/os/gnu-linux/bits/os_defines.h: Same.
	* config/os/hpux/bits/os_defines.h: Same.
	* config/os/irix/irix5.2/bits/os_defines.h: Same.
	* config/os/irix/irix6.5/bits/os_defines.h: Same.
	* config/os/newlib/bits/os_defines.h: Same.
	* config/os/solaris/solaris2.5/bits/os_defines.h: Same.
	* config/os/solaris/solaris2.6/bits/os_defines.h: Same.
	* config/os/solaris/solaris2.7/bits/os_defines.h: Same.

	* include/bits/c++config: Remove include.
	* include/bits/limits_generic.h: Remove.
	* include/bits/std_limits.h: Include cpu_limits.h.
	* include/Makefile.am: Fixup.
	* src/limits.cc: Tweak.
	* src/limits_generic.cc: Remove.
	* src/gen-num-limits.cc: Remove.
	* mknumeric_limits: Remove.

From-SVN: r46445
2001-10-23 21:40:31 +00:00
Dimitris Vyzovitis 8bf4eeece3 stl_threads.h (_Atomic_swap): New function.
* include/bits/stl_threads.h (_Atomic_swap): New function.
	    (_Swap_lock_struct<__dummy>::_S_swap_lock): New data.
	    * testsuite/ext/rope.cc: New file.

From-SVN: r45999
2001-10-03 21:19:31 +00:00
Benjamin Kosnik da5c0f6ef5 time_members_gnu.h: Remove.
2001-10-02  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/time_members_gnu.h: Remove.
	* config/locale/time_members_generic.h: Remove.
	* config/locale/time_members_gnu.cc (__timepunct::_M_put_helper): Add.
	* config/locale/time_members_generic.cc: Same.
	* include/bits/locale_facets.h: Add data members.
	(__timepunct::_M_put_helper): Change signature.
	(__timepunct::_M_date_formats): Same.
	(__timepunct::_M_time_formats): Same.
	(__timepunct::_M_ampm): Add.
	(__timepunct::_M_date_time_formats): Add.
	(time_get::_M_extract_via_format): Add.
	(time_get::_M_extract_time): Change to...
	(time_get::_M_extract_num): ... this, modify signature.
	* include/bits/locale_facets.tcc (time_get::do_get_year): Fix.
	(time_get::do_get_time): Fix.
	(time_get::do_get_date): Fix.

	* acinclude.m4: Remove CTIME_H.
	* aclocal.m4: Regenerate.
	* include/Makefile.am: Same.
	* include/Makefile.in: Regenerate.
	* configure: Regenerate.

	* testsuite/22_locale/time_get_members_char.cc: Fix.
	* testsuite/22_locale/time_get_members_wchar_t.cc: Add.
	* testsuite/22_locale/time_put_members_wchar_t.cc: Add.

From-SVN: r45966
2001-10-02 18:44:50 +00:00
Benjamin Kosnik 1ab656771a time_members_gnu.h (__timepunct::_M_get_helper): Add.
2001-09-28  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/time_members_gnu.h (__timepunct::_M_get_helper): Add.
	(__timepunct::_M_put_helper): Add.
	* config/locale/time_members_generic.h: Same.
	* include/bits/locale_facets.h (__match_parallel): Remove. Format.
	(__timepunct): Add data members.
	(__timepunct::_M_days): Add.
	(__timepunct::_M_days_abbreviated): Add.
	(__timepunct::_M_months): Add.
	(__timepunct::_M_months_abbreviated): Add.
	(__timepunct::_M_initialize_timepunct): Add.
	* include/bits/locale_facets.tcc: Same.
	* src/locale-inst.cc: Remove instantiations for __match_parallel.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add CTIME_CC.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/22_locale/time_put_members_char.cc: Mark XFAIL.
	* testsuite/22_locale/time_put_members_char.cc (test01): New file.
	* testsuite/22_locale/time_get.cc: New file.

From-SVN: r45868
2001-09-28 23:44:48 +00:00
Rainer Orth c20d89f553 libstdc++-v3-dg.exp (libstdc++-v3-init): Use correct multilib builddir.
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Use
	correct multilib builddir.
	Properly locate libgcc_s.

From-SVN: r45864
2001-09-28 19:42:12 +00:00
Phil Edwards 4c1805d702 c_strings.cc (test01, test02): Increase `carray' size.
2001-09-25  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/21_strings/c_strings.cc (test01, test02):  Increase
	`carray' size.

From-SVN: r45817
2001-09-26 01:45:49 +00:00
Benjamin Kosnik 5b66fcf9a9 [multiple changes]
2001-09-20  Scott Johnston <scott@accom.com>
	    Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>

	* include/backward/alloc.h: Conditionally define malloc_alloc
	* testsuite/backward/header_deque_h.cc: New file.

2001-09-20  Sylvain Pion <Sylvain.Pion@sophia.inria.fr>

	* libstdc++-v3/include/bits/locale_facets.tcc (money_put::do_put):
        change variable name so that it works with -fno-for-scope.

From-SVN: r45704
2001-09-20 09:48:24 +00:00
Benjamin Kosnik 9a92330f24 numpunct_members_char.cc (test01): Remove redundant sanity checks.
2001-09-20  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/numpunct_members_char.cc (test01): Remove
	redundant sanity checks.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test01): Same.
	(test02): Same.
	* testsuite/22_locale/money_put_members_char.cc (test01): Same.
	(test02): Same.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc (test01): Same.
	* testsuite/22_locale/moneypunct_members_char.cc (test01): Same.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test01): Same.
	(test02): Same.
	* testsuite/22_locale/money_get_members_char.cc (test01): Same.
	(test02): Same.

From-SVN: r45703
2001-09-20 09:07:37 +00:00
Benjamin Kosnik e08138aae3 Implement std::time_put.
2001-09-19  Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::time_put.
	* include/bits/locale_facets.h: Include time_members.h.
	(__timepunct): New.
	(time_put): Implement.
	* include/bits/locale_facets.tcc (do_put): Put generic versions here.
	* include/bits/localefwd.h: Bump number of facets.
	* config/locale/time_members_generic.h: New file.
	* config/locale/time_members_gnu.h: New file.
	* config/locale/c_locale_generic.h: Include clocale.
	* src/locale-inst.cc: Add use_facet instantiations for __timepunct.
	* src/locale.cc: Add __timepunct initializations.
	* src/localename.cc (locale::_Impl::_Impl(string, size_t)): Same.
	* include/Makefile.am (stamp-target): Add time_members.h.
	* include/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add CTIME_H.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/22_locale/time_put.cc: New file.
	* testsuite/22_locale/time_put_members_char.cc: New file.

	* docs/html/22_locale/locale.html: Add note.

From-SVN: r45702
2001-09-20 08:30:01 +00:00
Benjamin Kosnik 9775a638f4 moneypunct_members_gnu.cc: Fix initialization of wchar_t members.
2001-09-14  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/moneypunct_members_gnu.cc: Fix initialization of
	wchar_t members.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test02): New file.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test02): Fix.

From-SVN: r45615
2001-09-14 22:13:11 +00:00
Benjamin Kosnik 55dea7b149 moneypunct_members_gnu.cc: Fix initialization of wchar_t members.
2001-09-14  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/moneypunct_members_gnu.cc: Fix initialization of
	wchar_t members.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test02): New file.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test02): Fix.

From-SVN: r45614
2001-09-14 22:09:35 +00:00
Alexandre Petit-Bianco 7330797589 money_get_members_char.cc: Fixed typo in comment.
2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* testsuite/22_locale/money_get_members_char.cc: Fixed typo in comment.
	* testsuite/22_locale/money_put_members_char.cc: Likewise.
	* testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.

(If only spelling them right would make them go away...)

From-SVN: r45592
2001-09-14 01:38:18 -07:00
Benjamin Kosnik fb67885447 Implement std::money_get.
2001-09-13   Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::money_get.
	* include/bits/locale_facets.tcc (money_get::do_get): Implement.
	* include/bits/locale_facets.h (money_get): Correct signatures.
	* testsuite/22_locale/money_get.cc: New file.
	* testsuite/22_locale/money_get_members_char.cc: New file.

	* include/bits/locale_facets.tcc (__verify_grouping): New
	function. Consolidate num_get and money_get group checking into
	one function.
	(money_get): Use it.
	* src/locale.cc (num_get::_M_extract): Use it.
	* src/locale-inst.cc: Add instantiation.

From-SVN: r45585
2001-09-13 23:21:25 +00:00
Benjamin Kosnik 89c06d5007 Makefile.am (stamp-target): Remove link to self.
2001-09-10  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (stamp-target): Remove link to self.
	* inclulde/Makefile.in: Regenerate.

From-SVN: r45514
2001-09-10 18:13:17 +00:00
Benjamin Kosnik 69971cd850 Implement std::money_put.
2001-09-09  Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::money_put.
	* include/bits/locale_facets.h
	(moneypunct::_M_initialize_moneypunct): Split up specializations
	to account for _Intl.  More grody hacking to get around the
	ill-considered use of const bool as a template parameter.
	* config/locale/moneypunct_members_gnu.cc: And here.
	* config/locale/moneypunct_members_generic.cc: And here.
	* testsuite/22_locale/moneypunct_members_char.cc: Add tests.
	* testsuite/22_locale/moneypunct.cc: Add tests.
	* testsuite/22_locale/money_put_members_wchar_t.cc: New file.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc: New file.

	* src/locale.cc (money_base::_S_construct_pattern): Move into
	gnu-specific file.
	* config/locale/moneypunct_members_gnu.cc: Add here.
	* config/locale/moneypunct_members_generic.cc: Add generic version
	here.

	* include/bits/locale_facets.tcc (money_put::do_put): Move member
	function definitions here.
	* include/bits/locale_facets.h (money_put): Implement.
	* src/locale-inst.cc: Add use_facet instantiations for moneypunct.
	Correct money_get, money_put instantiations.
	* src/locale.cc (money_base::_S_construct_pattern): Handle case
	where __posn == 0.
	* testsuite/22_locale/money_put_members_char.cc: Add tests.

From-SVN: r45496
2001-09-10 01:00:27 +00:00
Phil Edwards 2d25bf5d52 testsuite_flags.in: No longer need to search testsuite builddir.
2001-09-05  Phil Edwards  <pme@sources.redhat.com>

	* testsuite_flags.in:  No longer need to search testsuite builddir.
	* src/stl-inst.cc (__sink_unused_warning):  Unused, remove.
	* Makefile.am:  The testsuite directory never needs to be made here.
	* Makefile.in:  Regenerate.
	* include/Makefile.in:  Regenerate.
	* libio/Makefile.in:  Regenerate.
	* libmath/Makefile.in:  Regenerate.
	* libsupc++/Makefile.in:  Regenerate.
	* po/Makefile.in:  Regenerate.
	* src/Makefile.in:  Regenerate.
	* testsuite/Makefile.in:  Regenerate.

From-SVN: r45426
2001-09-05 22:38:06 +00:00
Scott Johnston 45932d27fb iterator.h: Include <bits/std_iterator.h>, remove reverse_bidirectional_iterator.
2001-09-04  Scott Johnston  <scott@accom.com>
	    Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* include/backward/iterator.h: Include <bits/std_iterator.h>,
	remove reverse_bidirectional_iterator.
	* testsuite/backward: New directory.
	* testsuite/backward/header_iterator_h.cc: New file.

Co-Authored-By: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>

From-SVN: r45389
2001-09-04 22:05:33 +00:00
Benjamin Kosnik 72e2386f87 c_locale_gnu.cc: Move facet info to separate files...
2001-08-27  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/c_locale_gnu.cc: Move facet info to separate files...
	* config/locale/c_locale_generic.cc: Same.
	* config/locale/moneypunct_members_gnu.cc: New file.
	* config/locale/moneypunct_members_generic.cc: New file.
	* config/locale/numpunct_members_gnu.cc: New file.
	* config/locale/numpunct_members_generic.cc: New file.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add moneypunct, numpunct
	options.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* src/Makefile.am (sources): And here.
	* src/Makefile.in: Regenerate.

	Rename for consistency with rest of testsuite.
	* testsuite/22_locale/codecvt.cc: New file.
	* testsuite/22_locale/money_put.cc: New file.
	* testsuite/22_locale/money_put_members_char.cc: New file.

From-SVN: r45224
2001-08-28 06:19:35 +00:00
Sylvain Pion f2c333a19d re PR libstdc++/3349 (bug in map::insert(p,t))
2001-08-24  Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
            Phil Edwards  <pme@sources.redhat.com>

	PR libstdc++/3349
	* include/bits/stl_tree.h (insert_unique):  Revert last change.
	Values inserted at begin() must be less, not greater, than *begin()'s.
	* testsuite/23_containers/map_insert.cc:  New file.

Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>

From-SVN: r45155
2001-08-24 17:40:31 +00:00
Benjamin Kosnik 575dd831c7 c_locale_gnu.cc: Minor tweaks.
2001-08-23  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/c_locale_gnu.cc: Minor tweaks.
	(moneypunct<wchar_t>): Implement.
	* include/bits/locale_facets.h: Same.
	* testsuite/22_locale/moneypunct.cc: New file.
	* testsuite/22_locale/moneypunct_byname.cc: New file.
	* testsuite/22_locale/moneypunct_char_members.cc: New file.

From-SVN: r45142
2001-08-24 04:11:23 +00:00
Benjamin Kosnik 0bab15bb70 collate_wchar_t_members.cc: Guard with _GLIBCPP_USE_WCHAR_T.
2001-08-22  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/collate_wchar_t_members.cc: Guard
	with _GLIBCPP_USE_WCHAR_T.

From-SVN: r45118
2001-08-23 04:50:55 +00:00
Benjamin Kosnik d1b30231db collate_byname.cc (test01): Fix.
2001-08-21  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/collate_byname.cc (test01): Fix.

From-SVN: r45094
2001-08-22 05:47:35 +00:00
Benjamin Kosnik 9f530faf18 operators.cc: Add test.
2001-08-18  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/operators.cc: Add test.

From-SVN: r45015
2001-08-19 00:20:07 +00:00
Benjamin Kosnik ea0c0b6e1b Implement std::collate.
2001-08-17  Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::collate.
	* config/locale/collate_specializations_gnu.cc: Add here, implement in
	MT-safe way.
	* config/locale/collate_specializations_generic.cc: Add here, but
	in a less sophisticated manner.
	* include/bits/locale_facets.tcc (collate): Add generic definition.
	* include/bits/locale_facets.h (~collate): Mark virtual.
	(collate::_M_compare_helper): New.
	(collate::_M_transform_helper): New.
	* src/locale.cc: Remove unnecessary specializations.
	* src/string-inst.cc: Tweak instantiation of ctors.

	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Do configury for collate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* src/Makefile.am (sources): Add collate.cc.
	* src/Makefile.in: Regenerate.

	* testsuite/22_locale/collate_byname.cc: New.
	* testsuite/22_locale/collate.cc: New file.
	* testsuite/22_locale/collate_char_members.cc: New file.
	* testsuite/22_locale/collate_wchar_t_members.cc: New file.

From-SVN: r44996
2001-08-18 02:53:13 +00:00
Gabriel Dos Reis 1489e3241e numeric_limits.cc: Add more tests.
* testsuite/18_support/numeric_limits.cc: Add more tests.
      * include/bits/std_limits.h (numeric_limits<char>::max): Fix
      typo.

From-SVN: r44911
2001-08-14 23:34:04 +00:00
Benjamin Kosnik 4e10943dda configure.in (libtool_VERSION): Add.
2001-08-13  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.in (libtool_VERSION): Add.
	(VERSION): Change to
	(release_VERSION): This.
	* configure: Regenerate.
	* src/Makefile.am (libstdc___la_LDFLAGS): Use -version-info with
	libtool_VERSION.
	* src/Makefile.in: Regenerate.

	* intl/Makefile.am: Remove.
	* intl/Makefile.in: Remove.
	* intl: Remove.
	* Makefile.am (SUBDIRS): Remove intl.
	* po/Makefile.am (DISTFILES): Add string_literals.cc
	(MSGFMT): Add.
	* po/string_literals.cc: Add.
	* po/POTFILES.in: Fix path.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Don't call AM_GNU_GETTEXT.
	* aclocal.m4: Regenerate.
	* configure.in: Remove AC_OUTPUT of intl/Makefile.

	* include/backward/backward_warning.h: Clarify message.

	* testsuite_flags.in (--cxxflags): Use same debug flags for
	library and testsuite.

	* include/Makefile.am (c_compatibility): Remove.
	* include/Makefile.in: Regenerate.

From-SVN: r44880
2001-08-14 01:24:30 +00:00
Mark Mitchell 9f3c078ea9 configure.in (LIMITS_INC_SRCDIR): New variable.
* configure.in (LIMITS_INC_SRCDIR): New variable.
	* configure.target (LIMITSH): New variable.
	* porting.texi: Discuss numeric limits.
	* config/cpu/generic/bits/limits.h: New file.
	* config/cpu/i386/bits/limits.h: New file.
	* include/Makefile.am: Install bits/limits.h.
	* include/bits/c++config: Include bits/limits.h.

From-SVN: r44877
2001-08-13 22:26:11 +00:00
H.J. Lu 7db1993723 libstdc++-v3-dg.exp (libstdc++-v3-copy-files): New.
2001-08-13  H.J. Lu  (hjl@gnu.org)

	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-copy-files):
	New. Copy files.
	(libstdc++-v3-init ): Use it.

From-SVN: r44866
2001-08-13 13:43:13 -07:00
Loren J. Rittle b5e58904ae testsuite_hooks.h (__set_testsuite_memlimit): Add dummy default argument to the non-limit implementation.
* testsuite/testsuite_hooks.h (__set_testsuite_memlimit): Add
	dummy default argument to the non-limit implementation.

From-SVN: r44775
2001-08-10 20:29:41 +00:00
Benjamin Kosnik 58b08ac3e1 acconfig.h (_GLIBCPP_MEM_LIMITS): Define.
2001-08-09  Benjamin Kosnik  <bkoz@redhat.com>

	* acconfig.h (_GLIBCPP_MEM_LIMITS): Define.
	* config.h.in: Regenerate.
	* acinclude.m4 (GLIBCPP_CHECK_SETRLIMIT): Check for setrlimit
	function.
	* aclocal.m4: Regenerate.
	* configure.in: Remove duplicate AM_CONFIG_HEADER.
	(AM_CONFIG_HEADER): Remove testsuite/testsuite_hooks.h.
	Only call GLIBCPP_CHECK_SETRLIMIT for native compiles.
	* configure: Regenerate.
	* testsuite_hooks.h.in: Move to...
	* testsuite_hooks.h: Here, include c++config.h. Use it.

	* Makefile.am (SUBDIRS): Move testsuite to last directory.
	* Makefile.in: Regenerate.
	* po/Makefile.am (stamp-po): Add.

From-SVN: r44752
2001-08-10 06:50:34 +00:00
Benjamin Kosnik 33590f13b2 Implement std::messages.
2001-08-07  Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::messages.
	Make config a fully-nested directory.
	* config/locale: New directory.
	* config/c_locale_generic.cc: Move into locale subdirectory.
	* config/c_locale_generic.h: Same.
	* config/c_locale_gnu.cc: Same.
	* config/c_locale_gnu.h: Same.
	* config/c_locale_ieee_1003.1-200x.cc: Same.
	* config/c_locale_ieee_1003.1-200x_.h: Same.
	* config/codecvt_specializations_generic.h: Same.
	* config/codecvt_specializations_ieee_1003.1-200x.h: Same.
	* config/messages_members_gnu.h: Same.
	* config/messaages_members_gnu.cc: Same.
	* config/messages_members_generic.h: Same.
	* config/messaages_members_generic.cc: Same.
	* config/messages_members_ieee_1003.1-200x.h: Same.
	* config/messaages_members_ieee_1003.1-200x.cc: Same.
	* config/io: New directory.
	* config/basic_file_libio.h: Move into io subdirectory.
	* config/basic_file_libio.cc: Same.
	* config/c_io_libio.h: Same.
	* config/c_io_libio_codecvt.c: Same.
	* config/basic_file_stdio.h: Same.
	* config/basic_file_stdio.cc: Same.
	* config/c_io_stdio.h: Same.

	* po: New directory.
	* po/POTFILES.in: New file.
	* po/Makefile.am: New file.
	* po/Makefile.in: New file.
	* po/libstdc++.pot: Generic translation file.
	* po/fr.po: Preliminary French translation.
	* po/de.po: Preliminary German translation.
	* intl: New directory.
	* intl/Makefile.am: New file.
	* intl/Makefile.in: New file.
	* intl/string_literals.cc: New file.
	* acinclude.m4 (GLIBCPP_CONFIGURE): Bump VERSION to 3.1.0. Add
	requisite setup for gettext. Re-arrange.
	* aclocal.m4: Regenerate.
	* configure.in: Don't call GLIBCPP_CHECK_COMPILER_VERSION.
	Output Makefile bits for po and intl.
	* configure: Regenerate.
	* Makefile.am (SUBDIRS): Add intl, po. Add rule for dist.
	* Makefile.in: Regenerate.
	* acconfig.h: Add ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY.
	* config.h.in: Regenerate.

	* acinclude.m4 (AC_REPLACE_STRINGFUNCS): Remove.

	* include/Makefile.am (install-data-local): Don't install Makefile.
	* include/Makefile.in: Regenerate.

	* include/bits/locale_facet.h (locale::facet::_S_clone_c_locale):
	Add member.
	* config/locale/c_locale_gnu.cc (_S_clone_c_locale): Add definition.
	* config/locale/c_locale_generic.cc: Same.
	* config/locale/c_locale_ieee_1003.1-200x.cc: Same.

	* include/bits/codecvt.h: Excise non-standard, non-required
	bits. This includes __enc_traits, and partial specializations of
	codecvt for __enc_traits.
	* src/codecvt.cc (__enc_traits::_S_max_size): Guard
	* config/codecvt_partials_ieee_1003.1-200x.h: New file.
	* config/codecvt_partials_generic.h: New file.
	* include/Makefile.am (allstamps): Add stamp-codecvt_model.
	(stamp-codecvt_model): Add.
	* include/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in codecvt configury.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/22_locale/codecvt_unicode_wchar_t.cc: Use macro guard.
	* testsuite/22_locale/codecvt_unicode_char.cc: Same.
	* testsuite/22_locale/ctor_copy_dtor.cc: And here.

	* include/bits/localefwd.h (class locale::facet): Add __enc_traits
	as a friend for _S_*_c_locale functions.
	* include/bits/codecvt.h (__enc_traits::__enc_traits): Add locale
	argument to default constructor so that CODESET information can be
	deduced.
	* include/bits/locale_facets.h (messages_byname):
	Re-implement. Remove specializations.
	* src/locale.cc (messages_byname<char>): Remove specialization.
	(messages_byname<wchar_t>): Same.
	* config/locale/c_locale_ieee_1003.1-200x.cc: New file.
	* config/locale/c_locale_ieee_1003.1-200x.h: New file.
	* config/locale/messages_members_ieee_1003.1-200x.cc: New file.
	* config/locale/messages_members_ieee_1003.1-200x.h: New file.
	* config/locale/messages_members_gnu.cc: New file.
	* config/locale/messages_members_gnu.h: New file.
	* config/locale/messages_members_generic.cc: New file.
	* config/locale/messages_members_generic.h: New file.

	* docs/html/configopts.html: Add documentation for new locale
	model, ieee_1003.1. Adjust other flags for current defaults.
	* docs/html/22_locale/locale.html: Update.
	* docs/html/22_locale/howto.html: Add link to messages.html. Organize.
	* docs/html/22_locale/messages.html: New.

	* src/Makefile.am (sources): Add messages_virtuals.cc.
	* src/Makefile.in: Regenerate.
	* include/Makefile.am (allstamps): Add stamp-messages_model.
	(stamp-messages_model): Add.
	* include/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in messages configury.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	* testsuite_flags.in (--cxxflags): Add LOCALEDIR.
	* testsuite/lib/libstdc++-v3-dg.exp: Remove broken LD_LIBRARY_PATH
	bits for Irix.
	* acinclude (GLIBCPP_ENABLE_CLOCALE): Set glibcpp_localedir to the
	build directories message catalog base directory, and export.
	Eventually this should probably be made to deal with build and
	install directories. For now, punt on this as the library itself
	doesn't use message catalogs (yet).
	* testsuite/22_locale/messages.cc: New file.
	* testsuite/22_locale/messages_char_members.cc: New file.
	* testsuite/22_locale/messages_byname.cc: New file.

From-SVN: r44702
2001-08-08 02:49:01 +00:00
Phil Edwards fe413112f8 acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): New macro, calls...
2001-08-06  Phil Edwards  <pme@sources.redhat.com>

	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE):  New macro, calls...
	(GLIBCPP_CHECK_SETRLIMIT):  ...this new macro, which also uses...
	(GLIBCPP_CHECK_SETRLIMIT_ancilliary):  ...this new macro.
	* configure.in (AM_CONFIG_HEADER):  Also generate testsuite_hooks.h.
	Call GLIBCPP_CONFIGURE_TESTSUITE.
	* aclocal.m4:  Regenerate.
	* config.h.in:  Regenerate.
	* configure:  Regenerate.

	* testsuite/lib/libstdc++-v3-dg.exp:  Download new header instead
	of old header.

	* testsuite_flags.in:  Add build dir's testsuite to INCLUDES.
	* testsuite/debug_assert.h:  Removed; contents merged into...
	* testsuite/testsuite_hooks.h.in:  ...here.  New file.
	* testsuite/17_intro/header_ciso646.cc:  No longer include
	debug_assert.h, include testsuite_hooks.h instead.
	* testsuite/17_intro/header_fstream.cc:  Likewise.
	* testsuite/17_intro/header_iomanip.cc:  Likewise.
	* testsuite/17_intro/header_ios.cc:  Likewise.
	* testsuite/17_intro/header_iosfwd.cc:  Likewise.
	* testsuite/17_intro/header_iostream.cc:  Likewise.
	* testsuite/17_intro/header_istream.cc:  Likewise.
	* testsuite/17_intro/header_ostream.cc:  Likewise.
	* testsuite/17_intro/header_sstream.cc:  Likewise.
	* testsuite/17_intro/header_streambuf.cc:  Likewise.
	* testsuite/18_support/numeric_limits.cc:  Likewise.
	* testsuite/19_diagnostics/stdexceptions.cc:  Likewise.
	* testsuite/20_util/allocator_members.cc:  Likewise.
	* testsuite/20_util/auto_ptr.cc:  Likewise.
	* testsuite/20_util/pairs.cc:  Likewise.
	* testsuite/21_strings/append.cc:  Likewise.
	* testsuite/21_strings/capacity.cc:  Likewise.
	* testsuite/21_strings/char_traits_requirements.cc:  Likewise.
	* testsuite/21_strings/compare.cc:  Likewise.
	* testsuite/21_strings/ctor_copy_dtor.cc:  Likewise.  Also set up
	call to (disabled) __set_testsuite_memlimit() wrapper.
	* testsuite/21_strings/element_access.cc:  Likewise.
	* testsuite/21_strings/find.cc:  Likewise.
	* testsuite/21_strings/insert.cc:  Likewise.  Also set up call to
	(disabled) __set_testsuite_memlimit() wrapper.
	* testsuite/21_strings/inserters_extractors.cc:  Likewise.
	* testsuite/21_strings/invariants.cc:  Likewise.
	* testsuite/21_strings/nonmember.cc:  Likewise.
	* testsuite/21_strings/operations.cc:  Likewise.
	* testsuite/21_strings/replace.cc:  Likewise.
	* testsuite/21_strings/rfind.cc:  Likewise.
	* testsuite/21_strings/substr.cc:  Likewise.
	* testsuite/22_locale/codecvt_char_char.cc:  Likewise.
	* testsuite/22_locale/codecvt_unicode_char.cc:  Likewise.
	* testsuite/22_locale/codecvt_unicode_wchar_t.cc:  Likewise.
	* testsuite/22_locale/codecvt_wchar_t_char.cc:  Likewise.
	* testsuite/22_locale/ctor_copy_dtor.cc:  Likewise.
	* testsuite/22_locale/ctype_char_members.cc:  Likewise.
	* testsuite/22_locale/ctype_wchar_t_members.cc:  Likewise.
	* testsuite/22_locale/facet.cc:  Likewise.
	* testsuite/22_locale/global_templates.cc:  Likewise.
	* testsuite/22_locale/members.cc:  Likewise.
	* testsuite/22_locale/numpunct_byname.cc:  Likewise.
	* testsuite/22_locale/numpunct_char_members.cc:  Likewise.
	* testsuite/22_locale/operators.cc:  Likewise.
	* testsuite/22_locale/static_members.cc:  Likewise.
	* testsuite/23_containers/bitset_ctor.cc:  Likewise.
	* testsuite/23_containers/bitset_members.cc:  Likewise.
	* testsuite/23_containers/bitset_shift.cc:  Likewise.
	* testsuite/23_containers/vector_capacity.cc:  Likewise.
	* testsuite/23_containers/vector_ctor.cc:  Likewise.
	* testsuite/23_containers/vector_element_access.cc:  Likewise.
	* testsuite/23_containers/vector_modifiers.cc:  Likewise.
	* testsuite/24_iterators/istreambuf_iterator.cc:  Likewise.
	* testsuite/24_iterators/iterator.cc:  Likewise.
	* testsuite/24_iterators/ostreambuf_iterator.cc:  Likewise.
	* testsuite/25_algorithms/binary_search.cc:  Likewise.
	* testsuite/25_algorithms/copy.cc:  Likewise.
	* testsuite/25_algorithms/heap.cc:  Likewise.
	* testsuite/25_algorithms/lower_bound.cc:  Likewise.
	* testsuite/25_algorithms/min_max.cc:  Likewise.
	* testsuite/25_algorithms/partition.cc:  Likewise.
	* testsuite/25_algorithms/rotate.cc:  Likewise.
	* testsuite/25_algorithms/sort.cc:  Likewise.
	* testsuite/26_numerics/c_math.cc:  Likewise.
	* testsuite/26_numerics/complex_inserters_extractors.cc:  Likewise.
	* testsuite/26_numerics/complex_value.cc:  Likewise.
	* testsuite/27_io/filebuf.cc:  Likewise.
	* testsuite/27_io/filebuf_members.cc:  Likewise.
	* testsuite/27_io/filebuf_virtuals.cc:  Likewise.
	* testsuite/27_io/fpos.cc:  Likewise.
	* testsuite/27_io/fstream_members.cc:  Likewise.
	* testsuite/27_io/ifstream_members.cc:  Likewise.
	* testsuite/27_io/ios_base_callbacks.cc:  Likewise.
	* testsuite/27_io/ios_base_members_static.cc:  Likewise.
	* testsuite/27_io/ios_base_storage.cc:  Likewise.
	* testsuite/27_io/ios_ctor.cc:  Likewise.
	* testsuite/27_io/ios_init.cc:  Likewise.
	* testsuite/27_io/ios_manip_basefield.cc:  Likewise.
	* testsuite/27_io/ios_manip_fmtflags.cc:  Likewise.
	* testsuite/27_io/ios_members.cc:  Likewise.
	* testsuite/27_io/istream_extractor_arith.cc:  Likewise.
	* testsuite/27_io/istream_extractor_char.cc:  Likewise.
	* testsuite/27_io/istream_extractor_other.cc:  Likewise.
	* testsuite/27_io/istream_manip.cc:  Likewise.
	* testsuite/27_io/istream_seeks.cc:  Likewise.
	* testsuite/27_io/istream_sentry.cc:  Likewise.
	* testsuite/27_io/istream_unformatted.cc:  Likewise.
	* testsuite/27_io/istringstream_members.cc:  Likewise.
	* testsuite/27_io/narrow_stream_objects.cc:  Likewise.
	* testsuite/27_io/ofstream_members.cc:  Likewise.
	* testsuite/27_io/ostream_inserter_arith.cc:  Likewise.
	* testsuite/27_io/ostream_inserter_char.cc:  Likewise.
	* testsuite/27_io/ostream_inserter_other.cc:  Likewise.
	* testsuite/27_io/ostream_manip.cc:  Likewise.
	* testsuite/27_io/ostream_seeks.cc:  Likewise.
	* testsuite/27_io/ostream_unformatted.cc:  Likewise.
	* testsuite/27_io/ostringstream_members.cc:  Likewise.
	* testsuite/27_io/streambuf.cc:  Likewise.
	* testsuite/27_io/stringbuf.cc:  Likewise.
	* testsuite/27_io/stringbuf_virtuals.cc:  Likewise.
	* testsuite/27_io/stringstream.cc:  Likewise.
	* testsuite/27_io/stringstream_members.cc:  Likewise.
	* testsuite/27_io/wide_stream_objects.cc:  Likewise.

From-SVN: r44679
2001-08-07 03:38:33 +00:00
Peter Schmid 3b73bce168 stl_algo.h: Fix typos.
2001-07-19  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

        * include/bits/stl_algo.h : Fix typos.
	* testsuite/25_algorithms/unique.cc: New file.

From-SVN: r44169
2001-07-20 01:17:13 +00:00
Stephen M. Webb fed3b7b431 ostream.tcc (ostream::put): Fixed error condition check.
2001-07-18  Stephen M. Webb  <stephen@bregmasoft..com>
            Roman Sulzhyk  <roman_sulzhyk@yahoo.com>

        libstdc++/3599
        * include/bits/ostream.tcc (ostream::put): Fixed error condition check.
        * testsuite/27_io/streambuf.cc (test07): Added new regression test.

Co-Authored-By: Roman Sulzhyk <roman_sulzhyk@yahoo.com>

From-SVN: r44122
2001-07-18 17:58:37 +00:00
Stephen M. Webb 02d92e3b70 All occurrences of the __value_type() and __distance_type() functions...
2001-07-17  Stephen M. Webb   <stephen@bregmasoft.com>r

	All occurrences of the __value_type() and __distance_type()
	functions, which were required to support the HP STL, have been
	removed along with all the auxiliary forwarding functions that
	were required to support their use.

	The __iterator_category() function was pretty much left alone
	because there was no benefit to removing it and its use made code
	just a little more readable.

	Incidences of distance() with nonstandard argument list were
	replaced by calls to the standard function (only in the files
	affected by the removal of the other HP functions).

	The signature of the rotate() algorithm was changed to match the
	standard.

	Headers were reformatted under C++STYLE guidelines (indentation,
	linebreaks, typename keyword).

	* include/bits/stl_algo.h: replaced __value_type() and
	__distance_type() with iterator_traits, eliminated auxiliary
	support functions required to support said function usage.
	Changed nonstandard distance() call to standard call.

	* include/bits/stl_algobase.h: Same.
	* include/bits/stl_heap.h: Same.
	* include/bits/stl_numeric.h: Same.
	* include/bits/stl_uninitialized.h: Same.
	* include/bits/stl_iterator_base_types.h (__value_type()):
	Removed.
	(__distance_type()): Removed.
	(value_type()): Gone.
	(distance_type()): Done in.
	(iterator_category()): Hasta la vista, baby.

	* include/bits/stl_iterator_base_funcs.h (iterator_category()):
	Replaced with __iterator_category().
	* include/backward/iterator.h: moved definition of value_type(),
	distance_type(), and iterator_category() out of std:: and into
	here.
	* testsuite/23_containers/vector_ctor.cc (test03): New testcases.
	* testsuite/23_containers/vector_modifiers.cc (test03): New testcases.
	* testsuite/25_algorithms/rotate.cc: New testcase.
	* testsuite/25_algorithms/copy.cc: New testcase.
	* testsuite/25_algorithms/sort.cc: Same.
	* testsuite/25_algorithms/heap.cc: Same.
	* testsuite/25_algorithms/partition.cc: Same.
	* testsuite/25_algorithms/binary_search.cc: Same.
	* testsuite/26_numerics/sum_diff.cc: Ditto.

From-SVN: r44117
2001-07-18 17:09:02 +00:00
Benjamin Kosnik 4fe706d8e0 README: Add notes on naming test cases.
2001-07-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/README: Add notes on naming test cases.
	* testsuite/22_locale/members.cc: Mark as xfail.
	* testsuite/22_locale/numpunct_char_members.cc: Same.

From-SVN: r44076
2001-07-17 18:47:34 +00:00
Benjamin Kosnik 2965361b9e README: Add notes on naming test cases.
2001-07-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/README: Add notes on naming test cases.
	* testsuite/22_locale/members.cc: Mark as xfail.
	* testsuite/22_locale/numpunct_char_members.cc: Same.

From-SVN: r44074
2001-07-17 18:43:28 +00:00
Phil Edwards 48fe3de0c3 std_sstream.h (basic_stringbuf::basic_stringbuf(string): Initialize _M_string with pointer-and-size constructor, not just pointer.
2001-07-13  Phil Edwards  <pme@sources.redhat.com>

	* include/bits/std_sstream.h (basic_stringbuf::basic_stringbuf(string):
	Initialize _M_string with pointer-and-size constructor, not just
	pointer.  Fix some comments.
	* testsuite/21_strings/ctor_copy_dtor.cc (test03):  New test.
	* testsuite/27_io/stringbuf.cc (test02):  Remove unused variable.
	(test03):  Add embedded-NUL tests.

	* mkcheck.in:  When printing totals, match the order of the tests.
	* include/bits/stringfwd.h:  Use same declaration keywords.
	* include/bits/std_iosfwd.h:  Cosmetic spacing.

From-SVN: r43996
2001-07-13 20:50:03 +00:00
Stephen M. Webb 4a9d51090a Makefile.am: New file encapsulating header generation rules.
2001-07-13  Stephen M. Webb  <stephen@bregmasoft.com>
            Loren J. Rittle  <ljrittle@acm.org>
            Phil Edwards  <pme@sources.redhat.com>

	* include/Makefile.am:  New file encapsulating header generation rules.
	* Makefile.am (SUBDIRS):  Prepend 'include' directory.
	* acinclude.m4:  Moved/removed rules for building various headers.
	* configure.in (AC_OUTPUT):  Add include/Makefile.
	* mkc++config:  Removed.

	* testsuite_flags.in:  Changed build-includes to match new scheme.
	* mknumeric_limits:  Likewise.
	* libio/Makefile.am:  Changed INCLUDES to maatch new header scheme.
	* libmath/Makefile.am:  Likewise.
	* libsupc++/Makefile.am:  Likewise.
	* src/Makefile.am:  Likewise; removed rules to build headers.
	* libmath/mathconf.h:  Changed #include'd header names to match.
	* libmath/stubs.c:  Likewise.
	* src/gen-num-limits.cc:  Likewise.

	* configure:  Regenerated.
	* config.h.in:  Regenerated.
	* aclocal.m4:  Regenerated.
	* Makefile.in:  Regenerated.
	* include/Makefile.in:  Regenerated.
	* libio/Makefile.in:  Regenerated.
	* libmath/Makefile.in:  Regenerated.
	* libsupc++/Makefile.in:  Regenerated.
	* src/Makefile.in:  Regenerated.
	* testsuite/Makefile.in:  Regenerated.

Co-Authored-By: Loren J. Rittle <ljrittle@acm.org>
Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>

From-SVN: r43985
2001-07-13 16:47:56 +00:00
Benjamin Kosnik 213c2316b6 locale.cc (locale::locale(const char*)): Make sure global locales are initialized.
2001-07-02  Benjamin Kosnik  <bkoz@redhat.com>

	* src/locale.cc (locale::locale(const char*)): Make sure global
	locales are initialized.
	* include/bits/locale_facets.tcc (locale::combine): Refcout should
	be zero, not one as it's return-by-value.
	* testsuite/27_io/ios_base_callbacks.cc (test01): Don't check for
	named locales here.
	* testsuite/22_locale/ctor_copy_dtor.cc (test01): Instead, check
	for it here.
	(test02): Add test.
	* libsupc++/eh_alloc.cc: Use climits, not limits.h.

From-SVN: r43713
2001-07-02 23:08:28 +00:00
Benjamin Kosnik 13f83598b3 locale_facets.tcc (locale::combine): Clone _Impl.
2001-06-29  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc (locale::combine): Clone _Impl.
	before replacing facet.
	* include/bits/localefwd.h (locale::_Impl::_M_remove_reference):
	Correct decrement.
	* src/localename.cc (locale::_Impl): Correct ctor initialization
	lists. Initialize ref count with one. Simplify.
	* src/locale.cc: Add comment.
	* testsuite/22_locale/numpunct.cc (test01): Add derivation test.
	* testsuite/22_locale/numpunct_char_members.cc (test01): Add tests.
	* testsuite/22_locale/members.cc (test02): Fix.

From-SVN: r43661
2001-06-30 04:35:49 +00:00
Benjamin Kosnik f2f5472f06 streambuf.tcc (__copy_streambufs): Don't set eofbit.
2001-06-26  Benjamin Kosnik  <bkoz@fillmore.constant.com>
	                     <vakatov@ncbi.nlm.nih.gov>

	libstdc++/3272
	* include/bits/streambuf.tcc (__copy_streambufs): Don't set eofbit.
	* testsuite/27_io/ostream_inserter_other.cc (test04): Add test.
	* testsuite/27_io/istream_extractor_other.cc: Fix.

From-SVN: r43602
2001-06-27 01:07:29 +00:00
Benjamin Kosnik d27bba5e57 sbuf_iter.h: Change to..
2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/sbuf_iter.h: Change to..
	* include/bits/streambuf_iterator.h: This.
	* include/bits/stl_iterator.h: Take out of here...
	* include/bits/stream_iterator.h: Add.
	* src/Makefile.am (base_headers): Add streambuf_iterator,
	stream_iterator.h
	* src/Makefile.in: Regenerate.
	* include/bits/std_string.h: Adjust includes.
	* include/bits/basic_ios.h: Same.
	* include/bits/locale_facets.tcc: Same.
	* include/bits/std_iosfwd.h: Same.

	* include/bits/std_iterator.h: Add istream, ostream includes.
	* include/bits/stl_iterator.h: Tweak.
	* testsuite/24_iterators/ostream_iterator.cc: Add test.
	* testsuite/24_iterators/istream_iterator.cc: Same.
	* testsuite/23_containers/multiset.cc: Add iterator include.

From-SVN: r43592
2001-06-26 21:22:57 +00:00
Benjamin Kosnik f4655693b5 stl_iterator.h (istream_iterator::operator->): Fix return values.
2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_iterator.h (istream_iterator::operator->): Fix
	return values.
	(istream_iterator::operator*): Same.

2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>
            Alexandre Petit-Bianco  <apbianco@redhat.com>

        * testsuite/21_strings/element_access.cc (test01): Chill Out Cafe
        is on 41st, not 14th.

Co-Authored-By: Alexandre Petit-Bianco <apbianco@redhat.com>

From-SVN: r43574
2001-06-26 09:41:53 +00:00
Benjamin Kosnik b581eaf700 std_iterator.h: Include sbuf_iter.h via std_ios.h.
2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/std_iterator.h: Include sbuf_iter.h via std_ios.h.

	* include/bits/stl_iterator.h (istream_iterator): Inherit from
	iterator.
	(ostream_iterator): Same.
	* testsuite/24_iterators/istream_iterator.cc: New file.
	* testsuite/24_iterators/ostream_iterator.cc: New file.

	* include/bits/sbuf_iter.h: Remove self typedef.
	* testsuite/24_iterators/ostreambuf_iterator.cc: Add test.
	* testsuite/24_iterators/istreambuf_iterator.cc: Add test.

	* include/bits/stl_iterator.h (reverse_iterator): Remove
	extraneous typedefs. Add typename.
	(__normal_iterator): Remove typedefs referring to self. Add typename.
	(reverse_bidiretional_iterator): Remove, not longer required.

From-SVN: r43570
2001-06-26 07:01:09 +00:00
Phil Edwards e4bf60773b re PR libstdc++/3377 (missing std::__cmath_power<double>(double,unsigned))
2001-06-25  Phil Edwards  <pme@sources.redhat.com>
            Kurt Garloff <garloff@suse.de>

	PR libstdc++/3377
	* src/cmath.cc:  New [version of an old] file; instantiate
	__cmath_power to start with.
	* src/Makefile.am (sources):  Add cmath.cc (and alphabetize).
	* Makefile.in:  Regenerate.
	* libio/Makefile.in:  Regenerate.
	* libmath/Makefile.in:  Regenerate.
	* libsupc++/Makefile.in:  Regenerate.
	* src/Makefile.in:  Regenerate.
	* testsuite/Makefile.in:  Regenerate.

Co-Authored-By: Kurt Garloff <garloff@suse.de>

From-SVN: r43559
2001-06-25 20:57:51 +00:00
Benjamin Kosnik c766fc5f1c stl_iterator.h (reverse_iterator): Inherit from iterator.
2001-06-22  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_iterator.h (reverse_iterator): Inherit from
	iterator.
	(back_insert_iterator): Same.
	(front_insert_iterator): Same.
	(insert_iterator): Same.

	* testsuite/20_util/raw_storage_iterator.cc: Modify.
	* testsuite/24_iterators/reverse_iterator.cc: New file.
	* testsuite/24_iterators/back_insert_iterator.cc: New file.
	* testsuite/24_iterators/front_insert_iterator.cc: New file.
	* testsuite/24_iterators/insert_iterator.cc: New file.

From-SVN: r43524
2001-06-23 00:08:47 +00:00
Benjamin Kosnik 54da4898cc mknumeric_limits: Add static defintions, format.
2001-06-19  Benjamin Kosnik  <bkoz@redhat.com>

	* mknumeric_limits: Add static defintions, format.
	* testsuite/18_support/numeric_limits.cc (test02): Add test.

	* include/c_std/bits/std_cwchar.h: Include ctime.
	* testsuite/17_intro/header_cwchar.cc : Check.

	* include/c_std/bits/std_cwctype.h: Inject wctype.

From-SVN: r43466
2001-06-20 03:05:31 +00:00
Benjamin Kosnik 3768cee7ca stl_raw_storage_iter.h: Format.
2001-06-18  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_raw_storage_iter.h: Format. Correct derivation.
	* testsuite/20_util/raw_storage_iterator.cc: Same.

        * include/bits/stl_alloc.h (_S_chunk_alloc): Change malloc to
        operator new.
        (__mem_interface): New typedef for switching between malloc and new.
	* testsuite/20_util/allocator_members.cc: New file.

	* testsuite/20_util/comparisons.cc: New file.
	* testsuite/20_util/pairs.cc: New file.

From-SVN: r43451
2001-06-19 01:51:33 +00:00
Gabriel Dos Reis 7c301abf46 slice_array_assignment.cc (main): New test.
* testsuite/26_numerics/slice_array_assignment.cc (main): New test.

        * include/bits/slice_array.h (slice_array<>::operator=): Make
        public and implement.
        (slice_array<>::slice_array): Make copy-constructor public.

        * include/bits/valarray_array.h (__valarray_copy): Add another
        overload to copy between strided arrays.

From-SVN: r43352
2001-06-13 22:16:24 +00:00
Benjamin Kosnik 9aaa9ee026 fpos.h (fpos::operator-): Don't return reference, return original, non-modified version.
2001-06-12  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/fpos.h (fpos::operator-): Don't return reference,
	return original, non-modified version.
	(fpos::operator+): Same.
	* testsuite/27_io/fpos.cc: Add test.

[[Split portion of a mixed commit.]]

From-SVN: r43290.2
2001-06-13 01:50:27 +00:00
Benjamin Kosnik 3b0fd4bcdb basic_string.h (string::compare): Adjust signatures as per DR 5.
2001-06-11  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3126
	* include/bits/basic_string.h (string::compare): Adjust signatures
	as per DR 5.
	* include/bits/basic_string.tcc: And here.

	libstdc++/2346
	* config/c_io_stdio.h: Remove whitespace.
	* testsuite/27_io/istream_seeks.cc (test03): Add regression.
	(test02): Add regression.
	* testsuite/27_io/istream_seeks-3.tst: New file.

From-SVN: r43240
2001-06-12 02:30:37 +00:00
Benjamin Kosnik d52a984783 ostream.tcc (ostream::seekp): Add error checking as per DR 129.
2001-06-11  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3114
	* include/bits/ostream.tcc (ostream::seekp): Add error checking as
	per DR 129.
	* include/bits/istream.tcc (istream::seekg): Same.
	* testsuite/27_io/istream_seeks.cc: Fix.

	libstdc++/3113
	* include/bits/stl_function.h (binder2nd): Fix as per DR 109.
	(binder1st): Same.
	* include/bits/std_queue.h: Add c++config.h.
	* testsuite/20_util/binders.cc: New test.

From-SVN: r43201
2001-06-11 19:20:20 +00:00
Benjamin Kosnik de96ac4681 *: Add copyright notice.
2001-06-08  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2767
	libstdc++/2989
	libstdc++/2992
	* include/std/*: Add copyright notice.
	* include/c_std/bits/*: Use using statements instead of extern "C".
	* include/c_std/bits/std_cmath.h: Don't overload double versions
	of math functions with __buitin versions, use global version to
	prevent ambiguities. Remove define hacks.
	* include/c_std/bits/std_cwchar.h: Using declarations for "C"
	functions that have changed signatures and std::
	declarations. Remove define hacks.
	* include/c_std/bits/std_cwchar.h: Same, plus remove ambiguous
	__builtins in std::. Remove define hacks.
	* testsuite/17_intro/headers_c.cc: Add tests.
	* testsuite/17_intro/headers_c++.cc: Add test.

From-SVN: r43061
2001-06-08 23:22:26 +00:00
Benjamin Kosnik 5de197f210 basic_ios.tcc: Formatting tweaks.
2001-06-05  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3045
	* include/bits/basic_ios.tcc: Formatting tweaks.
	* include/bits/ios_base.h: Formatting tweaks.
	* src/ios.cc (ios_base::Init::_S_ios_create): Use filebufs here.
	(ios_base::Init::_S_ios_destroy): ..and here. Explicitly call dtors.
	* src/globals.cc: Allocate filebufs for standard streams here.
	(buf_cout, buf_cin, buf_cerr): Like so.
	(buf_wcout, buf_wcin, buf_wcerr): And so.
	* testsuite/27_io/ios_init.cc: Add.

From-SVN: r42922
2001-06-06 01:31:58 +00:00
Benjamin Kosnik fdf1b60d2b locale_facets.h (ctype<_CharT>): Add definitions for generic ctype virtuals.
2001-06-04  Brendan Kehoe  <brendan@zen.org>
	    Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3017
	* include/bits/locale_facets.h (ctype<_CharT>): Add definitions
	for generic ctype virtuals.
	* src/locale.cc: Minor tweaks, naming consistency.
	* testsuite/22_locale/ctype.cc: Add test.

From-SVN: r42872
2001-06-04 19:25:41 +00:00
Brendan Kehoe 84b9f762bb std_bitset.h (bitset::test): Fix __pos >= _Nb comparison; all positions must be < _Nb.
2001-06-04  Brendan Kehoe  <brendan@zen.org>
            Phil Edwards  <pme@sources.redhat.com>

	* include/bits/std_bitset.h (bitset::test):  Fix __pos >= _Nb
	comparison; all positions must be < _Nb.
	* testsuite/23_containers/bitset_members.cc:  New file.

Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>

From-SVN: r42859
2001-06-04 17:42:22 +00:00
Jeffrey Oldham 1007e271a3 char_traits.h (move): Qualify memmove with std::.
2001-06-04  Jeffrey Oldham  <oldham@codesourcery.com>

	* include/bits/char_traits.h (move): Qualify memmove with std::.
	(copy): Qualify memcpy with std::.
	* testsuite/27_io/filebuf_virtuals.cc (test01): Qualify strlen and
	strncmp with std::.
	(test02): Likewise.
	* testsuite/27_io/stringbuf_virtuals.cc (test01): Likewise.

From-SVN: r42854
2001-06-04 15:46:03 +00:00
Benjamin Kosnik bfa1e6b11b acconfig.h (_GLIBCPP_BUGGY_FLOAT_COMPLEX): Remove.
2001-05-30  Benjamin Kosnik  <bkoz@redat.com>

	* acconfig.h (_GLIBCPP_BUGGY_FLOAT_COMPLEX): Remove.
	(_GLIBCPP_BUGGY_COMPLEX): Remove.
	* config.h.in: Regenerate.
	* acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT): Remove.
	* aclocal.m4: Regenerate.
	* configure.in: Don't call it.
	* configure: Regenerate.

	libstdc++/2970
	* src/complex_io.cc (operator<<(ostream&, const complex&): Fix.
	* testsuite/26_numerics/complex_inserters_extractors.cc (test01):
	New test.

	libstdc++/2985
	* include/bits/std_complex.h: Include sstream. Put definitions for
	complex inserters and extractors here, and remove them from...
	* src/complex_io.cc: ...here.
	* include/bits/basic_ios.h (basic_ios::__numput_type): Add _Traits
	parameter.
	(basic_ios::__numget_type): Same.
	* include/bits/std_istream.h: Same.
	* include/bits/std_ostream.h: Same.
	* include/bits/sbuf_iter.h (ostreambuf_iterator): Fix typo in base
	class iterator template arguments.
	* src/locale-inst.cc: Add explicit has_facet instantiations.
	* include/bits/basic_ios.h (basic_ios::_M_get_fctype_ios): Remove.
	(_M_get_fnumput): Remove.
	(_M_get_fnumget): Remove.
	(basic_ios::_M_check_facet): New function.
	(basic_ios::_M_cache_facets): New function.
	* include/bits/basic_ios.tcc: Definition for _M_cache_facets.
	(basic_ios::imbue): Call _M_cache_facets.
	(basic_ios::init): Same.
	* include/bits/istream.tcc: Format, use _M_check_facet.
	* include/bits/ostream.tcc: Same.
	* include/bits/locale_facets.tcc (__output_float): Change
	signature, add _Traits.
	* testsuite/26_numerics/complex_inserters_extractors.cc (test02):
	New test.

From-SVN: r42743
2001-05-31 12:14:56 +00:00
Rainer Orth e944097aae libstdc++-v3-dg.exp (libstdc++-v3-init): Use get_multilibs to find gcc.
2001-05-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

        * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Use
        get_multilibs to find gcc.

From-SVN: r42714
2001-05-30 20:25:51 +00:00
Benjamin Kosnik a16ad77946 inserters_extractors.cc (test09): New test.
2001-05-24  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2830
	* testsuite/21_strings/inserters_extractors.cc (test09): New test.
	* include/bits/ostream.tcc: Format to match istream.tcc.
	(operator<<(basic_ostream __out, const basic_string __s)): Fix.

From-SVN: r42557
2001-05-25 04:24:12 +00:00
Mark Mitchell eeff8d2c06 std_cstring.h: #define away all global functions we will redeclare in namespace `std'.
* include/c_std/bin/std_cstring.h: #define away all global
	functions we will redeclare in namespace `std'.
	* libsupc++/eh_alloc.cc (__cxa_allocate_exception): Use
	std::memset, instead of memset.
	* testsuite/19_diagnostics/stdexceptions.cc: Use `std::strcmp',
	not plain `strcmp'.
	* testsuite/21_strings/c_strings.cc: Use `std::strcpy' instead of
	plain `strcpy'.

From-SVN: r42555
2001-05-25 01:33:21 +00:00
Benjamin Kosnik d422980b3f basic_ios.tcc: Small tweak.
2001-05-24  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2832
	* include/bits/basic_ios.tcc: Small tweak.
	* include/bits/std_fstream.h (ifstream): Add buffer member. Adjust
	ctors and dtors, and rdbuf settings.
	(ofstream): Same.
	(fstream): Same.
	* include/bits/std_sstream.h: Same, but for stringstream classes.
	* testsuite/27_io/ostringstream_members.cc: New.
	* testsuite/27_io/stringstream_members.cc: New.
	* testsuite/27_io/fstream_members.cc: New.
	* testsuite/27_io/ifstream_members.cc: Add test.
	* testsuite/27_io/istringstream_members.cc: Add test.
	* testsuite/27_io/ofstream_members.cc: Add test.

From-SVN: r42547
2001-05-24 23:09:53 +00:00
Gabriel Dos Reis cf3e18dd1e c++config (__NO_MATH_INLINES): New macro.
* include/bits/c++config (__NO_MATH_INLINES): New macro.
      * testsuite/26_numerics/fabs_inline.cc (main): New test.

From-SVN: r42533
2001-05-24 18:38:20 +00:00
Benjamin Kosnik ec233c75fb libstdc++-v3-dg.exp (libstdc++-v3-init): Set ld_library_path.
2001-05-22  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2841
	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set
	ld_library_path.
	(libstdc++-v3_set_ld_library_path): New, copied from g++.exp.
	(libstdc++-v3-finish): Remove.
	(libstdc++-v3_exit): Remove.

From-SVN: r42487
2001-05-23 07:05:14 +00:00
Benjamin Kosnik 990101f973 mkcheck.in (static_fail): Remove S_FLAG decoration on output.
2001-05-21  Benjamin Kosnik  <bkoz@redhat.com>

	* mkcheck.in (static_fail): Remove S_FLAG decoration on output.

	* include/bits/std_sstream.h (stringbuf::setbuf): Require both
	arguments to be non-null.
	* include/bits/fstream.tcc (filebuf::_M_allocate_buffers): Only
	try allocations if allocated size is greater than zero.
	(filebuf::_M_filebuf_init): Change to
	(filebuf::_M_allocate_file): Which is what it does now.
	(filebuf::_M_allocate_bufers): Change to
	(filebuf::_M_allocate_internal_buffer): This, and create
	(filebuf::_M_allocate_pback_buffer): New.
	(filebuf::_M_destroy_internal_buffer): New.
	(filebuf::_M_buf_allocated): New data member.
	(filebuf::setbuf): Use new logic, allow use of external buffer.
	* testsuite/27_io/stringbuf_virtuals.cc: New file.
	* testsuite/27_io/filebuf_virtuals.cc: New file.

From-SVN: r42458
2001-05-22 18:48:19 +00:00
Benjamin Kosnik d4fae8b1f0 c_strings.cc (main): Fix.
2001-05-21  Benjamin Kosnik  <bkoz@kredhat.com>

	* testsuite/21_strings/c_strings.cc (main): Fix.

From-SVN: r42420
2001-05-22 04:58:14 +00:00
Benjamin Kosnik 662d942545 README: Add notes.
2001-05-18  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/README: Add notes.

	* src/Makefile.am (libstdc++.INC): Remove.
	* src/Makefile.in: Regenerate.

	Phil Edwards <pedwards@disaster.jaj.com>
	* mkcheck.in: Add missing '#'.

From-SVN: r42298
2001-05-19 03:42:53 +00:00
Angela Marie Thomas 28e8acb68f libstdc++-v3-dg.exp (libstdc++-v3-init): Set flags appropriately for remote testing and testing installed files without...
2001-05-18  Angela Marie Thomas <angela@cygnus.com>

        * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set flags
        appropriately for remote testing and testing installed files without
        a build dir.

From-SVN: r42272
2001-05-18 18:55:44 +00:00
Gabriel Dos Reis 5c542b4a19 std_valarray.h (valarray<>::operator[] const): Return a const reference.
* include/bits/std_valarray.h (valarray<>::operator[] const):
        Return a const reference.
        * testsuite/26_numerics/valarray_const_bracket.cc: New test.

From-SVN: r42245
2001-05-18 05:47:46 +00:00
Angela Marie Thomas 256e7e85b0 libstdc++-v3-dg.exp (libstdc++-v3-dg-test): Set output_file based on the name of the testcase.
2001-05-18  Angela Marie Thomas <angela@cygnus.com>

        * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-dg-test):  Set
        output_file based on the name of the testcase.

2001-05-18  Angela Marie Thomas <angela@cygnus.com>

        * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init):  Build
        gluefile and use it if needs_status_wrapper is set.

From-SVN: r42240
2001-05-18 05:37:43 +00:00
Zack Weinberg 7edc73b46a inserters_extractors.cc, [...]: Replace multi-line string constants with C89-style concatenated string constants.
2001-05-15  Zack Weinberg  <zackw@stanford.edu>

        * testsuite/21_strings/inserters_extractors.cc,
        testsuite/27_io/istream_unformatted.cc,
        testsuite/27_io/stringstream.cc:
        Replace multi-line string constants with C89-style
        concatenated string constants.

From-SVN: r42116
2001-05-15 20:46:50 +00:00
Benjamin Kosnik c6192d882f Switch over to new harness.
2001-05-13   Benjamin Kosnik  <bkoz@redhat.com>

	Switch over to new harness.
	* testsuite_flags.in: Tweaks via Gaby.
	* testsuite/Makefile.am: Change tool to libstdc++-v3.
	(EXPECT): Quote directly.
	(RUNTEST): Same.
	* configure.in: Output testsuite_flags.
	* acinclude.m4: Substitute src, bld, and prefix dirs.
	Remove glibcpp_expect, glibcpp_runtestflags.
	* Makefile.am (RUNTESTFLAGS): Pass this down to subdirs.
	* mkcheck.in: Port to new interface.

	* aclocal.m4: Regerate.
	* configure: Regnerate.
	* Makefile.in: Regnerate.
	* */Makefile.in: Regenerate.

	* tests_flags.in: Remove.
	* testsuite/lib/libstdc++.exp: Remove.
	* testsuite/libstdc++.tests/tests.exp: Remove.

From-SVN: r42055
2001-05-14 01:15:36 +00:00
Benjamin Kosnik 602928d139 Switch over to new harness.
2001-05-13   Benjamin Kosnik  <bkoz@redhat.com>

	Switch over to new harness.
	* testsuite_flags.in: Tweaks via Gaby.
	* testsuite/Makefile.am: Change tool to libstdc++-v3.
	(EXPECT): Quote directly.
	(RUNTEST): Same.
	* configure.in: Output testsuite_flags.
	* acinclude.m4: Substitute src, bld, and prefix dirs.
	Remove glibcpp_expect, glibcpp_runtestflags.
	* Makefile.am (RUNTESTFLAGS): Pass this down to subdirs.
	* mkcheck.in: Port to new interface.

	* aclocal.m4: Regerate.
	* configure: Regnerate.
	* Makefile.in: Regnerate.
	* */Makefile.in: Regenerate.

	* tests_flags.in: Remove.
	* testsuite/lib/libstdc++.exp: Remove.

From-SVN: r42054
2001-05-14 01:07:38 +00:00
Benjamin Kosnik c66ce1f5b7 testsuite_flags.in: New, simplified interface.
2001-05-11   Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite_flags.in: New, simplified interface.
	* testsuite/lib/libstdc++-v3-dg.exp: New test harness.
	* testsuite/libstdc++-v3.dg: Add.
	* testsuite/libstdc++-v3.dg/dg.exp: Add.

From-SVN: r41999
2001-05-12 17:49:16 +00:00
Benjamin Kosnik 04d930e6d4 *.cc: Remove spaces, make sure testcases return zero.
2001-05-11   Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/*/*.cc: Remove spaces, make sure testcases return zero.
	* testsuite/config/default.exp: Update bugs email address.

From-SVN: r41997
2001-05-12 16:53:08 +00:00
Benjamin Kosnik 8850521be3 libstdc++.exp: Use libgloss.exp.
2001-05-09  Benjamin Kosnik  <bkoz@redhat.com>

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

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

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

From-SVN: r41919
2001-05-08 23:53:55 +00:00
Benjamin Kosnik ee2f20b9c5 std_fstream.h (basic_filebuf): Change signature.
2001-05-07  Benjamin Kosnik  <bkoz@redhat.com>

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

From-SVN: r41909
2001-05-08 03:39:50 +00:00
Benjamin Kosnik 39003c9902 std_fstream.h (basic_filebuf): Change signature.
2001-05-07  Benjamin Kosnik  <bkoz@redhat.com>

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

From-SVN: r41908
2001-05-08 03:07:56 +00:00
Alexandre Oliva f8e4b51d36 configure.in (LIBSUPCXX_PICFLAGS): Set it to -prefer-pic or -prefer-non-pic depending on whether libtool has...
* configure.in (LIBSUPCXX_PICFLAGS): Set it to -prefer-pic or
-prefer-non-pic depending on whether libtool has shared libraries
enabled or disabled.
* libsupc++/Makefile.am (LIBSUPCXX_CXXFLAGS): Set to
$(LIBSUPCXX_PICFLAGS).
* configure, */Makefile.in: Rebuilt.

From-SVN: r41806
2001-05-03 20:35:18 +00:00
Benjamin Kosnik a85afd69a3 sbuf_iter.h (istreambuf_iterator): Correct.
2001-05-01  Benjamin Kosnik  <bkoz@redhat.com>

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

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

From-SVN: r41755
2001-05-02 05:50:20 +00:00
Gabriel Dos Reis 358c9f4b42 * testsuite/libstdc++.tests/tests.exp: Add comment.
From-SVN: r41730
2001-05-01 17:28:02 +00:00