Commit Graph

447 Commits

Author SHA1 Message Date
Benjamin Kosnik 7ec3af37b9 [multiple changes]
2003-01-08  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (stamp-*): Add checks for existing stamps.
	* include/Makefile.in: Regenerate.

	* acinclude.m4 (GLIBCPP_ENABLE_DEBUG): Correct comment.
	* aclocal.m4: Regenerate.

	* configure.in: Don't add new multi-do rules every time the
	directory is reconfigured.
	* configure: Regenerate.

2003-01-08  Brad Spencer  <spencer@infointeractive.com>
            Nathan Myers  <ncm@cantrip.org>

	* src/Makefile.am (stamp-debug): Clean.
	* src/Makefile.in: Regenerate.

From-SVN: r61052
2003-01-08 19:43:11 +00:00
Benjamin Kosnik 1c26d8fd84 locale_facets.h (messages): Move ctor, dtor definitions to..
2003-01-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h (messages): Move ctor, dtor
	definitions to..
	(__timepunct): Same.
	* config/locale/gnu/messages_members.h (messages): Add dtor, ctor
	definitions. Conditionalize for GNU systems.
	* config/locale/generic/messages_members.h (messages): Add dtor, ctor
	definitions.
	* config/locale/gnu/time_members.h (messages): New. Add dtor, ctor
	definitions. Conditionalize for GNU systems.
	* config/locale/generic/time_members.h (messages): New. Add dtor, ctor
	definitions.
	* include/bits/localefwd.h (locale::facet::_S_c_name): Add.
	* src/locale.cc: Define.
	* src/localename.cc (locale::_Impl::_Impl(facet**, size_t, bool):
	Use it.
	* config/locale/gnu/time_members.h: Use it.
	* config/locale/gnu/messages_members.h: Use it.
	* config/linker-map.gnu: Add locale::facets details.
	* include/Makefile.am (target_headers_extra): Add time_members.h.
	* include/Makefile.in: Regenerate.
	* acinclude.m4: Export CTIME_H.
	* aclocal.m4: Regenerate.
	* configure: Regnerate.

From-SVN: r60952
2003-01-06 21:23:00 +00:00
Paolo Carlini 80c4581d61 2003-01-06 Paolo Carlini <pcarlini@unitus.it>
* src/codecvt.cc
	(codecvt<char, char, mbstate_t>::do_in, do_out):
	Tweak parameters to avoid unused parameter warnings.

From-SVN: r60946
2003-01-06 18:48:41 +00:00
Paolo Carlini b1599033fa re PR libstdc++/9168 (codecvt<char, char, mbstate_t> overwrites output buffers)
2003-01-05  Paolo Carlini <pcarlini@unitus.it>

	PR libstdc++/9168
	* src/codecvt.cc
	(codecvt<char, char, mbstate_t>::do_in, do_out):
	Implement the resolution of DR19 (TC).
	* testsuite/22_locale/codecvt_members_char_char.cc
	(test01): Tweak.

From-SVN: r60901
2003-01-05 08:04:18 +00:00
Loren J. Rittle 2f94573a94 Makefile.am: Resolve non-portable use of $<.
* src/Makefile.am: Resolve non-portable use of $<.
	* src/Makefile.in: Rebuilt.

From-SVN: r60666
2002-12-31 00:58:36 +00:00
Mark Mitchell 43be7fe7d7 * config/locale/gnu/ctype_members.cc
(ctype<wchar_t>::_M_convert_to_wmask): Remove stray semicolon.
	* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t, true>::_M_initialize_moneypunct): Avoid
	defining classes in static_cast.
	(moneypunct<wchar_t, false>::_M_initialize_moneypunct): Likewise.
	* config/locale/gnu/numeric_members.cc
	(numpunct<wchar_t, false>::_M_initialize_numpunct): Likewise.
	* include/bits/stl_deque.h (operator-): Insert typename where
	required.
	* include/bits/stl_multiset.h (multiset): Remove stray semicolon.
	* include/bits/stl_set.h (set): Likewise.
	* include/bits/valarray_meta.h (bits/slice_array.h): Include it.
	* include/std/std_fstream.h (basic_fstream::open): Use this-> to
	avoid Koenig lookup.
	(basic_fstream::close): Likewise.
	* libsupc++/new (operator delete): Remove stray semicolon.
	* libsupc++/new (operator delete[]): Likewise.
	* libsupc++/tinfo.cc: Likewise.
	* src/stdexcept.c (logic_error::~logic_error): Likewise.
	(runtime_error::~runtime_error): Likewise.

From-SVN: r60547
2002-12-27 23:03:03 +00:00
Phil Edwards fb7054160f vterminate.cc: Move to...
2002-12-25  Phil Edwards  <pme@gcc.gnu.org>

	* src/vterminate.cc:  Move to...
	* libsupc++/vterminate.cc:  ...here.  New file.  Replace fprintf with
	writestr macro.  Slight reword to explanatory text.
	* libsupc++/eh_terminate.cc (__cxxabiv1::__terminate_handler,
	__cxxabiv1::__unexpected_handler):  Break definitions out to...
	* libsupc++/eh_unex_handler.cc:  ...here (new file), and...
	* libsupc++/eh_term_handler.cc:  ...here (new file).  Initialize
	__terminate_handler with __gnu_cxx::__verbose_terminate_handler
	instead of std::abort.

	* libsupc++/Makefile.am (sources), src/Makefile.am (sources):  Update.
	* libsupc++/Makefile.in, src/Makefile.in:  Regenerate.

From-SVN: r60505
2002-12-26 06:10:35 +00:00
Jason Merrill fc88355291 vterminate.cc (__verbose_terminate_handler): Send diagnostics to stderr.
* src/vterminate.cc (__verbose_terminate_handler): Send
        diagnostics to stderr.

From-SVN: r60254
2002-12-18 11:31:35 -05:00
Benjamin Kosnik 6aa43d99a3 configure.in (GLIBCPP_ENABLE_DEBUG): Default to none.
2002-12-16  Benjamin Kosnik  <bkoz@redhat.com>

        * configure.in (GLIBCPP_ENABLE_DEBUG): Default to none.
	Call GLIBCPP_ENABLE_DEBUG_FLAGS.
        * acinclude.m4 (GLIBCPP_ENABLE_DEBUG): GLIBCPP_BUILD_DEBUG, new
        conditional if --enable-debug is yes. Rework.
	(GLIBCPP_ENABLE_DEBUG_FLAGS): New.
        * aclocal.m4: Regenerate.
	* libio/Makefile.am: Remove DEBUG_FLAGS.
	* libio/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Remove DEBUG_FLAGS.
	* libsupc++/Makefile.in: Regenerate.
	* docs/html/configopts.html: Add docs for --enable-debug,
	--enable-debug-flags.

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

	Correct dependency tracking, build warts.
	* configure.in: Correct repeated AC_OUTPUT thrashing by
	config-ml.in
	* configure: Regenerate.
	* include/Makefile.am (stamp-target): Stamp in top_builddir.
	* include/Makefile.in: Regenerate.
	* src/Makefile.am (codecvt_members.cc): New rule.
	(collate_members.cc): Same.
	(ctype_members.cc): Same.
	(messages_members.cc): Same.
	(monetary_members.cc): Same.
	(numeric_members.cc): Same.
	(time_members.cc): Same.
	(c++locale.cc): Same.
	(basic_file.cc): Same.
	* src/Makefile.in: Regenerate.
	* acinclude.m4 (CCTYPE_CHAR_CC): Remove.
	(CCCODECVT_CC): Don't link, AC_SUBST.
	(CCOLLATE_CC): Same.
	(CCTYPE_CC): Same.
	(CMESSAGES_CC): Same.
	(CMONEY_CC): Same.
	(CNUMERIC_CC): Same.
	(CTIME_CC): Same.
	(CLOCALE_CC): Same.
	* aclocal.m4: Regenerate.

	* src/Makefile.am (libstdc___la_LIBADD): Use top_builddir
	for convenience libraries.
	(version_arg): Rename linker.map to libstdc++.ver.
	(libstdc___la_DEPENDENCIES): Remove linker.map, add
	libstdc++-symbol.ver as a dependency.
	(libstdc++-symbol.ver): Add rule.
	* acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Change LINKER_MAP to
	SYMVER_MAP. Don't link, AC_SUBST.

	* include/Makefile.am (target_headers_noinst): New.
	(stamp-target): Add CLOCALE_INTERNAL_H.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Don't link
	CLOCALE_INTERNAL_H, AC_SUBST.
	* config/locale/gnu/c_locale.cc: Modify c++locale_internal.h
	include.
	* config/locale/gnu/time_members.cc: Same.
	* config/locale/gnu/numeric_members.cc: Same.
	* config/locale/gnu/monetary_members.cc: Same.
	* config/locale/gnu/messages_members.cc: Same.
	* config/locale/gnu/ctype_members.cc: Same.
	* config/locale/gnu/collate_members.cc: Same.
	* config/locale/gnu/codecvt_members.cc: Same.
	* config/locale/generic/codecvt_members.cc: Remove.

From-SVN: r60177
2002-12-16 19:02:01 +00:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Paolo Carlini dc7291321c localename.cc (locale::_Impl::_Impl(const char*, size_t)): Improve previous fix for the strtok vs MT issue.
2002-11-28  Paolo Carlini  <pcarlini@unitus.it>
	    Nathan Myers  <ncm@cantrip.org>

	* src/localename.cc
	(locale::_Impl::_Impl(const char*, size_t)):
	Improve previous fix for the strtok vs MT issue.

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

From-SVN: r59609
2002-11-28 17:29:24 +00:00
Paolo Carlini b1455c558e localename.cc (locale::_Impl::_Impl(const char*, size_t)): Avoid strtok for thread safety.
2002-11-25  Paolo Carlini  <pcarlini@unitus.it>
	    Nathan Myers  <ncm@cantrip.org>

	* src/localename.cc
	(locale::_Impl::_Impl(const char*, size_t)):
	Avoid strtok for thread safety.

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

From-SVN: r59486
2002-11-26 01:22:13 +00:00
Wolfgang Bangerth f815521c75 std_complex.h (operator<<(basic_ostream&, const complex&)): Prefer 'x' to "x" for efficiency sake.
2002-11-25  Wolfgang Bangerth  <bangerth@ticam.utexas.edu>

	* include/std/std_complex.h
	(operator<<(basic_ostream&, const complex&)): Prefer 'x'
	to "x" for efficiency sake.
	* src/locale.cc (locale::locale(const char*)): Ditto.

From-SVN: r59465
2002-11-25 19:01:55 +00:00
Paolo Carlini bbed24125e locale.cc (locale::locale(const char*)): Trivial cosmetic tweaks.
2002-11-24  Paolo Carlini  <pcarlini@unitus.it>

	* src/locale.cc (locale::locale(const char*)):
	Trivial cosmetic tweaks.

From-SVN: r59433
2002-11-24 18:48:35 +00:00
Rainer Orth 423b950b13 * src/ios.cc [_GLIBCPP_HAVE_UNISTD_H]: Include unistd.h.
From-SVN: r59141
2002-11-15 19:12:31 +00:00
Paolo Carlini 74af99e5a2 re PR libstdc++/8399 (sync_with_stdio(false) breaks unformatted input)
2002-11-15  Paolo Carlini  <pcarlini@unitus.it>
	    Loren J. Rittle  <ljrittle@acm.org>

	PR libstdc++/8399
	* acinclude.m4
	(GLIBCPP_CHECK_UNISTD_DECL_AND_LINKAGE_1): New macro to
	check for unistd.h functions.
	(GLIBCPP_CHECK_UNISTD_SUPPORT): New macro, check for isatty
	in unistd.h.
	* configure.in: Call here.
	* src/ios.cc (ios_base::Init::_S_ios_create(bool)):
	Use _GLIBCPP_HAVE_ISATTY: ifdef, in case of interactive
	input __in_size = 1 even when sync_with_stdio is false;
	otherwise fall back to __in_size = 1.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.

Co-Authored-By: Loren J. Rittle <ljrittle@acm.org>

From-SVN: r59118
2002-11-15 08:06:35 +00:00
Loren J. Rittle 2b298bb772 locale.cc (std::locale::classic()): Weaken locking protocol.
libstdc++/7445
	* src/locale.cc (std::locale::classic()): Weaken locking protocol.

From-SVN: r59078
2002-11-13 14:55:32 +00:00
John David Anglin fa3d9f57b0 os_defines.h (_GLIBCPP_INST_ATOMICITY_LOCK): Define.
* config/os/hpux/os_defines.h (_GLIBCPP_INST_ATOMICITY_LOCK): Define.
	* src/misc-inst.cc (std): Instantiate atomicity lock when
	_GLIBCPP_INST_ATOMICITY_LOCK is defined.
	* config/cpu/hppa/atomicity.h: New file.

From-SVN: r58831
2002-11-05 19:17:37 +00:00
Benjamin Kosnik a7c67c71db re PR libstdc++/8172 (undefined reference to operator+ for string)
2002-11-01  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/8172
	* src/string-inst.cc: Add instantiation.

From-SVN: r58738
2002-11-02 02:18:18 +00:00
Loren J. Rittle 0b564d905f howto.html (GLIBCPP_FORCE_NEW): Document new environment variable which replaces all uses of __USE_MALLOC macro.
* docs/html/23_containers/howto.html (GLIBCPP_FORCE_NEW): Document
	new environment variable which replaces all uses of __USE_MALLOC
	macro.
	* docs/html/ext/howto.html (GLIBCPP_FORCE_NEW): Likewise.
	(__mem_interface): Remove all references to old internal typedef.
	* include/backward/alloc.h (__USE_MALLOC): Remove it and all
	guarded code.
	* include/bits/c++config (__USE_MALLOC): Update related error
	message and comment.
	* include/bits/stl_alloc.h (__USE_MALLOC): Remove it and all
	guarded code.  Update all related comments.
	(__mem_interface): Unconditionally replace it with __new_alloc.
	However, leave the typedef around in case anyone used it.
	(__default_alloc_template<>::_S_force_new): New class static.
	(__default_alloc_template<>::allocate, deallocate): Add
	run-time controlled feature similar to what __USE_MALLOC code
	path had provided.
	* src/stl-inst.cc (__USE_MALLOC): Remove it and all
	guarded code.
	* testsuite/21_strings/capacity.cc: Remove reference to __USE_MALLOC.
	Add documentation on GLIBCPP_FORCE_NEW environment variable.
	* testsuite/ext/allocators.cc: Likewise.

From-SVN: r58286
2002-10-18 20:52:57 +00:00
Benjamin Kosnik 8c536ae9dc globals.cc (__gnu_cxx::c_locale_impl_compat): Add, alias to c_locale_impl.
2002-10-14  Benjamin Kosnik  <bkoz@redhat.com>

	* src/globals.cc (__gnu_cxx::c_locale_impl_compat): Add, alias to
	c_locale_impl.
	* testsuite/abi_check.cc (line_to_symbol_info): Collect size info.
	* docs/html/abi.txt: Update.

From-SVN: r58147
2002-10-15 04:22:11 +00:00
Benjamin Kosnik 45c7cbd930 acconfig.h (_GLIBCPP_SYMVER): Add.
2002-10-11  Benjamin Kosnik  <bkoz@redhat.com>

	* acconfig.h (_GLIBCPP_SYMVER): Add.
	(_GLIBCPP_ASM_SYMVER): Add.
	* acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Define _GLIBCPP_SYMVER.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/bits/c++config (_GLIBCPP_AT_AT): Define, as an expedient
	hack around m4 issues with quoting '@'.
	* src/locale.cc: Use _GLIBCPP_ASM_SYMVER.
	* src/globals.cc: Same.

	* testsuite/22_locale/ctor_copy_dtor.cc (test04): Fix for
	non-glibc systems.

From-SVN: r58065
2002-10-11 21:10:10 +00:00
Benjamin Kosnik a7817e1db2 linker-map.gnu (GLIBCPP_3.2.1): Add.
2002-10-10  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu (GLIBCPP_3.2.1): Add.
	(GLIBCPP_3.2): Don't export locale::_S_*.
	* src/ios.cc: Move globals into __gnu_cxx. Make old exported
	symbols match.
	* src/locale.cc: Same.
	* src/localename.cc: Same.
	* src/globals.cc: Same.

From-SVN: r58042
2002-10-11 07:09:36 +00:00
Benjamin Kosnik 402a402cab locale.cc: Fix comments, move ctors together.
2002-10-09  Benjamin Kosnik  <bkoz@redhat.com>

	* src/locale.cc: Fix comments, move ctors together.
	* testsuite/22_locale/static_members.cc (test03): Add.

From-SVN: r58001
2002-10-10 05:15:29 +00:00
Paolo Carlini aa53f832ac localefwd.h (class locale): Add static member _S_num_extra_categories...
2002-10-08  Paolo Carlini  <pcarlini@unitus.it>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/localefwd.h (class locale): Add static member
	_S_num_extra_categories, encoding the number of additional
	categories.
	Change _S_num_categories to _S_categories_size.
	(class locale::_Impl): Add _M_c_cats.
	(class locale::_Impl::_M_names): Change to array of chars.
	(class locale::_Impl::_M_check_same_name): Use
	_S_extra_categories_size, tweak.
	(locale::locale(const locale&, _Facet*)): Ditto.
    	* src/locale.cc (locale::locale(const char* )): Rewrite to deal
	with the environment in a POSIX-compliant way while being thread
	safe.
	(locale::name()): Update to output POSIX environment strings.
	* src/localename.cc
	(locale::_Impl::_Impl(const _Impl&, size_t): Use
	_S_categories_size_*, tweak.
	(locale::_Impl::_Impl(facet**, size_t, bool)): Ditto.
	(locale::_Impl::_Impl(const char*, size_t)): Name each category
	individually.
	(locale::_Impl::_M_replace_categories): Use strcpy.

	* include/bits/locale_facets.h (numpunct::_M_initialize_numpunct):
	Change default argument to NULL from _S_c_locale.
	(timepunct::_M_initialize_timepunct): Same.
	_S_c_locale cleanups.
	* src/codecvt.c: _S_c_locale simplification.
	* src/ctype.c: Same.
	* src/globals.cc: Add fake_name.
	* src/locale-inst.cc: Remove extra includes.
	* src/locale.cc: Remove extra includes.
	Add _S_extra_categories_size definition.
	Correct "C" initialization.
	(locale::facet::facet): Don't initialize _S_c_locale.
	(locale::facet::_M_remove_reference): Adjust.
	* src/localename: Use facet_vec, facet_name.
	(locale::_Impl::_Impl(facet** __f, size_t __refs, bool)): Set
	facet ref counts to one. Initialize _S_c_locale.
	(locale::_Impl::_M_install_facet(id*, facet*)): Adjust facet ref
	counts when installing unilaterally.

	* config/locale/generic/c_locale.cc: Add _S_categories definition.
	* config/locale/generic/c_locale.h: Add _GLIBCPP_NUM_CATEGORIES macro.
	* config/locale/generic/time_members.cc: _S_c_locale cleanup.

	* config/locale/gnu/c_locale.cc: Add _S_categories definition.
	(_S_destroy_c_locale): Move checks against _S_c_locale here.
	* config/locale/gnu/c_locale.h: Add _GLIBCPP_NUM_CATEGORIES macro.
	* config/locale/gnu/ctype_members.cc: Simplify _S_destroy_c_locale
	calls, _S_c_locale usage.
	* config/locale/gnu/monetary_members.cc: Same, tweaks.
	* config/locale/gnu/monetary_members.cc: Same.
	* config/locale/gnu/time_members.cc: Same.
	* config/os/gnu-linux/ctype_noninline.h: Use locale::classic().

	* docs/html/22_locale/locale.html: Add bits about global locales
	and "C" setlocale.

	* testsuite/22_locale/facet.cc (test02): Add.
	* testsuite/22_locale/static_members.cc (test02): Add.
	* testsuite/22_locale/ctor_copy_dtor.cc (test04): Add.

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

From-SVN: r57964
2002-10-08 23:32:23 +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
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
Richard Henderson ac520ec919 c-common.c (builtin_define_float_constants): Emit __FOO_DENORM_MIN__.
gcc/
        * c-common.c (builtin_define_float_constants): Emit __FOO_DENORM_MIN__.

libstdc++/
        * include/std/std_limits.h (__glibcpp_f32_denorm_min_bytes,
        __glibcpp_f32_has_denorm, __glibcpp_f64_denorm_min_bytes,
        __glibcpp_f64_has_denorm, __glibcpp_f80_denorm_min_bytes,
        __glibcpp_f80_has_denorm, __glibcpp_f96_denorm_min_bytes,
        __glibcpp_f96_has_denorm, __glibcpp_f128_denorm_min_bytes,
        __glibcpp_f128_has_denorm, __glibcpp_float_denorm_min_bytes,
        __glibcpp_float_has_denorm, __glibcpp_double_denorm_min_bytes,
        __glibcpp_double_has_denorm, __glibcpp_long_double_denorm_min_bytes,
        __glibcpp_long_double_has_denorm): Remove.
        (__glibcpp_float_denorm_min, __glibcpp_double_denorm_min,
        __glibcpp_long_double_denorm_min): Remove.
        (std::numeric_limits<float>::has_denorm): Use __FLT_DENORM_MIN__.
        (std::numeric_limits<float>::denorm_min): Likewise.
        (std::numeric_limits<double>): Similarly.
        (std::numeric_limits<long double>): Similarly.
        * src/limits.cc (__glibcpp_float_denorm_min,
        __glibcpp_double_denorm_min, __glibcpp_long_double_denorm_min): Remove.

From-SVN: r57200
2002-09-16 09:58:42 -07:00
Benjamin Kosnik 714e9334c4 Makefile.am (LIBTOOL): Use --tag CC always for this directory.
2002-09-12  Benjamin Kosnik  <bkoz@redhat.com>

	* libmath/Makefile.am (LIBTOOL): Use --tag CC always for this
	directory.
	* libmath/Makefile.in: Regenerate.
	* src/Makefile.am: Tweak comment.
	* src/Makefile.in: Regenerate.

	* config/locale/gnu/c_locale.h: Remove warnings.
	Inject __uselocale into __gnu_cxx.
	* config/locale/generic/c_locale.h: Match.

From-SVN: r57082
2002-09-12 23:27:30 +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
Paolo Carlini c6b5df5351 codecvt.h (class __codecvt_abstract_base): Add __c_locale type _M_c_locale_codecvt member.
2002-09-10  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/codecvt.h (class __codecvt_abstract_base):
	Add __c_locale type _M_c_locale_codecvt member.
	(class codecvt<char, char, mbstate_t>,
	class codecvt<wchar_t, char, mbstate_t>): Add new
	codecvt(__c_locale, size_t) constructor.
	(codecvt_byname::codecvt_byname): Update.
	* src/codecvt.cc (class codecvt<char, char, mbstate_t>,
	class codecvt<wchar_t, char, mbstate_t>): Update codecvt(size_t)
	constructor and ~codecvt() destructor; define
	codecvt(__c_locale, size_t) constructor.
	(codecvt::do_out): Switch to _M_c_locale_codecvt around wcsrtombs call.
	(codecvt::do_in): Ditto for mbsrtowcs call.
	* src/localename.cc (locale::_Impl::_Impl(const char*, size_t)):
	Tweak construction of codecvt facets.

From-SVN: r57011
2002-09-10 19:35:04 +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
Richard Henderson 65e32b88a6 std_limits.h (__glibcpp_f32_infinity_bytes, [...]): Remove.
* include/std/std_limits.h (__glibcpp_f32_infinity_bytes,
        __glibcpp_f32_has_infinity, __glibcpp_f64_infinity_bytes,
        __glibcpp_f64_has_infinity, __glibcpp_f80_infinity_bytes,
        __glibcpp_f80_has_infinity, __glibcpp_f96_infinity_bytes,
        __glibcpp_f96_has_infinity, __glibcpp_f128_infinity_bytes,
        __glibcpp_f128_has_infinity, __glibcpp_float_infinity_bytes,
        __glibcpp_float_has_infinity, __glibcpp_double_infinity_bytes,
        __glibcpp_double_has_infinity, __glibcpp_long_double_infinity_bytes,
        __glibcpp_long_double_has_infinity): Remove.
        (std::numeric_limits<float>, std::numeric_limits<double>,
        std::numeric_limits<long double>): Use __builtin_huge_val
        to implement has_infinity and infinity().
        * src/limits.cc (__glibcpp_float_infinity, __glibcpp_double_infinity,
        __glibcpp_long_double_infinity): Remove.

From-SVN: r56821
2002-09-04 16:22:18 -07:00
Gabriel Dos Reis 2559486f3e std_limits.h (__glibcpp_f32_infinity_bytes, [...]): New macros.
* include/std/std_limits.h (__glibcpp_f32_infinity_bytes,
 	__glibcpp_f32_has_infinity, __glibcpp_f32_QNaN_bytes,
	__glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
	__glibcpp_f32_has_SNaN, __glibcpp_f32_denorm_min_bytes,
	__glibcpp_f32_has_denorm, __glibcpp_f32_is_iec559,
	__glibcpp_f64_infinity_bytes,
	__glibcpp_f64_has_infinity, __glibcpp_f64_QNaN_bytes,
	__glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
	__glibcpp_f64_has_SNaN, __glibcpp_f64_denorm_min_bytes,
	__glibcpp_f64_has_denorm, __glibcpp_f64_is_iec559,
	__glibcpp_f80_infinity_bytes,
	__glibcpp_f80_has_infinity, __glibcpp_f80_QNaN_bytes,
	__glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
	__glibcpp_f80_has_SNaN, __glibcpp_f80_denorm_min_bytes,
	__glibcpp_f80_has_denorm, __glibcpp_f80_is_iec559,
	__glibcpp_f96_infinity_bytes,
	__glibcpp_f96_has_infinity, __glibcpp_f96_QNaN_bytes,
	__glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
	__glibcpp_f96_has_SNaN, __glibcpp_f96_denorm_min_bytes,
	__glibcpp_f96_has_denorm, __glibcpp_f96_is_iec559,
 	__glibcpp_f128_infinity_bytes,
 	__glibcpp_f128_has_infinity, __glibcpp_f128_QNaN_bytes,
	__glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
	__glibcpp_f128_has_SNaN, __glibcpp_f128_denorm_min_bytes,
	__glibcpp_f128_has_denorm, __glibcpp_f128_is_iec559,
	__glibcpp_float_infinity_bytes,
	__glibcpp_float_has_infinity, __glibcpp_float_QNaN_bytes,
	__glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
	__glibcpp_float_has_SNaN, __glibcpp_float_denorm_min_bytes,
	__glibcpp_float_has_denorm, __glibcpp_float_is_iec559,
	__glibcpp_double_infinity_bytes,
	__glibcpp_double_has_infinity, __glibcpp_double_QNaN_bytes,
	__glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
	__glibcpp_double_has_SNaN, __glibcpp_double_denorm_min_bytes,
	__glibcpp_double_has_denorm, __glibcpp_double_is_iec559,
	__glibcpp_long_double_infinity_bytes,
	__glibcpp_long_double_has_infinity, __glibcpp_long_double_QNaN_bytes,
	__glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
	__glibcpp_long_double_has_SNaN, __glibcpp_long_double_denorm_min_bytes,
	__glibcpp_long_double_has_denorm, __glibcpp_long_double_is_iec559:
	New macros.
	(__glibcpp_word_bits, __glibcpp_word): Likewise.
	(__glibcpp_byte): New typedef.
	(__float_storage, __double_storage, __long_double_storage): New types.
	(__glibcpp_float_infinity, __glibcpp_float_QNaN,
	__glibcpp_float_SNaN, __glibcpp_float_denorm_min): Now
	objects. Declare.
	(__glibcpp_double_infinity, __glibcpp_double_QNaN,
	__glibcpp_double_SNaN, __glibcpp_double_denorm_min): Likewise.
	(__glibcpp_long_double_infinity, __glibcpp_long_double_QNaN,
	__glibcpp_long_double_SNaN, __glibcpp_long_double_denorm_min):
	Likewise.

	* src/limits.cc (__glibcpp_float_infinity, __glibcpp_float_QNaN,
	__glibcpp_float_SNaN, __glibcpp_float_denorm_min): Define.
	(__glibcpp_double_infinity, __glibcpp_double_QNaN,
	__glibcpp_double_SNaN, __glibcpp_double_denorm_min): Likewise.
	(__glibcpp_long_double_infinity, __glibcpp_long_double_QNaN,
	__glibcpp_long_double_SNaN, __glibcpp_long_double_denorm_min):
	Likewise.

From-SVN: r56613
2002-08-27 20:30:26 +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
Benjamin Kosnik 6e52332ec7 re PR libstdc++/7445 (poor performance of std::locale::classic() in multi-threaded applications)
2002-08-15  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/stdio_filebuf.h (stdio_filebuf): Explicitly set
	_M_buf_size_opt to zero when unbuffering.
	* include/bits/fstream.tcc (filebuf::showmanyc): Simplify.
	Consistency checks for _M_buf_size_opt.

	Revert PR libstdc++/7445
	* src/locale.cc (locale::classic): Revert.

	* docs/html/17_intro/TODO: Add.

From-SVN: r56365
2002-08-15 22:25:39 +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 5a53872d08 fstream.cc: Add _GLIBCPP_USE_WCHAR_T guards.
2002-07-31  Benjamin Kosnik  <bkoz@redhat.com>

	* src/fstream.cc: Add _GLIBCPP_USE_WCHAR_T guards.

From-SVN: r55909
2002-07-31 20:48:38 +00:00
Benjamin Kosnik de17e15428 [multiple changes]
2002-07-31  Simon Whomsley  <whomsley@avacadcam.com>

	* docs/html/22_locale/howto.html: Fix.

2002-07-31  Alex Kompel  <shurik@sequoiap.com>

	PR libstdc++/7445
	* src/locale.cc (locale::classic): Move locks inside !_S_classic
	block.

2002-07-31  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/abi.txt: Update.

From-SVN: r55908
2002-07-31 19:34:08 +00:00
Benjamin Kosnik 17655a67d8 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.

From-SVN: r55905
2002-07-31 17:28:08 +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 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 fdf7e80975 re PR libstdc++/6410 (Trouble with non-Ascii monetary symbols and wchar_t)
2002-07-02  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6410
	* include/bits/locale_facets.h (moneypunct::moneypunct): Add const
	char* name parameter.
	* config/locale/gnu/monetary_members.cc: Use it.
	* config/locale/generic/monetary_members.cc: Same.
	* src/localename.cc (_Impl::_Impl(const char*, size_t)): Use it.

	* include/backward/strstream.h: Update date.

From-SVN: r55203
2002-07-03 06:29:26 +00:00
Benjamin Kosnik eafa1afac6 strstream: Remove namespace std.
2002-07-01  Benjamin Kosnik  <bkoz@redhat.com>

	* include/backward/strstream: Remove namespace std. Transfer to...
	* include/backward/strstream.h: ...here. Qualify std names.
	* src/strstream.cc: Remove namespace std.
	* include/Makefile.am (backward_headers): Remove strstream.h.
	* include/Makefile.in: Regenerate.
	* config/linker-map.gnu: Export strstream bits.

	* src/fstream-inst.cc: Tweak.
	* src/io-inst.cc: Same.
	* src/istream-inst.cc: Same.
	* src/misc-inst.cc: Same.
	* src/ostream-inst.cc: Same.
	* src/sstream-inst.cc: Same.
	* src/valarray-inst.cc: Same.
	* src/misc-inst.cc: Remove unused instantiations.

From-SVN: r55148
2002-07-01 19:58:42 +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 12d0271cfd ext-inst.cc (__gnu_cxx): Use instead of std:: for extensions.
2002-06-20  Benjamin Kosnik  <bkoz@redhat.com>

        * src/ext-inst.cc (__gnu_cxx): Use instead of std:: for extensions.
        Use size_type instead of unsigned long.

From-SVN: r54854
2002-06-20 20:13:46 +00:00
Steve Ellcey a9c418403e ext-inst.cc (_S_fetch): Add explicit templates for char and wchar types.
* src/ext-inst.cc (_S_fetch): Add explicit templates for char and
	wchar types.
	(_S_min_len): Ditto.

From-SVN: r54850
2002-06-20 19:20:41 +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
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
Steve Ellcey 3522a91b80 locale-inst.cc (__codecvt_abstract_base): Put inside _GLIBCPP_USE_WCHAR_T ifdef.
* src/locale-inst.cc (__codecvt_abstract_base):
	Put inside _GLIBCPP_USE_WCHAR_T ifdef.
	* include/bits/istream.tcc (basic_istream): Ditto.
	(ws) Ditto.
	(operator>>) Ditto.
	* include/bits/ostream.tcc (basic_ostream): Ditto.
	(endl): Ditto.
	(ends): Ditto.
	(flush): Ditto.
	(operator<<): Ditto.

From-SVN: r54351
2002-06-07 22:06:38 +00:00
Loren J. Rittle 32e7bd5b88 Update last commit.
From-SVN: r54311
2002-06-06 07:43:09 +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
Phil Edwards 7f2e0dffc6 TODO: Update.
2002-06-03  Phil Edwards  <pme@gcc.gnu.org>

	* docs/doxygen/TODO:  Update.
	* docs/doxygen/user.cfg.in (SORT_MEMBER_DOCS):  Set to off, now that
	some class members are in 14882 order.
	* docs/html/ext/howto.html:  3.1 is in the past now, not the future.

	* include/std/std_bitset.h:  Update comment.
	* src/bitset.cc:  Update comments, clean up spacing.

	* src/Makefile.am (sources):  Alphabetize for convenience.
	* src/Makefile.in:  Regenerate.

From-SVN: r54200
2002-06-03 04:45:03 +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 fb5b4dfdcb re PR libstdc++/6594 (strstreambuf leaks 16 bytes - gcc 3.0.x)
2002-05-15  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6594
	* src/strstream.cc (strstreambuf): Fix leak.

From-SVN: r53486
2002-05-15 13:15:17 +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
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
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
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 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 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 0dba73e0ab localefwd.h (locale::_Impl::_M_facets): Change from pointer to vector.
2002-04-09  Benjamin Kosnik  <bkoz@redhat.com>

        libstdc++/1072
        * include/bits/localefwd.h (locale::_Impl::_M_facets): Change from
        pointer to vector.
        Remove forward declaration of vector.
        Include vector.
        * include/bits/locale_facets.tcc: Remove vector include.
        (use_locale): Adjust.
        (has_locale): Adjust.
        * src/locale.cc: Adjust.
        * src/localename.cc: Same.

From-SVN: r52095
2002-04-09 21:19:55 +00:00
Jakub Jelinek b0396e3b6c locale_facets.h (__num_base::_S_scale_hex): Remove.
2002-04-09  Jakub Jelinek  <jakub@redhat.com>

	* include/bits/locale_facets.h (__num_base::_S_scale_hex): Remove.
	(__num_base::_S_scale_oct): Remove.
	* src/locale.cc (__num_base::_S_scale_hex): Remove.
	(__num_base::_S_scale_oct): Remove.

From-SVN: r52068
2002-04-09 08:00:08 +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 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
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
Phil Edwards 76f6aa8b6c linker-map.gnu: Export __verbose_terminate_handler.
2002-04-01  Phil Edwards  <pme@gcc.gnu.org>

	* config/linker-map.gnu:  Export __verbose_terminate_handler.
	* libsupc++/Makefile.am (sources):  Add cxa_demangle.c, dyn-string.c.
	Make new LTCOMPILE variable, use it in new special build rules.
	* libsupc++/Makefile.in:  Rebuild.
	* src/vterminate.cc (__verbose_terminate_handler):  Enable use of
	runtime __cxa_demangle.

	* docs/html/install.html:  Update prereqs and instructions.
	* docs/html/19_diagnostics/howto.html:  Bring naming for
	verbose_terminate_handler into line with reality.

From-SVN: r51709
2002-04-01 21:56:42 +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
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
Benjamin Kosnik 2ca0895384 vterminate.cc: Format, -fno-exceptions cleanup.
2002-03-22  Benjamin Kosnik  <bkoz@redhat.com>

	* src/vterminate.cc: Format, -fno-exceptions cleanup.

From-SVN: r51185
2002-03-22 20:13:43 +00:00
Paolo Carlini 6d8e16a463 locale-inst.cc (__convert_from_v): Add an additional __size parameter in the declarations.
2002-03-19  Paolo Carlini  <pcarlini@unitus.it>
	    Ulrich Drepper  <drepper@redhat.com>

	* src/locale-inst.cc (__convert_from_v): Add an additional
	__size parameter in the declarations.
	* include/bits/locale_facets.tcc
	(__convert_from_v): When available (that is,
	_GLIBCPP_USE_C99 defined) use snprintf instead of sprintf.
	(num_put::_M_convert_float): Depending on _GLIBCPP_USE_C99
	being defined or not, call and use __convert_from_v in the
	appropriate way.
	(num_put::_M_convert_int): Same here.
	(money_put::do_put(long double)): Same here.

Co-Authored-By: Ulrich Drepper <drepper@redhat.com>

From-SVN: r51050
2002-03-19 22:33:06 +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
Benjamin Kosnik 1fa4bed7b5 c_locale_generic.cc: Move to...
2002-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	* c_locale_generic.cc: Move to...
	* generic/c_locale.cc
	* c_locale_generic.h: Move to...
	* generic/c_locale.h
	* codecvt_specializations_generic.h: Move to...
	* generic/codecvt_specializations.h
	* collate_members_generic.cc: Move to...
	* generic/collate_members.cc
	* ctype_members_generic.cc: Move to...
	* generic/ctype_members.cc
	* messages_members_generic.cc: Move to...
	* generic/messages_members.cc
	* messages_members_generic.h: Move to...
	* generic/messages_members.h
	* moneypunct_members_generic.cc: Move to...
	* generic/monetary_members.cc
	* numpunct_members_generic.cc: Move to...
	* generic/numeric_members.cc
	* time_members_generic.cc: Move to...
	* generic/time_members.cc
	* c_locale_gnu.cc: Move to...
	* gnu/c_locale.cc
	* c_locale_gnu.h: Move to...
	* gnu/c_locale.h
	* collate_members_gnu.cc: Move to...
	* gnu/collate_members.cc
	* ctype_members_gnu.cc: Move to...
	* gnu/ctype_members.cc
	* messages_members_gnu.cc: Move to...
	* gnu/messages_members.cc
	* messages_members_gnu.h: Move to...
	* gnu/messages_members.h
	* moneypunct_members_gnu.cc: Move to...
	* gnu/monetary_members.cc
	* numpunct_members_gnu.cc: Move to...
	* gnu/numeric_members.cc
	* time_members_gnu.cc: Move to...
	* gnu/time_members.cc
	* c_locale_ieee_1003.1-200x.cc: Move to...
	* ieee_1003.1-2001/c_locale.cc
	* c_locale_ieee_1003.1-200x.h: Move to...
	* ieee_1003.1-2001/c_locale.h
	* codecvt_specializations_ieee_1003.1-200x.h: Move to...
	* ieee_1003.1-2001/codecvt_specializations.h
	* messages_members_ieee_1003.1-200x.cc: Move to...
	* ieee_1003.1-2001/messages_members.cc
	* messages_members_ieee_1003.1-200x.h: Move to...
	* ieee_1003.1-2001/messages_members.h

	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Make consistent.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* src/Makefile.am (sources): Change to monetary and numeric.
	* src/Makefile.in: Regenerate.
	* docs/html/configopts.html: Update to ieee_1003.1-2001.

From-SVN: r50472
2002-03-09 02:16:36 +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
Phil Edwards 037cfe71e0 user.cfg.in: Also document deprecated entries.
2002-03-06  Phil Edwards  <pme@gcc.gnu.org>

	* docs/doxygen/user.cfg.in:  Also document deprecated entries.
	* docs/html/Makefile:  Example rule to rebuild porting-howto.html.
	* docs/html/17_intro/howto.html:  "gcc"->"GCC" changes, when
	referring to the collection as a whole.  New section on which macros
	can be redefined by the user.
	* docs/html/19_diagnostics/howto.html:  Update note for concepts.
	* docs/html/20_util/howto.html:  Update link to SGI.
	* docs/html/faq/index.html:  Update snapshot versions.  New entry
	on why g++ (but not gcc) must currently predefine certain macros.
	* docs/html/faq/index.txt:  Regenerated.

	* include/bits/basic_string.h (basic_string::_S_construct):  Fix
	names in declaration.
	(basic_string::compare):  These are no longer optional.
	* include/bits/ostream.tcc:  Tweak closing brace placement.
	* include/bits/stl_algo.h:  Lots of initial doxygen comment hooks.
	* include/std/std_sstream.h:  Fix typo in comment.
	* include/bits/locale_facets.tcc:  Remove unneeded header inclusion.
	* src/locale.cc:  Likewise.

From-SVN: r50376
2002-03-06 21:22:56 +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 c7bbe0c45e locale.cc (moneypunct_byname): Remove definitions.
2002-02-15  Benjamin Kosnik  <bkoz@redhat.com>

	* src/locale.cc (moneypunct_byname): Remove definitions.
	* include/std/std_streambuf.h (streambuf::operator=): Return.

From-SVN: r49799
2002-02-16 00:50:58 +00:00
Benjamin Kosnik a32e3c097e Tune for size.
2002-02-15  Benjamin Kosnik  <bkoz@redhat.com>

	Tune for size.
	* src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant
	explicit instantiation.
	(string::_Rep::_S_max_size): Same.
	* include/bits/basic_string.tcc: Add extern explicit
	instantiations for string, wstring.
	* include/bits/basic_ios.tcc: Add extern explicit instantiations
	for ios, wios.
	* include/bits/streambuf.tcc: Same, for streambuf, wstreambuf.
	* include/bits/istream.tcc: Same, for istream, wistream.
	* include/bits/ostream.tcc: Same for ostream, wostream, iostream,
	wiostream.
	* include/bits/sstream.tcc: Same, for stringbuf, wstringbuf,
	istringstream, wistringstream, ostringstream, wostringstream,
	stringstream, wstringstream.
	* include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream,
	wifstream, ofstream, wofstream, fstream, wfstream.
	* src/misc-inst.cc: Correct comments.
	Add iomanip instantiations for wide streams.
	* include/std/std_iomanip.h: Same.
	* include/bits/locale_facets.tcc: Same.

	* include/std/std_streambuf.h: Correct
	_GLIBCPP_FULLY_COMPLIANT_HEADERS guard.
	* include/std/std_sstream.h: Same.
	* include/std/std_ostream.h: Same.
	* include/std/std_istream.h: Same.
	* include/std/std_fstream.h: Same.

	* include/std/std_streambuf.h: Add definitions for private copy
	ctor and assignment operator.
	* include/std/std_istream.h: Remove declared but undefined copy
	ctor and assignment operator. This is taken care of in ios_base,
	so adding it in the derived class as well is superfluous.
	* include/std/std_ostream.h: Same.

	* include/bits/basic_ios.h (basic_ios::clear): Don't inline.
	* include/bits/basic_ios.tcc (basic_ios::clear): Move definition here.

From-SVN: r49798
2002-02-16 00:19:13 +00:00
Benjamin Kosnik 37cea03434 linker-map.gnu: Change tag from GCC_3.1 to GLIBCPP_3.1.
2002-02-14  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu: Change tag from GCC_3.1 to GLIBCPP_3.1.
	Add typeinfo bits. Smooth.
	* aclocal.m4: Regenerate.
	* configure: Same.
	* src/Makefile.in: Same.

From-SVN: r49780
2002-02-15 02:21:33 +00:00
Phil Edwards 530539d9d9 acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): New macro, initial revision.
2002-02-14  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCPP_ENABLE_SYMVERS):  New macro, initial revision.
	* configure.in:  Call it.
	* config/linker-map.gnu:  New file, initial incomplete revision.
	* src/Makefile.am:  Optionally pass version script to the linker.
	* aclocal.m4:  Regenerate.
	* configure:  Regenerate.
	* src/Makefile.in:  Regenerate.

From-SVN: r49770
2002-02-14 18:24:13 +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
Benjamin Kosnik 005326029f stl_algo (__stl_threshold): Declare external.
2002-02-11   Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_algo (__stl_threshold): Declare external.
	(__stl_chunk_size): Same.
	* include/bits/stl_bvector.h (__WORD_BIT): Same.
	* include/bits/stl_tree.h (_S_rb_tree_red): Same.
	(_S_rb_tree_black): Same.
	* src/stl-inst.cc (__stl_threshold): Define.
	(__stl_chunk_size): Same.
	(__WORD_BIT): Same.
	(_S_rb_tree_red): Same.
	(_S_rb_tree_black): Same.

	* config/io/basic_file_libio.h (__basic_file): Add declarations.
	* include/bits/basic_file.h: Remove.
	* config/io/c_io_stdio.h: Remove _GLIBCPP_BASIC_FILE_ENCAPSULATION
	Declare generic types, specialization.
        * config/io/basic_file_stdio.cc: Definitions.
	* config/io/c_io_libio.h: Remove _GLIBCPP_BASIC_FILE_INHERITANCE.
	Declare generic types.
	* include/Makefile.am (bits_headers): Remove basic_file.h.
	(extra_target_headers): Change basic_file_model.h to basic_file.h.
	(stamp-target): Same.

	* include/bits/stl_alloc.h: Tweaks.
	* include/bits/localefwd.h: Same.

From-SVN: r49697
2002-02-12 04:35:58 +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
Andrew Pollard 17325050c2 ios_base.h: Use _Atomic_word for reference counts.
libstdc++/5432
	* include/bits/ios_base.h: Use _Atomic_word for reference counts.
	* include/bits/localefwd.h: Likewise.
	Also use for std::locale:🆔:_S_highwater.
	* src/ios.cc (ios_base::xalloc): Use _Atomic_word.
	* src/locale.cc: Support new usage of _Atomic_word.
	(std::locale::classic): Guard entire function against reentry.
	* src/localename.cc: Support new usage of _Atomic_word.

From-SVN: r49195
2002-01-24 21:14:41 +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
Benjamin Kosnik 54c1bf7801 Makefile.am (std_headers): Remove cXXX from list.
2002-01-04  Benjamin  Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (std_headers): Remove cXXX from list.
	(c_base_srcdir): No bits subdirectory.
	(c_base_builddir): Same.
	(c_base_headers): Adjust names, add ciso646.
	(bits_headers): Remove std_xxx.h headers.
	* include/Makefile.in: Regenerate.

	* include/ext/iterator: Adjust includes.
	* include/ext/ropeimpl.h: Same.
	* include/ext/stl_hash_fun.h: Same.
	* include/ext/algorithm: Same.

	* include/backward/bvector.h: Adjust includes.
	* include/backward/vector.h: Same.
	* include/backward/strstream: Same.
	* include/backward/streambuf.h: Same.
	* include/backward/stack.h: Same.
	* include/backward/set.h: Same.
	* include/backward/queue.h: Same.
	* include/backward/multiset.h: Same.
	* include/backward/multimap.h: Same.
	* include/backward/map.h: Same.
	* include/backward/list.h: Same.
	* include/backward/iterator.h: Same.
	* include/backward/iostream.h: Same.
	* include/backward/iomanip.h: Same.
	* include/backward/fstream.h: Same.
	* include/backward/deque.h: Same.
	* include/backward/complex.h: Same.

	* include/bits/std_algorithm.h: Move to...
	* include/std/algorithm: ...here.
	* include/bits/std_iosfwd.h, std_locale.h, std_stack.h,
	std_bitset.h, std_ios.h, std_map.h, std_stdexcept.h,
	std_complex.h, std_iostream.h, std_memory.h, std_streambuf.h,
	std_deque.h, std_istream.h, std_numeric.h, std_string.h,
	std_fstream.h, std_ostream.h, std_utility.h, std_iterator.h,
	std_queue.h, std_valarray.h, std_functional.h, std_limits.h,
	std_set.h, std_vector.h, std_iomanip.h, std_list.h, std_sstream.h:
	Same.

	* include/c_std/bits/std_cassert.h: Move to...
	* include/c_std/cassert: Here.
	* include/c_std/std_cctype.h, std_cerrno.h, std_cfloat.h,
	std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h,
	std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h,
	std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h,
	std_cwctype.h: Same.
	* include/c_std/cmath: Adjust cmath.tcc include.
	* include/c_std/cstdlib: Adjust includes.
	* include/c_std/cwchar: Same.
	* include/c_std/ctime: Same.
	* include/c_std/cstring: Same.
	* include/c_std/cstdio: Same.
	* include/c_std/bits: Remove directory.

	* include/c/bits/std_cassert.h: Move to...
	* include/c/cassert: Here.
	* include/c/std_cctype.h, std_cerrno.h, std_cfloat.h,
	std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h,
	std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h,
	std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h,
	std_cwctype.h: Same.
	* include/c/bits: Remove directory.

	* include/std/cwctype: Remove.
	* include/std/cwchar: Remove.
	* include/std/ctime: Remove.
	* include/std/cstring: Remove.
	* include/std/cstdlib: Remove.
	* include/std/cstdio: Remove.
	* include/std/cstddef: Remove.
	* include/std/cstdarg: Remove.
	* include/std/csignal: Remove.
	* include/std/csetjmp: Remove.
	* include/std/cmath: Remove.
	* include/std/clocale: Remove.
	* include/std/climits: Remove.
	* include/std/ciso646: Remove.
	* include/std/cfloat: Remove.
	* include/std/cerrno: Remove.
	* include/std/cctype: Remove.
	* include/std/cassert: Remove.

	* include/bits/fpos.h: Adjust includes, removing <bits/std_xxx.h>
	files and subsituting <.xxx>
	* include/bits/valarray_array.h: Same.
	* include/bits/stl_uninitialized.h: Same.
	* include/bits/stl_alloc.h: Same.
	* include/bits/stl_algobase.h: Same.
	* include/bits/sstream.tcc: Same.
	* include/bits/pthread_allocimpl.h: Same.
	* include/bits/ostream.tcc: Same.
	* include/bits/localefwd.h: Same.
	* include/bits/locale_facets.tcc: Same.
	* include/bits/locale_facets.h: Same.
	* include/bits/istream.tcc: Same.
	* include/bits/char_traits.h: Same.
	* include/bits/boost_concept_check.h: Same.
	* include/bits/basic_file.h: Same.
	* include/std/bitset: Same.
	* include/std/complex: Same.
	* include/std/fstream: Same.
	* include/std/functional: Same.
	* include/std/ios: Same.
	* include/std/iostream: Same.
	* include/std/ostream: Same.
	* include/std/sstream: Same.
	* include/std/streambuf: Same.
	* include/std/string: Same.
	* include/std/iterator: Same.
	* include/std/valarray: Same.

	* src/ios.cc: Adjust includes.
	* src/valarray-inst.cc: Same.
	* src/string-inst.cc: Same.
	* src/stl-inst.cc: Same.
	* src/stdexcept.cc: Same.
	* src/misc-inst.cc: Same.
	* src/localename.cc: Same.
	* src/locale-inst.cc: Same.
	* src/locale.cc: Same.
	* src/limits.cc: Same.
	* src/concept-inst.cc: Same.
	* src/complex_io.cc: Same.
	* src/codecvt.cc: Same.
	* src/bitset.cc: Same.
	* src/cmath.cc: Same.

From-SVN: r48544
2002-01-04 21:27:36 +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 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
Jeff Law 415f500c76 * src/locale-inst.cc: Include <bits/std_cstdlib.h>
From-SVN: r48259
2001-12-21 17:39:43 -07: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
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
Benjamin Kosnik bf3b866e31 ctype_inline.h: Remove spaces.
2001-12-11  Benjamin Kosnik  <bkoz@redhat.com>

	* config/os/generic/bits/ctype_inline.h: Remove spaces.
	* config/os/gnu-linux/bits/ctype_noninline.h: Same.
	* include/bits/locale_facets.h (__num_base): Move double data
	members to first in class.
	* include/bits/locale_facets.tcc: Re-arrange, tweak.
	* src/locale.cc: Clean.
	*include/bits/stl_vector.h: Space typedefs.

From-SVN: r47918
2001-12-12 03:22:25 +00:00
Paolo Carlini 78bd50313e basic_string.tcc (_M_replace_safe): New function.
2001-12-10  Paolo Carlini  <pcarlini@unitus.it>
            Nathan Myers  <ncm@cantrip.org>

	* include/bits/basic_string.tcc (_M_replace_safe):  New function.
	(_M_replace(input_iterator_tag), append members):  Use it.
	(_M_replace(forward_iterator_tag)):  Remove.
	* include/bits/basic_string.h:  Adjust declarations.
	* src/string-inst.cc:  Adjust declarations.

From-SVN: r47844
2001-12-10 13:42:01 +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
Phil Edwards d0c250155a globals.cc: Remove __GTHREADS guard.
2001-12-07  Phil Edwards  <pme@gcc.gnu.org>

	* src/globals.cc:  Remove __GTHREADS guard.

From-SVN: r47778
2001-12-07 23:13:23 +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 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 3acc0e7632 string-inst.cc (string::_Rep::_S_terminal): Add static data member instantiations.
2001-12-03  Benjamin Kosnik  <bkoz@redhat.com>

	* src/string-inst.cc (string::_Rep::_S_terminal): Add static data
	member instantiations.

From-SVN: r47586
2001-12-04 01:01:46 +00:00
Steve Ellcey 75940b886e configure.in: Add support for hpux cross compiles...
2001-12-03  Steve Ellcey  <sje@cup.hp.com>

        * libstdc++-v3/configure.in: Add support for hpux cross compiles,
        combine common linux/hpux/generic cross compile support to reduce
        redundent lines.
        * libstdc++-v3/configure: Regenerate.

From-SVN: r47564
2001-12-03 22:28:57 +00:00
Loren J. Rittle bd8fd826dd howto.html: Update commentary.
* docs/html/ext/howto.html: Update commentary.
	* include/bits/c++config: Update threading configuration comment.
	(__STL_GTHREADS): Remove macro definition.
	(__STL_THREADS): Likewise.
	* include/bits/stl_threads.h: Leave only the configuration
	path which had been guarded by __STL_GTHREADS.  Remove all
	guards related to __STL_GTHREADS, __STL_SGI_THREADS,
	__STL_PTHREADS, __STL_UITHREADS and __STL_WIN32THREADS.
	* include/bits/stl_alloc.h: Leave only the configuration path
	which had been guarded by __STL_THREADS.  Remove configuration
	path and guards for __STL_SGI_THREADS.
	(__NODE_ALLOCATOR_THREADS): Remove macro definition.  Unroll its use.
	(__NODE_ALLOCATOR_LOCK): Likewise.
	(__NODE_ALLOCATOR_UNLOCK): Likewise.
	(_NOTHREADS): Remove guards related to macro.
	* include/ext/stl_rope.h: Remove configuration path and guards
	for __STL_SGI_THREADS.
	* src/stl-inst.cc: Remove use of __NODE_ALLOCATOR_THREADS.

From-SVN: r47557
2001-12-03 19:11: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
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
Jason Merrill afb0141fbd vterminate.cc (__verbose_terminate_handler): Add leading underscores.
* src/vterminate.cc (__verbose_terminate_handler): Add leading
        underscores.

From-SVN: r47292
2001-11-23 12:36:43 -05: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
Jason Merrill 74a3070ffa eh_personality.cc (__cxa_call_unexpected): Take void*.
* libsupc++/eh_personality.cc (__cxa_call_unexpected): Take void*.
        * libsupc++/eh_catch.cc (__cxa_begin_catch): Likewise.
        * libsupc++/unwind-cxx.h: Adjust.
        * src/Makefile.am (strstream.o): Pass -Wno-deprecated.

        * libsupc++/eh_type.cc (__cxa_current_exception_type): New file.
        * libsupc++/cxxabi.h: Declare it.
        * libsupc++/Makefile.am (sources): Add it.
        * src/vterminate.cc (verbose_terminate_handler): New file.
        * libsupc++/exception: Declare it.
        * src/Makefile.am (sources): Add it.

        * src/Makefile.am (VPATH): Check the src directory before the top one.

From-SVN: r47132
2001-11-17 21:09:23 -05:00
Phil Edwards 222485455e acconfig.h: Update comments.
2001-11-02  Phil Edwards  <pme@gcc.gnu.org>

	* acconfig.h:  Update comments.
	* acinclude.m4 (GLIBCPP_ENABLE_C99):  Move strtoll, strtoull tests...
	(GLIBCPP_ENABLE_LONG_LONG):  ...to here.  Don't check enable_c99.
	* aclocal.m4:  Regenerate.
	* config.h.in:  Regenerate.
	* configure:  Regenerate.

	* include/bits/boost_concept_check.h:  Unconditionally compile uses
	of 'long long' which require only compiler support, not C lib support.
	* include/bits/cpp_type_traits.h:  Likewise.
	* include/bits/std_limits.h:  Likewise.
	* include/bits/type_traits.h:  Likewise.
	* src/concept-inst.cc:  Likewise.
	* src/limits.cc:  Likewise.
	* include/c_shadow/stdlib.h:  Compile conditionally on _GLIBCPP_USE_C99
	instead of _GLIBCPP_USE_LONG_LONG.
	* include/c_shadow/bits/std_cstdlib.h:  Likewise.

From-SVN: r46723
2001-11-02 22:31:03 +00:00
Phil Edwards 4d16bdbbf6 re PR libstdc++/3666 (Invalid concept-checking code.)
2001-11-01  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4:  Fix spacing.
	(GLIBCPP_ENABLE_CONCEPT_CHECKS):  New macro.
	* configure.in:  Call here.
	* acconfig.h:  Add _GLIBCPP_CONCEPT_CHECKS.
	* include/bits/boost_concept_check.h:  Fix headers.
	(__function_requires):  Make inline.
	* include/bits/c++config (_GLIBCPP_CONCEPT_CHECKS):  Remove.
	* aclocal.m4:  Regenerate.
	* config.h.in:  Regenerate.
	* configure:  Regenerate.

	Move trailing ';' inside macro, PR libstdc++/3666.
	* include/bits/concept_check.h:  Add semicolon.
	* include/bits/stl_algo.h:  Remove semicolon.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_heap.h:  Likewise.
	* include/bits/stl_iterator_base_funcs.h:  Likewise.
	* include/bits/stl_list.h:  Likewise.
	* include/bits/stl_map.h:  Likewise.
	* include/bits/stl_multimap.h:  Likewise.
	* include/bits/stl_multiset.h:  Likewise.
	* include/bits/stl_numeric.h:  Likewise.
	* include/bits/stl_queue.h:  Likewise.
	* include/bits/stl_set.h:  Likewise.
	* include/bits/stl_stack.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.
	* include/ext/hash_map:  Likewise.
	* include/ext/hash_set:  Likewise.
	* include/ext/slist:  Likewise.

	* src/concept-inst.cc:  New file with explicit instantiations.
	* src/Makefile.am (sources):  Add here, with special build rules.
	* src/Makefile.in:  Regenerate.

From-SVN: r46697
2001-11-01 15:46:48 +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 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
Brendan Kehoe 8829f27a76 type_traits.h (__Boolean): Renamed template from _Bool.
2001-10-20  Brendan Kehoe  <brendan@zen.org>

	* include/bits/type_traits.h (__Boolean): Renamed template from _Bool.
	(__true_type, __false_type): Change usage.
	* src/string-inst.cc (__destroy_aux): Change third parm to be
	__false_type instead of _Bool<false>.
	* src/misc-inst.cc (__uninitialized_fill_n_aux,
	__uninitialized_copy_aux): Likewise.

From-SVN: r46387
2001-10-20 19:28:50 +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
Stan Shebs 8ddad08b9e Makefile.am: Remove RCS Id strings.
* include/Makefile.am: Remove RCS Id strings.
        * src/Makefile.am: Ditto.
        * docs/doxygen/run_doxygen: Ditto.
        * docs/html/configopts.html: Ditto.
        * docs/html/documentation.html: Ditto.
        * docs/html/explanations.html: Ditto.
        * docs/html/install.html: Ditto.
        * docs/html/17_intro/howto.html: Ditto.
        * docs/html/18_support/howto.html: Ditto.
        * docs/html/19_diagnostics/howto.html: Ditto.
        * docs/html/20_util/howto.html: Ditto.
        * docs/html/21_strings/howto.html: Ditto.
        * docs/html/22_locale/howto.html: Ditto.
        * docs/html/23_containers/howto.html: Ditto.
        * docs/html/24_iterators/howto.html: Ditto.
        * docs/html/25_algorithms/howto.html: Ditto.
        * docs/html/26_numerics/howto.html: Ditto.
        * docs/html/27_io/howto.html: Ditto.
        * docs/html/ext/howto.html: Ditto.
        * docs/html/ext/sgiexts.html: Ditto.
        * docs/html/faq/index.html: Ditto.
        * docs/html/faq/index.txt: Ditto.

From-SVN: r45836
2001-09-27 00:48:01 +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 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
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
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
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
Gabriel Dos Reis aa2408185d std_limits.h: New file.
2001-08-10  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
            Mark Mitchell     <mark@codesourcery.com>

        * include/bits/std_limits.h: New file.
        * include/Makefile.am (bits_headers): Add std_limits.h
        (all-local): std_limits.h is no longer built.
        (${target_builddir}/std_limits.h): Remove.
        * include/Makefile.in: Regenerate.
        * src/limits.cc: New file.
        * src/Makefile.am (sources): Add limits.cc in replacement of
        limitsMEMBERS.cc.
        * src/Makefile.in: Regenerate.

From-SVN: r44766
2001-08-10 15:47:22 +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 e8406c89d1 Makefile.am (libstdc___la_LDFLAGS): Use -release instead of -version-info, use substituted VERSION info.
2001-08-08  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (libstdc___la_LDFLAGS): Use -release instead of
	-version-info, use substituted VERSION info.
	* src/Makefile.in: Regenerate.

From-SVN: r44730
2001-08-08 22:39:28 +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
Loren J. Rittle 67926e5216 * src/gen-num-limits.cc: Use __LONG_LONG_MAX__.
From-SVN: r44518
2001-07-31 19:33:43 +00:00
Phil Edwards 31bfa17776 backport: basic_string.h: Qualify symbols with 'template'.
2001-07-19  Phil Edwards  <pme@sources.redhat.com>
            Mark Mitchell <mark@codesourcery.com>

	Merge from cp-parser-branch.
	* include/bits/basic_string.h:  Qualify symbols with 'template'.
	* include/bits/basic_string.tcc:  Likewise.
	* include/bits/fstream.tcc:  Likewise.
	* include/bits/istream.tcc:  Likewise.
	* include/bits/sstream.tcc:  Likewise.
	* include/bits/std_istream.h:  Likewise.
	* include/bits/stl_iterator.h:  Likewise.
	* include/bits/streambuf.tcc:  Likewise.
	* src/gen-num-limits.cc:  Add 'template<>' to specializations.
	* src/locale.cc:  Likewise.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r44167
2001-07-20 00:09:31 +00:00
Gabriel Dos Reis b2a4c43c0d gen-num-limits.cc (set_signals_handler): New function.
* src/gen-num-limits.cc (set_signals_handler): New function.
        Factor out signals setting.  Set signal handler for SIGILL.

Co-Authored-By: Bert De Knuydt <Bert.Deknuydt@esat.kuleuven.ac.be>

From-SVN: r44139
2001-07-19 03:06:01 +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
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 1f46fc8e90 localefwd.h: Format.
2001-07-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/localefwd.h: Format.
	* include/bits/locale_facts.tcc (locale::combine): Adjust.
	* src/locale.cc (locale::locale::(_Impl)): Don't call
	_M_add_reference.
	(locale::facet::_M_remove_reference): Simplify.
	* src/globals.cc (locale_impl_c): New. Format.
	(locale_c): New.
	* src/ios.cc (ios_base::Init::Init): Increment _S_ios_base_init last.

From-SVN: r43747
2001-07-04 02:39:02 +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
Loren J. Rittle 861d4e70e8 ios.cc (ios_base::Init::_S_ios_create): Rename __bufsize to __out_bufsize.
libstdc++/2211
	* src/ios.cc (ios_base::Init::_S_ios_create): Rename __bufsize to
	__out_bufsize.  Add __in_bufsize, document it and use it.

From-SVN: r43707
2001-07-02 20:50:40 +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
Phil Edwards 42526146aa algo.h: Add "GPL plus runtime exception" comment block, this time for real.
2001-06-27  Phil Edwards  <pme@sources.redhat.com>

	* include/backward/algo.h:  Add "GPL plus runtime exception" comment
	block, this time for real.
	* include/backward/algobase.h:  Likewise.
	* include/backward/alloc.h:  Likewise.
	* include/backward/bvector.h:  Likewise.
	* include/backward/defalloc.h:  Likewise.
	* include/backward/deque.h:  Likewise.
	* include/backward/function.h:  Likewise.
	* include/backward/hash_map.h:  Likewise.
	* include/backward/hash_set.h:  Likewise.
	* include/backward/hashtable.h:  Likewise.
	* include/backward/heap.h:  Likewise.
	* include/backward/iterator.h:  Likewise.
	* include/backward/list.h:  Likewise.
	* include/backward/map.h:  Likewise.
	* include/backward/multimap.h:  Likewise.
	* include/backward/multiset.h:  Likewise.
	* include/backward/pair.h:  Likewise.
	* include/backward/rope.h:  Likewise.
	* include/backward/set.h:  Likewise.
	* include/backward/slist.h:  Likewise.
	* include/backward/stack.h:  Likewise.
	* include/backward/strstream:  Likewise.
	* include/backward/tempbuf.h:  Likewise.
	* include/backward/tree.h:  Likewise.
	* include/backward/vector.h:  Likewise.
	* include/bits/pthread_allocimpl.h:  Likewise.
	* include/bits/std_algorithm.h:  Likewise.
	* include/bits/std_bitset.h:  Likewise.
	* include/bits/std_deque.h:  Likewise.
	* include/bits/std_functional.h:  Likewise.
	* include/bits/std_iterator.h:  Likewise.
	* include/bits/std_list.h:  Likewise.
	* include/bits/std_map.h:  Likewise.
	* include/bits/std_memory.h:  Likewise.
	* include/bits/std_numeric.h:  Likewise.
	* include/bits/std_queue.h:  Likewise.
	* include/bits/std_set.h:  Likewise.
	* include/bits/std_stack.h:  Likewise.
	* include/bits/std_utility.h:  Likewise.
	* include/bits/std_vector.h:  Likewise.
	* include/bits/stl_algo.h:  Likewise.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_alloc.h:  Likewise.
	* include/bits/stl_bvector.h:  Likewise.
	* include/bits/stl_construct.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_function.h:  Likewise.
	* include/bits/stl_heap.h:  Likewise.
	* include/bits/stl_iterator.h:  Likewise.
	* include/bits/stl_iterator_base_funcs.h:  Likewise.
	* include/bits/stl_iterator_base_types.h:  Likewise.
	* include/bits/stl_list.h:  Likewise.
	* include/bits/stl_map.h:  Likewise.
	* include/bits/stl_multimap.h:  Likewise.
	* include/bits/stl_multiset.h:  Likewise.
	* include/bits/stl_numeric.h:  Likewise.
	* include/bits/stl_pair.h:  Likewise.
	* include/bits/stl_pthread_alloc.h:  Likewise.
	* include/bits/stl_queue.h:  Likewise.
	* include/bits/stl_raw_storage_iter.h:  Likewise.
	* include/bits/stl_relops.h:  Likewise.
	* include/bits/stl_set.h:  Likewise.
	* include/bits/stl_stack.h:  Likewise.
	* include/bits/stl_tempbuf.h:  Likewise.
	* include/bits/stl_threads.h:  Likewise.
	* include/bits/stl_tree.h:  Likewise.
	* include/bits/stl_uninitialized.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.
	* include/bits/type_traits.h:  Likewise.
	* include/ext/hash_map:  Likewise.
	* 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.
	* src/bitset.cc:  Likewise.
	* src/strstream.cc:  Likewise.

From-SVN: r43613
2001-06-27 17:09:53 +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
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
Phil Edwards 41104fd541 *: Revert comment/license change from yesterday for all except libsupc++/unwind-cxx.h.
2001-06-22  Phil Edwards  <pme@sources.redhat.com>

	* include/*:  Revert comment/license change from yesterday for all
	except libsupc++/unwind-cxx.h.
	* src/bitset.cc:  Likewise.
	* src/strstream.cc:  Likewise.

From-SVN: r43513
2001-06-22 19:53:32 +00:00