Commit Graph

447 Commits

Author SHA1 Message Date
Paolo Carlini bda243ec50 Nathan C.
2003-07-14  Paolo Carlini  <pcarlini@unitus.it>
	    Nathan C. Myers  <ncm-nospam@cantrip.org>

	PR libstdc++/11378
	* include/std/std_fstream.h (xsputn): Declare only.
	* include/bits/fstream.tcc (xsputn): Define, optimize for the
	always_noconv() case: when __n is sufficiently large flush
	the buffer and issue a direct write, if possible combining the
	two with writev in __basic_file<>::xsputn_2.
	* config/io/basic_file_stdio.h (__basic_file<>::xsputn_2):
	New, declare.
	* config/io/basic_file_stdio.cc (__basic_file<>::xsputn_2):
	Define.
	* acinclude.m4 (GLIBCXX_CHECK_WRITE): New macro, checking for
	the availability of writev in <sys/uio.h>.
	* configure.in: Call here.
	* acconfig.h: Add undef for the corresponding symbol.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* testsuite/27_io/basic_filebuf/setbuf/char/3.cc: Tweak.

	* include/std/std_fstream.h (sync): Constify a variable.

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

From-SVN: r69341
2003-07-14 18:23:12 +00:00
Gabriel Dos Reis 3ad249b9c7 Include <cstring> and <cstdlib>.
From-SVN: r69329
2003-07-14 13:32:26 +00:00
Mark Mitchell f2ffecb112 c_locale.h: Include <cstdlib> and <cstring>.
* config/locale/generic/c_locale.h: Include <cstdlib> and
	<cstring>.
	* include/bits/boost_concept_check.h: Add this-> to unqualified
	method calls.
	* include/bits/deque.tcc: Likewise.
	* include/bits/locale_facets.h : Likewise.
	* include/bits/ostream.tcc: Likewise.
	* include/bits/stl_algo.h: Likewise.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_tree.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/vector.tcc: Likewise.
	* include/ext/rope: Likewise.
	* include/ext/ropeimpl.h: Likewise.
	* include/ext/stdio_filebuf.h: Likewise.

From-SVN: r69315
2003-07-14 02:52:05 +00:00
Phil Edwards 58579a27aa acinclude.m4 (GLIBCC_ENABLE_SYMVERS): Tweak comments.
2003-07-11  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCC_ENABLE_SYMVERS):  Tweak comments.  Add
	warning messages if the environment cannot support symbol versioning.
	(port_specific_symbol_file):  It's plural, add an 's' on the end.
	* configure.host:  Likewise.
	* src/Makefile.am:  Likewise.
	* config/linker-map.gnu:  Remove one semicolon, heh.
	* scripts/extract_symvers:  Don't assume useful 'export' syntax.
	Set LANG as well as LC_ALL for possibly-broken sort(1)s.
	* aclocal.m4, configure, src/Makefile.in:  Regenerated.

From-SVN: r69212
2003-07-11 04:04:49 +00:00
Gawain Bolton ca1c70118c stl_tree.h: Move larger member functions in _Rb_tree_base_iterator and _Rb_tree_node to...
2003-07-09  Gawain Bolton  <gp.bolton@computer.org>

	* include/bits/stl_tree.h: Move larger member functions in
	_Rb_tree_base_iterator and _Rb_tree_node to...
	* src/stl_tree.cc: Here.
	* src/Makefile.in: Add stl_tree.cc.
	* src/Makefile.in: Regenerated.
	* config/linker-map.gnu: Add symbols here.

From-SVN: r69150
2003-07-09 20:58:32 +00:00
Benjamin Kosnik c094e9b948 numeric_members.cc: Correct type info.
2003-07-08  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/generic/numeric_members.cc: Correct type info.
	* config/locale/gnu/numeric_members.cc: Same.
	* include/bits/locale_facets.h: Same.

	* include/bits/char_traits.h: Correct spacing.

	* src/locale.cc: Wrap to 80 col.

From-SVN: r69098
2003-07-08 20:25:39 +00:00
Phil Edwards e6b7a69ab6 acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Bump minimal version requirement.
2003-07-05  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4 (GLIBCXX_ENABLE_SYMVERS):  Bump minimal version
	requirement.  Add port_specific_symbol_file variable.
	* configure.host:  Add docs for port_specific_symbol_file.
	Clean up try_cpu block for x86.
	* config/linker-map.gnu:  No more "last symbol can't have a
	semicolon" kaka.  Add hook for port-specific symbols.
	* src/Makefile.am:  Remove trailing whitespace.
	(libstdc++-symbol.ver):  Detect the presence of port-specific
	symbols, and add them accordingly.

	* docs/html/17_intro/porting.texi:  Bring up to date.

	* src/Makefile.in, aclocal.m4, configure,
	docs/html/17_intro/porting.html:  Regenerated.

From-SVN: r68992
2003-07-06 04:07:36 +00:00
Benjamin Kosnik 3d7c150e3f Move from CPP to CXX.
2003-07-04  Benjamin Kosnik  <bkoz@redhat.com>

	Move from CPP to CXX.
	* include/bits/c++config: Move to GLIBCXX from GLIBCPP.
	* testsuite/Makefile.am: Same.
	* testsuite/Makefile.in: Regenerate.
	* po/Makefile.am: Same.
	* po/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Same.
	* libsupc++/Makefile.in: Regenerate.
	* libmath/Makefile.am: Same.
	* libmath/Makefile.in: Regenerate.
	* include/Makefile.am: Same.
	* include/Makefile.in: Regenerate.
	* src/Makefile.am: Same.
	* src/Makefile.in: Regenerate.
	* acconfig.h: Same.
	* configure.host: Same.
	* configure.in: Same.
	* configure: Regenerate.
	* acinclude.m4: Same.
	* aclocal.m4: Same.
	* src: Change all files in this directory.
	* testsuite: Same.
	* include: Same, standardize include guards.
	* config: Same.
	* libsupc++: Same.

From-SVN: r68958
2003-07-05 04:05:45 +00:00
Benjamin Kosnik 69ef29fdf6 basic_file_stdio.cc: Revert.
2003-07-04  Benjamin Kosnik  <bkoz@redhat.com>
            Petur Runolfsson  <peturr02@ru.is>

	* config/io/basic_file_stdio.cc: Revert.

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

From-SVN: r68938
2003-07-04 21:24:35 +00:00
Benjamin Kosnik a30335e9c4 Makefile.am: Update target_ to host_.
2003-07-04  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am: Update target_ to host_.
	* include/Makefile.in: Regenerate.
	* src/Makefile.am: Same.
	* src/Makefile.in: Regenerate.

	* config/os/gnu-linux/os_defines.h: Remove glibc-2.0 support.

From-SVN: r68926
2003-07-04 18:10:10 +00:00
Benjamin Kosnik cc5112c92d Makefile.am (target_headers): Add fpos.h
2003-07-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (target_headers): Add fpos.h
	(bits_headers): Remove.
	* include/Makefile.in: Regenerate.
	* configure.in: Add FPOS_INC_SRCDIR, substitute it.
	* configure: Regenerate.
	* configure.host: Add fpos_include_dir.
	* config/os/gnu-linux/fpos.h: New.
	* config/os/generic/fpos.h: Add.
	* include/bits/fpos.h: Remove.

	* config/io/c_io_stdio.h: Remove fpos_t typedef.

	* include/bits/fstream.tcc: Tweaks.
	* include/std/std_fstream.h: Same.

	* testsuite/27_io/fpos/1.cc (test01): Uncomment. Move to...
	* testsuite/27_io/fpos/mbstate_t/1.cc: ...here.
	* testsuite/27_io/fpos/mbstate_t/2.cc: Same.
	* testsuite/27_io/fpos/mbstate_t/3.cc: Same.
	* testsuite/27_io/fpos/1.cc: New.

2003-07-03  Benjamin Kosnik  <bkoz@redhat.com>
	    Petur Runolfsson  <peturr02@ru.is>

	* include/std/std_streambuf.h: Remove _M_pos.
	* config/io/basic_file_stdio.h: Use seekpos instead of seekoff.
	* config/io/basic_file_stdio.cc: Same, use fseek instead of lseek,
	use fread/fwrite instead of read/write.
	* testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc: Fix.
	* testsuite/27_io/basic_filebuf/sputn/char/9339.cc: Close filebufs
	before reading again.
	* testsuite/27_io/objects/char/6.cc: Tweak.

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

From-SVN: r68913
2003-07-04 07:14:54 +00:00
Krister Walfridsson 2e8a523fa7 2003-06-27 Krister Walfridsson <cato@df.lth.se>
* config/os/bsd/netbsd/ctype_noninline.h
	(_C_ctype_): Declare.
	(ctype<char>::classic_table): Return _C_ctype_ + 1.
	(ctype<char>::ctype): Use classic_table.

From-SVN: r68584
2003-06-27 16:59:04 +00:00
Nathan Sidwell 5648db5461 * config/linker-map.gnu: Remove ; after __numpunct_cache.
From-SVN: r68563
2003-06-27 11:01:27 +00:00
Benjamin Kosnik 215f9e283a ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale.
2003-06-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/ios_base.h (ios_base::_M_getloc): Return reference
	to the imbued locale.
	* include/bits/locale_facets.tcc (num_put::_M_convert_int): Use
	_M_getloc.
	(num_put::_M_convert_float): Use.

2003-06-26  Benjamin Kosnik  <bkoz@redhat.com>
	    Jerry Quinn  <jlquinn@optonline.net>

	* config/linker-map.gnu: Add __numpunct_cache.
	* config/locale/gnu/numeric_members.cc
	(numpunct::_M_initialize_numpunct): Account for _M_data, fill in
	all elements for "C" locale.
	(numpunct::~numpunct): Delete _M_data.
	* config/locale/generic/numeric_members.cc: Same.
	* include/bits/basic_ios.tcc
	(basic_ios::init): Remove __locale_cache bits.
	(basic_ios::_M_cache_locale): Same.
	* include/bits/ios_base.h: Same. Tweaks.
	* include/bits/locale_classes.h: Tweaks. Reorder classes.
	(__use_cache): Make friends with _Impl, locale.
	(_Impl::_M_caches): Add.
	(_Impl::_M_install_cache): Add.
	* include/bits/locale_facets.h (__numpunct_cache): New.
	(numpunct): Encapsulate data members in __numpunct_cache member,
	_M_data. Adjust virtuals.
	(numpunct::numpunct): New ctor for the same.
	(__locale_cache_base): Remove.
	(__locale_cache): Remove.
	* include/bits/locale_facets.tcc (__use_cache): New function,
	specializations.
	(num_put::_M_convert_int, _M_convert_float, do_put): Use it.
	* src/globals.cc: Add cache_vec, numpunct_cache_c, numpunct_cache_w.
	* src/ios.cc (ios_base::ios_base): Remove __locale_cache.
	* src/locale-inst.cc: Same. Add __numpunct_cache.
	* src/locale.cc: Tweak inlines.
	(__use_cache): Define specializations.
	* src/localename.cc: Use global bits.
	(_Impl::~Impl): Deal with __numpunct_cache destruction.
	(_Impl::_Impl): Same. Pre-cache standard numpunct facets.
	(_Impl::_M_init_facet): Take into account __numpunct_cache.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Update line numbers.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.

Co-Authored-By: Jerry Quinn <jlquinn@optonline.net>

From-SVN: r68558
2003-06-27 07:25:38 +00:00
Loren J. Rittle 9eb6e1d306 configure.host (freebsd*): Set abi_baseline_pair.
* configure.host (freebsd*): Set abi_baseline_pair.
        * config/abi/i386-freebsd4/baseline_symbols.txt: Update from 3.2
        (at or near first release) to 3.3.
        * config/abi/i386-freebsd5/baseline_symbols.txt: New file.
        * config/abi/alpha-freebsd5/baseline_symbols.txt: New file.
        * config/abi/sparc-freebsd5/baseline_symbols.txt: New file.

From-SVN: r68402
2003-06-24 04:03:30 +00:00
Benjamin Kosnik 0676e9308d scripts: New.
2003-06-17  Benjamin Kosnik  <bkoz@redhat.com>

	* scripts: New.
	* config/abi/extract_symvers: Move to...
	* scripts/extract_symvers: ...here.
	* mkcheck.in: Move to..
	* scripts/check_survey.in: ...here.
	* testsuite_flags.in: Move to..
	* scripts/testsuite_flags.in: ...here.
	* configure.in: Change check and testsuite_flags locations.
	* configure: Regenerate.
	* testsuite/Makefile.am (current_symbols.txt): Change location.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Modify
	location of testsuite_flags.
	* Makefile.am (check-script): Move..
	(check-script-install): Move...
	* testsuite/Makefile.am: ... here.
	* testsuite/Makefile.in: Regenerate.
	* Makefile.in: Regenerate.

From-SVN: r68132
2003-06-18 01:52:08 +00:00
Benjamin Kosnik 82620aaf0b baseline_symbols.txt: Update to 3.3.0.
2003-06-17  Benjamin Kosnik  <bkoz@redhat.com>

	* config/abi/i486-linux-gnu/baseline_symbols.txt: Update to 3.3.0.

From-SVN: r68069
2003-06-17 06:09:55 +00:00
Richard Henderson dc4add82a5 linker-map.gnu: Export virtual function thunks for 64-bit systems too.
* config/linker-map.gnu: Export virtual function thunks for
        64-bit systems too.

From-SVN: r67989
2003-06-15 16:24:00 -07:00
Benjamin Kosnik ef16a2989a i686-pc-linux-gnu: To..
2003-06-13  Benjamin Kosnik  <bkoz@redhat.com>

	* config/abi/i686-pc-linux-gnu: To..
	* config/abi/i486-linux-gnu: ...this.
	* config/abi/alphaev67-unknown-linux-gnu: To..
	* config/abi/alpha-linux-gnu: ...this.
	* config/abi/ia64-unknown-linux-gnu: To...
	* config/abi/ia64-linux-gnu: ...this.
	* config/abi/x86_64-unknown-linux-gnu: To...
	* config/abi/x86_64-linux-gnu: ...this.
	* config/abi/i386-unknown-freebsd4: To...
	* config/abi/i386-freebsd4: ...this.
	* configure.host: abi_baseline_triplet to abi_baseline_pair.
	Simplify cpu bits so that abi_baseline_pair can use the same
	cpu configuration.
	* acinclude.m4: Same.
	* aclocal.m4: Regenerate.
	* configure.in: Can't get enable_abi_check to yes unless native.
	* configure: Regenerate.

From-SVN: r67931
2003-06-14 05:38:04 +00:00
Benjamin Kosnik c37514ff62 allocator-inst.cc: Explicitly instantiate.
2003-06-12  Benjamin Kosnik  <bkoz@redhat.com>

	* src/allocator-inst.cc: Explicitly instantiate.
	* include/ext/pool_allocator.h: Inhibit implicit instantiations.
	Tweaks.
	* config/linker-map.gnu: Add __pool_alloc bits. Tweaks.

From-SVN: r67882
2003-06-13 05:45:57 +00:00
Benjamin Kosnik 58ac1d7f0e acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify.
2003-06-11  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify.
	* aclocal.m4: Regenerate.
	* Makefile.am (SUBDIRS): Remove libio.
	* Makefile.in: Regenerate.
	* configure.in: Same.
	* configure: Regenerate.
	* config/io/basic_file_libio.cc: Remove.
	* config/io/basic_file_libio.h: Remove.
	* config/io/c_io_libio_codecvt.c: Remove.
	* config/io/c_io_libio.h: Remove.
	* libio/*: Remove.
	* src/Makefile.am: Same.
	* src/Makefile.in: Regenerate.
	* docs/html/configopts.html: Edits.
	* docs/html/explanations.html: Edits.

From-SVN: r67813
2003-06-12 03:24:16 +00:00
Benjamin Kosnik 1ff9402d8f [multiple changes]
2003-06-11  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_alloc.h (__debug_alloc): Move out.
	(__malloc_alloc): Same.
	(__pool_alloc): Same.
	(__new_alloc): Same.
	Rename to..
	* include/bits/allocator.h: ...this.
	* include/bits/stl_deque.h: Modify comment.
	* include/bits/stl_tree.h: Modify include.
	* include/std/std_memory.h: Same.
	* include/ext/rope: Same.
	* include/ext/slist: Same.
	* include/std/std_vector.h: Same.
	* include/std/std_stack.h: Same.
	* include/std/std_queue.h: Same.
	* include/std/std_list.h: Same.
	* include/std/std_deque.h: Same.
	* include/backward/alloc.h: Same.
	* include/ext/debug_allocator.h: New.
	* include/ext/malloc_allocator.h: New.
	* include/ext/pool_allocator.h: New.
	* include/ext/new_allocator.h: New.
	* include/bits/pthread_allocimpl.h: Remove.
	* include/bits/stl_pthread_alloc.h: Remove.
	* include/Makefile.am (ext_headers): Add.
	* include/Makefile.in: Regenerate.
	* src/stl-inst.cc: Use __gnu_cxx namespace.
	* src/stl-inst.cc: Move to...
	* src/allocator-inst.cc: Here.
	* src/Makefile.am (sources): Update.
	* src/Makefile.in: Regenerate.
	* config/linker-map.gnu: Remove __pool_alloc bits.
	* testsuite/ext/headers.cc: Add.
	* testsuite/ext/allocators.cc: Fixup.

2003-06-11  Stefan Olsson  <stefan@snon.net>
            Ola R�nnerup  <fnolis@home.se>

	* include/Makefile.am (ext_headers): Add.
	* include/Makefile.in: Regenerate.
	* include/ext/mt_allocator.h: New file.

From-SVN: r67777
2003-06-11 15:52:11 +00:00
Andrew Pinski 159ca3a3a4 re PR libstdc++/9815 (atomicity.h - fails to compile with -O3 -masm=intel)
2003-06-02  Andrew Pinski  <pinskia@physics.uc.edu>

	PR libstdc++/9815
	* config/cpu/i386/atomicity.h (__exchange_and_add): add intel
	asm case to asm.
	* config/cpu/i486/atomicity.h (__exchange_and_add): Likewise.
	(__atomic_add): likewise.

From-SVN: r67343
2003-06-02 18:38:32 +00:00
Richard Kreckel cc9c608f08 re PR libstdc++/11062 (Please avoid __attribute__ ((unused)))
2003-06-02  Richard Kreckel  <Richard.Kreckel@GiNaC.DE>

	PR libstdc++/11062
	* config/cpu/mips/atomicity.h:  Change __attribute__ ((unused)) to
	__attribute__ ((__unused__)).
	* config/os/aix/atomicity.h:  Likewise.

From-SVN: r67340
2003-06-02 18:03:23 +00:00
Steve Ellcey ed0d100f7c os_defines.h: Define _LIBUNWIND_STD_ABI if we are on IA64 HP-UX.
* config/os/hpux/os_defines.h: Define _LIBUNWIND_STD_ABI if we are
	on IA64 HP-UX.
	* libsupc++/eh_throw.cc: Don't call _Unwind_Resume_or_Rethrow if
	_LIBUNWIND_STD_ABI is set.

From-SVN: r67193
2003-05-27 21:45:48 +00:00
Danny Smith 81888fcd42 gthr-win32.h (__GTHREAD_HIDE_WIN32API): Test for non-zero value, not just if defined.
* gthr-win32.h (__GTHREAD_HIDE_WIN32API): Test for non-zero
	value, not just if defined.

	* libstdc++-v3/config/os/mingw32/os_defines.h (__GTHREAD_HIDE_WIN32API):
	Define to 1 by defualt.
	(NOMINMAX): Define.

From-SVN: r67069
2003-05-21 22:16:08 +00:00
Benjamin Kosnik 51ff814940 [multiple changes]
2003-05-10  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/9027
	PR libstdc++/9520
	PR libstdc++/10096
	* include/bits/fstream.tcc (basic_file::_M_underflow):  Add generic
	implementation, based on old wchar_t specialization, add support
	for codecvt::in() return value of codecvt_base::noconv, remove
	_M_file.sys_ungetc() call.
	* include/std/std_fstream.h (basic_file::underflow,
	basic_file::uflow, basic_file::_M_underflow):  Remove
	specialization declarations, call _M_underflow from generic versions
	of underflow and uflow.
	* src/fstream.cc (basic_file::underflow, basic_file::uflow,
	basic_file::_M_underflow):  Remove specializations.
	* src/Makefile.am (sources):  Remove fstream.cc.
	* src/Makefile.in:  Regenerated.
	* testsuite/27_io/basic_filebuf/underflow/10096.cc:  New test.
	* testsuite/27_io/basic_filebuf/underflow/char/1.cc:  New test.
	* testsuite/27_io/basic_filebuf/underflow/char/9027.cc:  New test.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc:  New test.

2003-05-10  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/stdio_filebuf.h (__stdio_filebuf): Remove stack
	buffer.
	* config/io/basic_file_stdio.h (__basic_file::xsgetn): Remove
	unbuffered bits.
	(__basic_file::xsputn): Same.
	(__basic_file::seekoff): Same.
	(__basic_file::seekpos): Same.
	(__basic_file::showmanyc): Same.
	* config/io/basic_file_stdio.cc: Same.
	* include/std/std_fstream.h: Same.
	* include/bits/fstream.tcc: Same.
	* src/fstream.cc: Same.
	* testsuite/27_io/basic_filebuf/sgetn/char/1.cc (test05): Tidy.

2003-05-10  Petur Runolfsson  <peturr02@ru.is>

	PR libstdc++/9520
	PR libstdc++/9661
	PR libstdc++/9662
	* include/ext/stdio_sync_filebuf.h:  New file.
	(basic_stdiobuf):  New.
	* include/Makefile.am (ext_headers): Add ext/stdio_sync_filebuf.h
	* include/Makefile.in: Regenerate.
	* include/bits/ios_base.h (Init::_S_create_buffers,
	Init::_S_destroy_buffers):  Remove declarations.
	* src/globals.cc (buf_cout_sync, buf_cin_sync, buf_cerr_sync,
	buf_wcout_sync, buf_wcin_sync, buf_wcerr_sync):  Define.
	* src/ios.cc (Init::_S_create_buffers,
	Init::_S_destroy_buffers):  Remove.
	(Init::Init):  Create and use syncronized buffers.
	(ios_base::sync_with_stdio):  Destroy syncronized buffers,
	create and install unsyncronized buffers.
	* testsuite/27_io/objects/char/10.cc:  New test.
	* testsuite/27_io/objects/char/9.cc:  New test.
	* testsuite/27_io/objects/char/9661-1.cc:  New test.
	* testsuite/27_io/objects/char/9661-2_xin.cc:  New test.
	* testsuite/27_io/objects/char/9661-2_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/1.cc:  New test.
	* testsuite/27_io/objects/wchar_t/10.cc:  New test.
	* testsuite/27_io/objects/wchar_t/2.cc:  New test.
	* testsuite/27_io/objects/wchar_t/2523-1_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/2523-1_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/2523-2_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/2523-2_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/3045.cc:  New test.
	* testsuite/27_io/objects/wchar_t/3647.cc:  New test.
	* testsuite/27_io/objects/wchar_t/3_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/3_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/4_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/4_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/5.cc:  New test.
	* testsuite/27_io/objects/wchar_t/5268.cc:  New test.
	* testsuite/27_io/objects/wchar_t/5280_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/5280_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/6.cc:  New test.
	* testsuite/27_io/objects/wchar_t/6548_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/6548_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/6648-1_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/6648-1_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/6648-2_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/6648-2_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/7.cc:  New test.
	* testsuite/27_io/objects/wchar_t/7744_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/7744_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/8.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/9520.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9661-1.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9661-2_xin.cc:  New test.
	* testsuite/27_io/objects/wchar_t/9661-2_xin.in:  New.
	* testsuite/27_io/objects/wchar_t/9662.cc:  New test.
	* testsuite/ext/stdiobuf_char.cc:  New test.
	* testsuite/ext/stdiobuf_wchar_t.cc:  New test.

From-SVN: r66678
2003-05-11 04:20:57 +00:00
Joel Sherrill 51dc3d74f8 atomicity.h: New file.
2003-04-29 Joel Sherrill  <joel.sherrill@OARcorp.com>
	   Loren J. Rittle <ljrittle@acm.org>
	   Martin v. Loewis  <martin@v.loewis.de>

	* config/cpu/i386/atomicity.h: New file.

Co-Authored-By: Loren J. Rittle <ljrittle@acm.org>
Co-Authored-By: Martin v. Loewis <martin@v.loewis.de>

From-SVN: r66261
2003-04-29 21:57:39 +00:00
Benjamin Kosnik 988ad90d00 localename.cc: Standardize exception strings.
2003-04-28  Benjamin Kosnik  <bkoz@redhat.com>

	* src/localename.cc: Standardize exception strings.
	* src/locale.cc: Same.
	* src/ios.cc: Same.
	* include/bits/basic_string.tcc: Same.
	* include/bits/basic_ios.tcc: Same.
	* include/std/std_bitset.h: Same.
	* include/ext/ropeimpl.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/stl_bvector.h: Same.
	* config/locale/generic/c_locale.cc: Same.
	* config/locale/gnu/c_locale.cc: Same.
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h: Same.

	* testsuite/testsuite_hooks.cc (__gnu_cxx_test): Modify.

From-SVN: r66192
2003-04-28 23:05:57 +00:00
Benjamin Kosnik 73c4dcc675 locale_classes.h (locale::_Impl): Change _M_names from fixed size array.
2003-04-27  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_classes.h (locale::_Impl): Change _M_names
	from fixed size array.
	(locale): Change _S_categories as well.
	Formatting tweaks.
	* include/bits/locale_facets.tcc: Tweak.
	* config/locale/gnu/c_locale.cc: Assign _S_categories.
	* config/locale/generic/c_locale.cc: Same.
	* src/locale.cc: Tweak.
	* src/globals.cc: Change facet_name to name_vec, add names_c.
	* src/localename.cc: Use them.
	(locale::_Impl::~_Impl): Destroy _M_names.
	(locale::_Impl::_Impl): Create _M_names.

From-SVN: r66147
2003-04-28 03:41:49 +00:00
Andreas Schwab 691d089679 * config/locale/ieee_1003.1-2001/codecvt_specializations.h
(__enc_traits): Use __ibom and __ebom instead of ignoring them.

From-SVN: r66136
2003-04-27 19:51:25 +00:00
Benjamin Kosnik 89e9920bd6 2003-04-25 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/locale_classes.h
	(locale::_S_extra_categories_size): Remove.
	* src/locale.cc: Remove _S_extra_categories_size.
	* src/localename.cc: Same.
	* config/locale/gnu/c_locale.cc: Same.
	* config/locale/generic/c_locale.cc: Same.

From-SVN: r66068
2003-04-25 17:23:21 +00:00
Benjamin Kosnik 40a22d93c6 c_locale.h (__convert_from_v): Use attribute unused.
2003-04-23  Benjamin Kosnik  <bkoz@belmont.constant.com>

	* config/locale/generic/c_locale.h (__convert_from_v): Use
	attribute unused.

From-SVN: r66009
2003-04-23 19:30:33 +00:00
Loren J. Rittle 9c59483708 porting.texi (_GLIBCPP_USE_C99_CHECK): New macro.
* docs/html/17_intro/porting.texi (_GLIBCPP_USE_C99_CHECK): New macro.
	(_GLIBCPP_USE_C99_DYNAMIC): New macro.
	(_GLIBCPP_USE_C99_LONG_LONG_CHECK): New macro.
	(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC): New macro.
	* config/os/bsd/freebsd/os_defines.h (_GLIBCPP_USE_C99_CHECK):
	New macro.
	(_GLIBCPP_USE_C99_DYNAMIC): New macro.
	(_GLIBCPP_USE_C99_LONG_LONG_CHECK): New macro.
	(_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC): New macro.
	* include/c_std/std_cstdlib.h: Use new macros.
	* include/c_std/std_cstdio.h: Use new macros.
	* include/c_std/std_cwchar.h: Use new macros.

From-SVN: r65778
2003-04-18 09:53:58 +00:00
Loren J. Rittle b39d035918 std_cmath.h (__gnu_cx::__c99_binding): New namespace.
libstdc++/7680
	* include/c_std/std_cmath.h (__gnu_cx::__c99_binding): New namespace.
	Populate it with multiple legal ways to obtain the C99 float
	transcendentals.  Use them instead of direct global reference.
	(C99 FP capture): Guard usage with _GLIBCPP_USE_C99_FP_MACROS_DYNAMIC.
	* docs/html/17_intro/porting.texi
	(_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK): New macro.
	(_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC): New macro.
	(_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC): New macro.
	* config/os/bsd/freebsd/os_defines.h
	(_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK): New macro.
	(_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC): New macro.
	* testsuite/26_numerics/c_math_dynamic.cc: New file.

From-SVN: r65624
2003-04-15 07:27:55 +00:00
Benjamin Kosnik 3d838e28dd [multiple changes]
2003-04-14  Andreas Tobler  <toa@pop.agri.ch>
 	    Benjamin Kosnik  <bkoz@redhat.com>

	* config/os/generic/ctype_inline.h: Fix.

2003-04-14  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_hooks.h
	(__gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher):
	Change to run_named_locale_test.
	* testsuite/testsuite_hooks.cc (__gnu_cxx_test): Same.

	* testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: Use
	run_test_named_locale.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/encoding/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/encoding/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/encoding/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/7.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/8.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/9.cc: Same.
	* testsuite/22_locale/codecvt/length/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/length/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/length/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/length/wchar_t/7.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/out/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/out/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/out/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/out/wchar_t/7.cc: Same.
	* testsuite/22_locale/codecvt/unshift/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/unshift/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/unshift/wchar_t/4.cc: Same.
	* testsuite/22_locale/collate/compare/char/1.cc: Same.
	* testsuite/22_locale/collate/compare/char/2.cc: Same.
	* testsuite/22_locale/collate/compare/char/3.cc: Same.
	* testsuite/22_locale/collate/compare/wchar_t/1.cc: Same.
	* testsuite/22_locale/collate/compare/wchar_t/2.cc: Same.
	* testsuite/22_locale/collate/compare/wchar_t/3.cc: Same.
	* testsuite/22_locale/collate/hash/char/2.cc: Same.
	* testsuite/22_locale/collate/hash/wchar_t/2.cc: Same.
	* testsuite/22_locale/collate/transform/char/2.cc: Same.
	* testsuite/22_locale/collate/transform/char/3.cc: Same.
	* testsuite/22_locale/collate/transform/wchar_t/2.cc: Same.
	* testsuite/22_locale/collate/transform/wchar_t/3.cc: Same.
	* testsuite/22_locale/collate_byname/1.cc: Same.
	* testsuite/22_locale/ctype/is/char/2.cc: Same.
	* testsuite/22_locale/ctype/is/wchar_t/2.cc: Same.
	* testsuite/22_locale/ctype/narrow/wchar_t/3.cc: Same.
	* testsuite/22_locale/ctype/widen/wchar_t/2.cc: Same.
	* testsuite/22_locale/ctype/widen/wchar_t/3.cc: Same.
	* testsuite/22_locale/facet/2.cc: Same.
	* testsuite/22_locale/locale/cons/2.cc: Same.
	* testsuite/22_locale/locale/cons/4.cc: Same.
	* testsuite/22_locale/locale/cons/5.cc: Same.
	* testsuite/22_locale/locale/cons/7.cc: Same.
	* testsuite/22_locale/locale/cons/7222-c.cc: Same.
	* testsuite/22_locale/locale/cons/7222-env.cc: Same.
	* testsuite/22_locale/locale/global_locale_objects/2.cc: Same.
	* testsuite/22_locale/messages/members/char/1.cc: Same.
	* testsuite/22_locale/messages/members/char/2.cc: Same.
	* testsuite/22_locale/messages/members/char/3.cc: Same.
	* testsuite/22_locale/messages_byname/1.cc: Same.
	* testsuite/22_locale/money_get/get/char/1.cc: Same.
	* testsuite/22_locale/money_get/get/char/2.cc: Same.
	* testsuite/22_locale/money_get/get/char/3.cc: Same.
	* testsuite/22_locale/money_get/get/char/4.cc: Same.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Same.
	* testsuite/22_locale/money_get/get/wchar_t/2.cc: Same.
	* testsuite/22_locale/money_get/get/wchar_t/3.cc: Same.
	* testsuite/22_locale/money_get/get/wchar_t/4.cc: Same.
	* testsuite/22_locale/money_put/put/char/1.cc: Same.
	* testsuite/22_locale/money_put/put/char/2.cc: Same.
	* testsuite/22_locale/money_put/put/char/3.cc: Same.
	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Same.
	* testsuite/22_locale/money_put/put/wchar_t/2.cc: Same.
	* testsuite/22_locale/money_put/put/wchar_t/3.cc: Same.
	* testsuite/22_locale/moneypunct/members/char/2.cc: Same.
	* testsuite/22_locale/moneypunct/members/wchar_t/2.cc: Same.
	* testsuite/22_locale/moneypunct_byname/1.cc: Same.
	* testsuite/22_locale/num_get/get/char/1.cc: Same.
	* testsuite/22_locale/num_get/get/char/2.cc: Same.
	* testsuite/22_locale/num_get/get/char/3.cc: Same.
	* testsuite/22_locale/num_get/get/char/5.cc: Same.
	* testsuite/22_locale/num_get/get/char/6.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/1.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/2.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/3.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/5.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/6.cc: Same.
	* testsuite/22_locale/num_put/put/char/1.cc: Same.
	* testsuite/22_locale/num_put/put/char/2.cc: Same.
	* testsuite/22_locale/num_put/put/char/3.cc: Same.
	* testsuite/22_locale/num_put/put/char/5.cc: Same.
	* testsuite/22_locale/num_put/put/wchar_t/1.cc: Same.
	* testsuite/22_locale/num_put/put/wchar_t/2.cc: Same.
	* testsuite/22_locale/num_put/put/wchar_t/3.cc: Same.
	* testsuite/22_locale/num_put/put/wchar_t/5.cc: Same.
	* testsuite/22_locale/numpunct/members/char/1.cc: Same.
	* testsuite/22_locale/numpunct/members/char/2.cc: Same.
	* testsuite/22_locale/numpunct/members/wchar_t/1.cc: Same.
	* testsuite/22_locale/numpunct/members/wchar_t/2.cc: Same.
	* testsuite/22_locale/numpunct_byname/1.cc: Same.
	* testsuite/22_locale/numpunct_byname/2.cc: Same.
	* testsuite/22_locale/time_get/date_order/char/1.cc: Same.
	* testsuite/22_locale/time_get/date_order/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_date/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_date/char/2.cc: Same.
	* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_get/get_monthname/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_monthname/char/2.cc: Same.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_get/get_time/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_time/char/2.cc: Same.
	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_get/get_weekday/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_weekday/char/2.cc: Same.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_get/get_year/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_put/put/char/1.cc: Same.
	* testsuite/22_locale/time_put/put/char/2.cc: Same.
	* testsuite/22_locale/time_put/put/char/3.cc: Same.
	* testsuite/22_locale/time_put/put/char/4.cc: Same.
	* testsuite/22_locale/time_put/put/char/5.cc: Same.
	* testsuite/22_locale/time_put/put/char/6.cc: Same.
	* testsuite/22_locale/time_put/put/char/7.cc: Same.
	* testsuite/22_locale/time_put/put/char/8.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/3.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/4.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/5.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/6.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/7.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/8.cc: Same.
	* testsuite/27_io/basic_filebuf/imbue/char/9322.cc: Same.
	* testsuite/27_io/basic_ios/copyfmt/char/2.cc: Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc: Same.
	* testsuite/27_io/basic_streambuf/imbue/char/9322.cc: Same.
	* testsuite/27_io/basic_stringbuf/imbue/char/9322.cc: Same.

2003-04-14  Andreas Tobler  <toa@pop.agri.ch>

	* configure.target (_cpu_incdir_fullpath): Solaris 2.9 uses
	solaris includes, not generic.

From-SVN: r65622
2003-04-15 06:36:31 +00:00
John David Anglin 26af0e5d07 * os/hpux/ctype_inline.h: Replace with gnu-linux version.
From-SVN: r65542
2003-04-13 03:56:20 +00:00
John David Anglin e6670c79c7 basic_file_stdio.cc (__basic_file<char>::close): Don't flush stream twice.
* basic_file_stdio.cc (__basic_file<char>::close): Don't flush stream
	twice.  Always set _M_cfile to 0 when stream was open.

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

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

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

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

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

From-SVN: r64837
2003-03-25 01:53:13 +00:00
Loren J. Rittle ff81da238f ctype_noninline.h (ctype<char>::classic_table): Correct return value.
* config/os/hpux/ctype_noninline.h (ctype<char>::classic_table):
	Correct return value.

From-SVN: r64724
2003-03-22 18:55:40 +00:00
Alexandre Oliva 951312c819 atomicity.h (__exchange_and_add, [...]): Only .set mips2 for the o32 ABI.
* config/cpu/mips/atomicity.h (__exchange_and_add, __atomic_add):
Only .set mips2 for the o32 ABI.

From-SVN: r64604
2003-03-20 02:30:42 +00:00
Benjamin Kosnik ac1613a2c2 [multiple changes]
2003-03-14  Benjamin Kosnik  <bkoz@redhat.com>

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

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

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

From-SVN: r64391
2003-03-15 04:53:52 +00:00
Loren J. Rittle b0649028b4 ctype_inline.h: Support _M_table when so installed.
* config/os/bsd/freebsd/ctype_inline.h:  Support _M_table
	when so installed.
	* testsuite/22_locale/ctype/cons/char/1.cc: Fix typo.

From-SVN: r64163
2003-03-11 07:07:25 +00:00
Paolo Carlini f5d9895a06 basic_file_stdio.cc: include <unistd.h>.
2003-03-09  Paolo Carlini  <pcarlini@unitus.it>

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

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

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

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

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

From-SVN: r63975
2003-03-08 08:55:54 +00:00
Benjamin Kosnik 4e7a2c6f9a globals.cc: Clarify comments, remove c_locale_imp_compat.
2003-03-04  Benjamin Kosnik  <bkoz@redhat.com>

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

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

From-SVN: r63826
2003-03-05 06:02:15 +00:00
Benjamin Kosnik fd4290d6c7 abi_check.cc (report_symbol_info): Add version info.
2003-03-03  Benjamin Kosnik  <bkoz@redhat.com>

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

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

From-SVN: r63765
2003-03-04 05:51:50 +00:00
Benjamin Kosnik 3a15abf155 abi_check.cc (report_symbol_info): Add version info.
2003-03-03  Benjamin Kosnik  <bkoz@redhat.com>

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

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

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

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

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

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

From-SVN: r63169
2003-02-20 16:47:39 +00:00
Phil Edwards 8d55a4aa3b atomicity.h (_Atomic_add_mutex): Fix declaration.
2003-02-12  Phil Edwards  <pme@gcc.gnu.org>

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

From-SVN: r62818
2003-02-13 04:02:20 +00:00
John David Anglin 5053bdf834 atomicity.h (__Atomicity_lock<__inst>::_S_atomicity_lock): Correct alignment.
* hppa/atomicity.h (__Atomicity_lock<__inst>::_S_atomicity_lock):
	Correct alignment.
	(__exchange_and_add, __atomic_add): Use PA 2.0 ordered store to reset
	lock.

From-SVN: r62593
2003-02-09 03:23:13 +00:00
Peter Soetens 6eeabb09a6 basic_file_libio.h: Fixups.
2003-02-06  Peter Soetens  <peter.soetens@mech.kuleuven.ac.be>

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

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

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

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

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

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

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

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

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

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

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

From-SVN: r62408
2003-02-04 22:42:32 +00:00
Falk Hueffner 348b0c3105 std_bitset.h: Replace CHAR_BIT with __CHAR_BIT__, use numeric_limits for bits-per-word values.
2003-02-03  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
            Phil Edwards  <pme@gcc.gnu.org>

	* include/std/std_bitset.h:  Replace CHAR_BIT with __CHAR_BIT__, use
	numeric_limits for bits-per-word values.
	(_Base_bitset::_M_do_count, _Base_bitset<1>::_M_do_count):
	Use __builtin_popcountl instead.
	(_Base_bitset::_M_do_find_first, _Base_bitset::_M_do_find_next,
	_Base_bitset<1>::_M_do_find_first, _Base_bitset<1>::_M_do_find_next):
	Use __builtin_ctzl instead.
	(_S_bit_count, _S_first_one):  Remove.
	* config/linker-map.gnu (GLIBCPP_3.4):  Remove std::_S_bit_count.
	* src/Makefile.am (sources):  Remove bitset.cc.
	* src/bitset.cc:  Delete file.
	* src/Makefile.in:  Regenerate.

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

From-SVN: r62335
2003-02-03 19:37:53 +00:00
Andreas Schwab 475c1d0989 * config/linker-map.gnu: Fix for size_t variance.
From-SVN: r61713
2003-01-24 17:01:25 +00:00
Benjamin Kosnik 1a1e79bbfe Revert include ordering.
2003-01-23  Benjamin Kosnik  <bkoz@redhat.com>

	Revert include ordering.
	* config/locale/generic/c_locale.h: Add include guards.
	* config/locale/gnu/c_locale.h: Same.
	* include/bits/locale_classes.h: Remove cctype include.
	* include/std/std_iosfwd.h: Add c++locale.h, cctype includes.
	* include/std/std_fstream.h: Remove streambuf include.
	* include/std/std_sstream.h: Remove streambuf include.

From-SVN: r61664
2003-01-23 18:56:00 +00:00
Benjamin Kosnik 8099b2aee8 configure.in (libtool_VERSION): To 6:0:0.
2003-01-23  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.in (libtool_VERSION): To 6:0:0.
	* configure: Regenerated.
	* config/linker-map.gnu: Clean.

	* src/misc-inst.cc: Remove instantiations.

	* include/bits/stl_alloc.h (__malloc_alloc_template):
	To __malloc_alloc.
	(__default_alloc_template): To __pool_alloc.
	* src/stl-inst.cc: Same.
	* include/backward/alloc.h: Update.
	* testsuite/ext/allocators.cc: Update.

	* src/globals.cc (__gnu_cxx): Remove _GLIBCPP_ASM_SYMVER. Should
	really try to remove these if possible.
	* src/locale.cc (std): Same.

	* testsuite/abi_check.cc (check_version): Add.

From-SVN: r61658
2003-01-23 17:21:11 +00:00
Benjamin Kosnik e66868131b locale_facets.h: Move non-facet classes requiring <string> to...
2003-01-22  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h: Move non-facet classes requiring
	<string> to...
	* include/bits/locale_classes.h: New.
	* include/bits/Makefile.am (bits_headers_src): Add locale_classes.h.
	* include/bits/Makefile.in: Regenerate.

	* include/bits/locale_facets.tcc (__convert_from_v): Move to...
	* config/locale/gnu/c_locale.h: ...here.
	* config/locale/generic/c_locale.h: Same.

	* include/bits/locale_facets.tcc: Move declarations to...
	* include/bits/locale_facets.h: ...here.
	* include/bits/basic_ios.h: Tweak includes accordingly.
	* include/std/std_sstream.h: Add streambuf include.
	* include/std/std_fstream.h: Ditto.
	* include/std/std_locale.h: Add locale_classes.h include.
	* include/std/std_iosfwd.h: Tweak.
	* src/concept-inst.cc: Add iterator include.

	* config/linker-map.gnu: Specify __cxa functions, mark __cxa_dyn_*
	bits as unexported in the future.

From-SVN: r61593
2003-01-22 16:51:52 +00:00
Jeffrey D. Oldham ca2ceadd31 * config/locale/generic/messages_members.h
(messages_byname<_CharT>::messages_byname): Use this-> to refer to
	unqualified members of base clasess.

From-SVN: r61416
2003-01-17 01:20:08 +00:00
Mark Mitchell 8fbc5ae723 cp-tree.h (lang_type_class): Remove is_partial_instantiation.
* cp-tree.h (lang_type_class): Remove is_partial_instantiation.
	(PARTIAL_INSTANTIATION_P): Remove.
	(IMPLICIT_TYPENAME_P): Likewise.
	(IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
	(build_typename_type): Remove declaration.
	(parmlist_is_exprlist): Likewise.
	* decl.c (build_typename_type): Make it static, remove third
	parameter.
	(push_class_binding): Don't do implicit typename stuff.
	(make_typename_type): Likewise.
	(lookup_name_real): Likewise.
	(grokdeclarator): Don't try to convert declarations into
	initializations.  Don't do implicit typename stuff.
	(parmlist_is_exprlist): Remove.
	(xref_basetypes): Simplify.
	* decl2.c (grokfield): Don't try to convert declarations into
	initializations.
	(build_anon_union_vars): Do this while processing templates, too.
	(finish_anon_union): Likewise.
	* error.c (dump_type): Remove implicit typename handling.
	* parser.c (cp_parser_diagnose_invalid_type_name): New method.
	(cp_parser_primary_expression): Correct handling of names not
	found by unqualified name lookup in templates.
	(cp_parser_nested_name_specifier_opt): Avoid checking dependency
	of types when possible.
	(cp_parser_simple_declaration): Complain intelligently about some
	invalid declarations.
	(cp_parser_member_declaration): Likewise.
	(cp_parser_constructor_declarator_p): Don't check when we're in a
	function scope.
	* pt.c (instantiate_class_template): Remove
	PARTIAL_INSTANTIATION_P gunk.
	* search.c (lookup_field_r): Don't build implicit typenames.
	(marked_pushdecls_p): Don't enter dependent base types.
	(unmarked_pushdecls_p): Likewise.
	* semantics.c (begin_class_definition): Remove implicit typename
	stuff.

	* config/locale/gnu/messages_members.h: Use this-> to refer to
	unqualified members of base clasess.
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h: Likewise.
	* include/bits/codecvt.h: Likewise.
	* include/bits/deque.tcc: Likewise.
	* include/bits/fstream.tcc: Likewise.
	* include/bits/istream.tcc: Likewise.
	* include/bits/list.tcc: Likewise.
	* include/bits/locale_facets.h: Likewise.
	* include/bits/ostream.tcc: Likewise.
	* include/bits/sstream.tcc: Likewise.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_tree.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/vector.tcc: Likewise.
	* include/ext/ropeimpl.h: Likewise.
	* include/ext/stdio_filebuf.h: Likewise.
	* include/ext/stl_rope.h: Likewise.
	* include/std/std_fstream.h: Likewise.
	* include/std/std_sstream.h: Likewise.

Co-Authored-By: Jeffrey Oldham <oldham@codesourcery.com>

From-SVN: r61403
2003-01-16 20:30:50 +00:00
John David Anglin 4af6a06372 som.h (SUPPORTS_WEAK, [...]): Define.
* som.h (SUPPORTS_WEAK, SUPPORTS_ONE_ONLY, MAKE_DECL_ONE_ONLY,
	ASM_WEAKEN_LABEL, GTHREAD_USE_WEAK): Define.
	* pa.h (TARGET_SOM_SDEF): Define.
	* pa-hpux11.h (TARGET_SOM_SDEF): Define.
	* config/os/hpux/os_defines.h (_GLIBCPP_GTHREAD_USE_WEAK): Define for
	__hppa__.

From-SVN: r61372
2003-01-16 00:34:45 +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
Jason Merrill e55393db34 atomicity.h (__exchange_and_add, [...]): *__mem is also an output.
* config/cpu/i486/atomicity.h (__exchange_and_add, __atomic_add):
        *__mem is also an output.
        * config/cpu/m68k/atomicity.h (__exchange_and_add): Likewise.

From-SVN: r60807
2003-01-02 17:48:21 -05: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
Danny Smith 2ae1162e06 basic_file_stdio.cc (__basic_file::_M_open_mode): Don't use O_NONBLOCK if it is not defined.
* config/io/basic_file_stdio.cc (__basic_file::_M_open_mode):
	Don't use O_NONBLOCK if it is not defined.
	(__basic_file::open): Don't use fcntl either.

From-SVN: r60461
2002-12-24 02:48:19 +00: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 a625dfab90 re PR libstdc++/8887 (locale)
2002-12-11  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/8887
	* config/locale/generic/time_members.cc
	(__timepunct<char>::_M_initialize_timepunct): Fix typos
	in _M_date_format and _M_date_era_format string literals.

From-SVN: r60050
2002-12-12 00:22:58 +00:00
Paolo Carlini 0e9501e6b1 c_locale.cc (locale::_S_categories): Reorder the categories to match that of glibc's setlocale(LC_ALL, ""))
2002-11-28  Paolo Carlini  <pcarlini@unitus.it>

	* config/locale/gnu/c_locale.cc (locale::_S_categories):
	Reorder the categories to match that of glibc's setlocale(LC_ALL, ""))
	* config/locale/generic/c_locale.cc (locale::_S_categories): Ditto.
	* testsuite/22_locale/ctor_copy_dtor.cc (test04): Tweak.

From-SVN: r59604
2002-11-28 12:25:32 +00:00
Benjamin Kosnik 8ecab601c3 abi_check.cc: Add CXXABI_1.2.1 as compatible.
2002-11-25  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/abi_check.cc: Add CXXABI_1.2.1 as compatible.
	* config/linker-map.gnu: Version __cxa_guard_acquire,
	__cxa_guard_release, __cxa_guard_abort in CXXABI_1.2.1.

From-SVN: r59487
2002-11-26 01:37:50 +00:00
Jakub Jelinek bd3175a2cc linker-map.gnu: Export _S_construct even if size_t is unsigned long.
* config/linker-map.gnu: Export _S_construct even if size_t is
	unsigned long.  Collapse std::codecvt<char>::codecvt(size_t)
	and std::codecvt<wchar_t>::codecvt(size_t) into one export pattern.

From-SVN: r59182
2002-11-17 06:08:23 +01:00
John David Anglin b6ef3ef68f os_defines.h (_GLIBCPP_INST_ATOMICITY_LOCK): Define on hppa when there is no weak support.
* config/os/hpux/os_defines.h (_GLIBCPP_INST_ATOMICITY_LOCK): Define
	on hppa when there is no weak support.

From-SVN: r59092
2002-11-13 22:36:39 +00:00
Benjamin Kosnik 4a1338ed66 linker-map.gnu: Export all _S_construct.
2002-11-13  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu: Export all _S_construct.

From-SVN: r59080
2002-11-13 18:27:37 +00:00
Benjamin Kosnik 6eeb7d7ae0 re PR libstdc++/6746 (ifstream::readsome() always returns zero)
2002-11-11  Benjamin Kosnik  <bkoz@redhat.com>

        PR libstdc++/6746
        * include/bits/fstream.tcc (filebuf::open): Set input pointers.
	* config/io/basic_file_stdio.cc (__basic_file::_M_open_mode): Set
	__p_mode as well.
	(__basic_file::open): Set to non-block for input.
	* testsuite/27_io/istream_unformatted.cc (test12): Add.
	(test13): Same.

From-SVN: r59030
2002-11-11 23:18:05 +00:00
Phil Edwards 7069c22117 atomicity.h: Provide atomic __exchange_and_add and __atomic_add.
2002-11-07  Phil Edwards  <pme@gcc.gnu.org>
            Richard Earnshaw  <rearnsha@arm.com>

	* config/cpu/generic/atomicity.h:  Provide atomic __exchange_and_add
	and __atomic_add.

Co-Authored-By: Richard Earnshaw <rearnsha@arm.com>

From-SVN: r58929
2002-11-08 19:24:41 +00:00
Paolo Carlini bce582242d monetary_members.cc (moneypunct<wchar_t, [...]): Tweak parameters for glibc2.3 systems, thus avoiding unused parameter warnings.
2002-11-08  Paolo Carlini  <pcarlini@unitus.it>

	* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
	const char*),
	moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
	const char*)): Tweak parameters for glibc2.3 systems, thus
	avoiding unused parameter warnings.

From-SVN: r58928
2002-11-08 17:05:40 +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 72040fcbf6 linker-map.gnu: Export string operator+.
2002-11-04  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu: Export string operator+.
	Export __default_alloc_template::_S_force_new.
	* testsuite/abi_check.cc: Output tweaks.

From-SVN: r58801
2002-11-04 22:57:00 +00:00
Benjamin Kosnik 85ab9d2311 re PR libstdc++/7926 (i486 instructions in header files make c++ programs crash on i386)
2002-11-01  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/7926
	* configure.target: Simplify.
	* config/cpu/i386/atomicity.h: Remove.
	* config/cpu/i386: Remove.
	* config/cpu/arm/atomicity.h: Remove.
	* config/cpu/arm: Remove.
	* config/cpu/x86-64/atomicity.h: Remove.
	* config/cpu/x86-64: Remove.

From-SVN: r58735
2002-11-02 01:42:22 +00:00
Christian Ehrhardt 23ae3eb1f8 re PR libstdc++/8197 (std::sin(float) causes undefined reference to sinf)
2002-11-01  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>

	PR libstdc++/8197
	* config/link-map.gnu: Export math stubbs.

From-SVN: r58721
2002-11-01 17:54:51 +00:00
Loren J. Rittle dae1b24731 * config/abi/i386-unknown-freebsd4.7/baseline_symbols.txt: Remove.
From-SVN: r58288
2002-10-18 21:25:13 +00:00
Loren J. Rittle 8478f1708a configure.target (freebsd*): Use abi_baseline_triplet.
* configure.target (freebsd*): Use abi_baseline_triplet.
	* config/abi/i386-unknown-freebsd4/baseline_symbols.txt: New file.

From-SVN: r58287
2002-10-18 21:22:16 +00:00
Benjamin Kosnik 2982f6ffc4 locale_facets.h (__timepunct::__timepunct): Allocate _M_name_timepunct.
2002-10-16  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.h (__timepunct::__timepunct): Allocate
	_M_name_timepunct.
	(__timepunct::~__timepunct): Deallocate, remove specialization
	declarations.
	(messages::messages): Allocate _M_name_messages.
	(messages::~messages): Deallocate.
	(messages_byname): Same.
	* config/locale/gnu/time_members.cc (__timepunct::~__timepunct):
	Remove.
	* config/locale/generic/time_members.cc (__timepunct::~__timepunct):
	Remove.

	* docs/html/install.html: Add es_MX, en_PH to required locales list.

From-SVN: r58232
2002-10-17 01:19:59 +00:00
Benjamin Kosnik 57e172dd3a linker-map.gnu: Add exports for codecvt constructors where size_t == unsigned long.
2002-10-16  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu: Add exports for codecvt constructors
	where size_t == unsigned long.

From-SVN: r58208
2002-10-16 16:14:10 +00:00
Benjamin Kosnik b0b128027b abi_check.cc (hash<string>): Specialize.
2002-10-12  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/abi_check.cc (hash<string>): Specialize.
	Simplify. Check compatible symbol versions.
	* config/linker-map.gnu: Clarify, explicitly export
	std::codecvt::c* symbols.

	* testsuite/22_locale/static_members.cc (test02): Avoid null strings.

From-SVN: r58091
2002-10-13 04:46:58 +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
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
Richard Earnshaw bfc1eae300 re PR libstdc++/3584 (arm-specific atomic operations not atomic)
PR libstdc++/3584
* config/cpu/arm/atomicity.h (__exchange_and_add): Don't try to use
ASM sequences that don't give us atomic addition operations.  Instead
just add a comment explaining why it doesn't work.
(__atomic_add): Just use __exchange_and_add.
(__test_and_set, __always_swap): Delete.

From-SVN: r57778
2002-10-03 15:58:29 +00:00
Andreas Jaeger 3a3f686886 baseline_symbols.txt: New file.
* config/abi/x86_64-unknown-linux-gnu/baseline_symbols.txt:
	New file.

From-SVN: r57742
2002-10-02 18:46:38 +02:00
Richard Henderson f2d208028d * config/os/hpux/cpu_limits.h: Remove.
From-SVN: r57594
2002-09-27 15:39:08 -07: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
Phil Edwards 0e9cab878b abi_check.cc: Pull shell fragments out into...
2002-09-16  Phil Edwards  <pme@gcc.gnu.org>

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

From-SVN: r57208
2002-09-16 18:58:48 +00:00
Benjamin Kosnik 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 145163253a [multiple changes]
2002-09-11  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc (__convert_from_v): Remove.
	* config/locale/gnu/c_locale.h (__convert_from_v): Add.
	* config/locale/generic/c_locale.h (__convert_from_v): Add.

2002-09-11  Paolo Carlini  <pcarlini@unitus.it>

        * include/bits/locale_facets.tcc (__convert_from_v):
        Use __uselocale instead of setlocale for glibc 2.3+.

From-SVN: r57021
2002-09-11 04:25:41 +00:00
Benjamin Kosnik 38cca75024 Makefile.am (sources): Edit.
2002-09-10  Benjamin Kosnik  <bkoz@redhat.com>

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

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

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

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

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

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

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

From-SVN: r56979
2002-09-09 20:26:42 +00:00
Jakub Jelinek 7d9857fde0 messages_members.cc: Add specialization for messages<wchar_t>.
* config/locale/generic/messages_members.cc: Add specialization for
	messages<wchar_t>.
	* config/locale/ieee_1003.1-20021/messages_members.cc: Likewise.

From-SVN: r56920
2002-09-07 21:06:57 +02:00
Jakub Jelinek 750db234b1 configure.target: Use cpu_include_dir="config/cpu/sparc" for all sparc targets.
* configure.target: Use cpu_include_dir="config/cpu/sparc" for all
	sparc targets.
	* config/cpu/sparc/bits/atomicity.h: New file.
	* config/cpu/sparc/sparc32/bits/atomicity.h: Removed.
	* config/cpu/sparc/sparc64/bits/atomicity.h: Removed.

[[Split portion of a mixed commit.]]

From-SVN: r56897.2
2002-09-06 20:32:08 +02:00
Jakub Jelinek 1c28b93579 ctype_noninline.h [...]: Remove using _C_legacy::__ctype_*.
* config/os/gnu-linux/ctype_noninline.h
	[_GLIBCPP_USE_SHADOW_HEADERS]: Remove using _C_legacy::__ctype_*.
	(ctype<char>::classic_table): If _GLIBCPP_C_LOCALE_GNU, return
	_S_c_locale->__ctype_b, otherwise temporarily switch to "C" locale
	and return __ctype_b.
	(ctype<char>::ctype(__c_locale, const mask*, bool, size_t)): If not
	_GLIBCPP_C_LOCALE_GNU, temporarily switch to "C" locale and
	initialize using __ctype_{b,tolower,toupper}.
	(ctype<char>::ctype(const mask*, bool, size_t)): If
	_GLIBCPP_C_LOCALE_GNU, initialize using
	_S_c_locale->__ctype_{b,tolower,toupper}, otherwise temporarily
	switch to "C" locale and initialize using __ctype_{b,tolower,toupper}.

From-SVN: r56893
2002-09-06 19:58:27 +02:00
Jakub Jelinek df4c36e62d Oops, typo in dir name.
From-SVN: r56851
2002-09-05 18:32:28 +02:00
Jakub Jelinek fcfe9bce2d ia64-unknown-linux-gnu: Add.
* config/abi/ia64-unknown-linux-gnu: Add.
	* config/abi/ia64-unknown-linux-gnu/baseline_symbols.txt: New file.
	* config/abi/alphaev67-unknown-linux-gnu: Add.
	* config/abi/alphaev67-unknown-linux-gnu/baseline_symbols.txt: New file.

From-SVN: r56847
2002-09-05 18:21:55 +02:00
Jakub Jelinek f373d4c761 ctype_members.cc (ctype<wchar_t>::do_widen(char)): Switch to _M_c_locale_ctype around btowc call.
* config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_widen(char)):
	Switch to _M_c_locale_ctype around btowc call.
	(ctype<wchar_t>::do_widen(const char*, const char *, wchar_t*)):
	Switch to _M_c_locale_ctype around mbsrtowcs call.
	(ctype<wchar_t>::do_narrow(char)): Switch to _M_c_locale_ctype around
	wctob call.
	(ctype<wchar_t>::do_narrow(const char*, const char *, wchar_t*)):
	Switch to _M_c_locale_ctype around wcsrtombs call.

From-SVN: r56841
2002-09-05 09:54:26 +02:00
Jakub Jelinek 9a6d20712b monetary_members.cc (moneypunct<wchar_t, [...]): Use __uselocale instead of setlocale for glibc 2.3.
* config/locale/gnu/monetary_members.cc
	(moneypunct<wchar_t, true>::_M_initialize_moneypunct,
	moneypunct<wchar_t, false>::_M_initialize_moneypunct): Use
	__uselocale instead of setlocale for glibc 2.3.

From-SVN: r56839
2002-09-05 09:51:16 +02:00
Jakub Jelinek 89671b7067 c++locale_internal.h: New header.
* config/locale/generic/c++locale_internal.h: New header.
	* config/locale/gnu/c++locale_internal.h: New header.
	* config/locale/gnu/c_locale.cc: Include it.
	* config/locale/gnu/collate_members.cc: Include it.
	* config/locale/gnu/ctype_members.cc: Include it.
	* config/locale/gnu/messages_members.cc: Include it.
	* config/locale/gnu/monetary_members.cc: Include it.
	* config/locale/gnu/numeric_members.cc: Include it.
	* config/locale/gnu/time_members.cc: Include it.
	(_M_put): Reorder __strftime_l and __wcsftime_l arguments to match
	glibc.
	(_M_initialize_timepunct): Initialize _M_c_locale_timepunct for
	C locale.
	* acinclude.m4: Include string.h when testing strcoll_l.
	For glibc 2.3 provide __-prefixed prototypes.
	(CLOCALE_INTERNAL_H): Set, add AC_LINK_FILES line.
	* aclocal.m4, configure: Rebuilt.

	* include/bits/locale_facets.h: Add declaration of specialization
	here.
	* config/locale/gnu/messages_members.cc: Add specialization for
	messages<wchar_t>.
	* config/locale/gnu/messages_members.h: Remove generic definition
	of do_get.

From-SVN: r56837
2002-09-05 09:46:17 +02:00
Richard Earnshaw 25cf83980b cpu_limits.h: New file.
* config/cpu/arm/cpu_limits.h: New file.
* configure.target: Use config/cpu/arm for XScale and StrongARM
configurations.

From-SVN: r56653
2002-08-29 09:14:27 +00:00
Phil Edwards 6dc5fdfd5f linker-map.gnu: Verbose comments, clean up spacing.
2002-08-23  Phil Edwards  <pme@gcc.gnu.org>

	* config/linker-map.gnu:  Verbose comments, clean up spacing.
	* include/bits/stl_alloc.h:  Fix indentation of 'if' bodies, return
	statements.
	__allocator:  Change class declaration to struct.
	* docs/html/17_intro/C++STYLE:  Fix typo.
	* include/bits/stl_deque.h, include/bits/stl_list.h,
	include/bits/stl_map.h, include/bits/stl_multimap.h,
	include/bits/stl_vector.h:  Fix fallout from typo.

From-SVN: r56540
2002-08-23 16:52:29 +00:00
Loren J. Rittle 1f8151cf73 abi_check.cc: Enhance shell portability.
* testsuite/abi_check.cc: Enhance shell portability.
	* config/abi/i386-unknown-freebsd4.6: Add.
	* config/abi/i386-unknown-freebsd4.6/baseline_symbols.txt: New file.

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

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

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

From-SVN: r56515
2002-08-22 20:06:01 +00:00
Danny Smith b5028f5e8b ctype_inline.h (is): Don't offset _M_table.
2002-08-02 Danny Smith  <dannysmith@users.sourceforge.net>

	* config/os/newlib/ctype_inline.h (is): Don't offset _M_table.
	(scan_is): Use this->is.
	(scan_not): Likewise.

From-SVN: r55989
2002-08-02 16:10:12 +00:00
Benjamin Kosnik 3450b8d03c re PR libstdc++/7461 (ctype<char>::classic_table() returns offset array on Cygwin)
2002-08-01  Rick Danos  <rdanos@hotmail.com>

	PR libstdc++/7461
	* config/os/newlib/ctype_noninline.h (classic_table): Add offset.
	* config/os/newlib/ctype_inline.h (is): Use static_cast.

From-SVN: r55955
2002-08-01 22:17:23 +00:00
Benjamin Kosnik 0870a49046 linker-map.gnu: Change CXXABI_1 to CXXABI_1.2, GLIBCPP_3.1 to GLIBCPP_3.2.
2002-08-01  Benjamin Kosnik  <bkoz@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* config/linker-map.gnu: Change CXXABI_1 to CXXABI_1.2,
	GLIBCPP_3.1 to GLIBCPP_3.2.

From-SVN: r55938
2002-08-01 17:25:56 +00:00
Alan Modra bd11db39e8 cpu_limits.h (__glibcpp_long_bits): Define.
* config/cpu/powerpc/cpu_limits.h (__glibcpp_long_bits): Define.
	* configure.target (cpu_include_dir): Use cpu/powerpc for powerpc64.
	* config/cpu/powerpc/atomicity.h (__always_swap): Remove.
	(__test_and_set): Remove.
	(_STWCX): Define and use.

From-SVN: r55854
2002-07-30 08:56:00 +09:30
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
Rainer Orth b62024ef52 ctype_base.h (ctype_base): Fix print to match vendor <ctype.h>.
* config/os/solaris/solaris2.5/ctype_base.h (ctype_base): Fix
	print to match vendor <ctype.h>.

From-SVN: r55463
2002-07-15 20:23:38 +00:00
Eric Christopher 17640f249b configure.target: Fix comment for mips atomicity.
2002-07-08  Eric Christopher  <echristo@redhat.com>

	* configure.target: Fix comment for mips atomicity. Add
	mips*-*-linux* target, enable atomic operations there.
	* config/cpu/mips/atomicity.h: Fix comments, remove
	#ifndef/#endif. Add push/pop mips2.

From-SVN: r55331
2002-07-08 19:41:57 +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
Jessica Han 0e20c0b56f 2002-06-25 Jessica Han <jessica@cup.hp.com>
* config/os/hpux/os_defines.h Define _GLIBCPP_VTABLE_PADDING
	* libsupc++/tinfo.cc Handle the 8 byte aligned vtable entries when
	_GLIBCPP_VTABLE_PADDING is defined.

From-SVN: r54991
2002-06-25 16:55:47 +00:00
Phil Edwards d32e25dffa *: Move header files up a level.
2002-06-24  Phil Edwards  <pme@gcc.gnu.org>

	* config/cpu/*/bits/*:  Move header files up a level.  Remove bits.
	* config/os/*/bits/*:  Likewise.
	* configure.in:  Update.
	* configure:  Regenerate.
	* configure.target:  Update.
	* docs/html/17_intro/porting.texi:  Update.

From-SVN: r54943
2002-06-24 05:50:58 +00:00
David Edelsohn 8fcbeac278 - Follow up to 2002-06-05 patch.
From-SVN: r54934
2002-06-23 17:46:34 -04:00
J.T. Conklin f62bef4832 configure.target: Set os_include_dir to config/os/qnx/qnx6.1 under *-qnx6.[12]*.
2002-06-11  J.T. Conklin  <jtc@acorntoolworks.com>
            Benjamin Kosnik  <bkoz@redhat.com>

	* configure.target: Set os_include_dir to config/os/qnx/qnx6.1
	under *-qnx6.[12]*.
	* configure.in: Add support for *-qnx6.[12]*.
	* configure: Regenerate.

	* config/os/qnx, config/os/qnx/qnx6.1, config/os/qnx/qnx6.1/bits:
	New directories.
	* config/os/qnx/qnx6.1/bits/ctype_base.h, ctype_inline.h,
	ctype_noninline.h, os_defines.h: New files.

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

From-SVN: r54518
2002-06-11 17:54:27 +00:00
Benjamin Kosnik 4e4bcb4e86 ctype_noninline.h: Tweak format.
2002-06-08  Benjamin Kosnik  <bkoz@redhat.com>

	* config/os/generic/bits/ctype_noninline.h: Tweak format.

From-SVN: r54371
2002-06-08 14:03:03 +00:00
David Edelsohn b80ee165bd ctype_noninline.h (do_toupper,do_tolower): Call external symbol.
* config/os/aix/bits/ctype_noninline.h (do_toupper,do_tolower):
        Call external symbol.

From-SVN: r54284
2002-06-05 10:51:59 -04:00
Marc Espie 04df515ada atomicity.h (__exchange_and_add): Fix inline assembly for old assemblers.
* config/cpu/m68k/bits/atomicity.h(__exchange_and_add):  Fix inline
	assembly for old assemblers.

From-SVN: r54202
2002-06-03 05:26:00 +00:00
Benjamin Kosnik bed1bd8c51 re PR libstdc++/6795 (stringbuf failure)
2002-05-27  Benjamin Kosnik  <bkoz@redhat.com>

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

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

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

From-SVN: r53921
2002-05-27 11:42:59 +00:00
Carlo Wood 7aacf98920 re PR libstdc++/6811 (Missing 'return *this' in __enc_traits& operator=(const __enc_traits& __obj)' in 3.1 release)
2002-05-26  Carlo Wood  <carlo@alinoe.com>
	    Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/6811
	* config/locale/ieee_1003.1-2001/codecvt_specializations.h
	(__enc_traits::operator=): add missing return statement.

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

From-SVN: r53896
2002-05-26 14:35:04 +00:00
Benjamin Kosnik f64ce6c6e8 [multiple changes]
2002-05-24  Benjamin Kosnik  <bkoz@redhat.com>

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

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

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

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

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

From-SVN: r53422
2002-05-13 13:52:08 +00:00
Kaveh R. Ghazi 31397a7b64 os_defines.h: Revert 2002-05-06 change.
libstdc++-v3:
	* config/os/irix/irix5.2/bits/os_defines.h: Revert 2002-05-06
	change.

gcc:
	* mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define.

From-SVN: r53408
2002-05-13 02:52:47 +00:00
John David Anglin 1f121cdbdd os_defines.h (__glibcpp_long_bits): Define to 64 for hppa 64-bit port.
* config/os/gnu-linux/bits/os_defines.h (__glibcpp_long_bits): Define
	to 64 for hppa 64-bit port.
	(__glibcpp_long_double_bits): Define to 64 for all hppa ports.

From-SVN: r53388
2002-05-12 01:01:21 +00:00
Mark Mitchell 83b35bd149 Adjust copyright dates
From-SVN: r53296
2002-05-08 18:26:06 +00:00
Mark Mitchell 522e3d2226 configure.in: Add support for WindISS.
* configure.in: Add support for WindISS.
	* configure: Regenerated.
	* configure.target: Add support for WindISS.
	* config/os/windiss/bits/ctype_base.h: New file.
	* config/os/windiss/bits/ctype_inline.h: Likewise.
	* config/os/windiss/bits/ctype_noninline.h: Likewise.
	* config/os/windiss/bits/os_defines.h: Likewise.

From-SVN: r53269
2002-05-07 20:43:10 +00:00
Kaveh R. Ghazi 567310ad7f os_defines.h (_SGI_SOURCE, [...]): Ensure they are always defined.
* config/os/irix/irix5.2/bits/os_defines.h (_SGI_SOURCE,
	__EXTENSIONS__): Ensure they are always defined.

From-SVN: r53216
2002-05-06 14:03:57 +00:00
Paolo Carlini 6d030676cc [multiple changes]
2002-05-04  Benjamin Kosnik  <bkoz@redhat.com>
	    Paolo Carlini  <pcarlini@unitus.it>

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

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

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

From-SVN: r53167
2002-05-04 21:33:19 +00:00
Kaveh R. Ghazi b70d6d4b66 ctype_noninline.h (classic_table): Return __ctype + 1.
* config/os/irix/irix5.2/bits/ctype_noninline.h (classic_table):
	Return __ctype + 1.
	(ctype:_M_table): Initialize to classic_table(), not __ctype.

From-SVN: r53093
2002-05-03 13:56:52 +00:00
Kaveh R. Ghazi 08d028699d * config/os/irix/irix5.2/bits/os_defines.h
(__glibcpp_long_double_bits, __glibcpp_long_bits): Define.

From-SVN: r53077
2002-05-03 04:01:58 +00:00
Kaveh R. Ghazi 3a02124033 ctype_inline.h: Cast to unsigned char.
* config/os/irix/irix5.2/bits/ctype_inline.h: Cast to unsigned
	char.

From-SVN: r53076
2002-05-03 03:59:22 +00:00
John David Anglin 888d5eaa62 re PR libstdc++/6501 (ctype_noninline.h:45: `__SB_masks' undeclared)
PR libstdc++/6501
	* include/c_std/std_cctype.h: Include bits/c++config.h.
	* config/os/hpux/bits/os_defines.h (_SB_CTYPE_MACROS): Define.

From-SVN: r52970
2002-04-30 19:50:29 +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 8e44e77e6a re PR libstdc++/6511 (new libstdc++ v3 testsuite regressions on *-*-solaris2.8)
2002-04-30  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/6511
	* config/os/solaris/solaris2.7/bits/ctype_noninline.h: Fix typo.

From-SVN: r52937
2002-04-30 09:15:48 +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
Benjamin Kosnik 82f637d15d os_defines.h: Remove _G_USING_THUNKS.
2002-04-27  Benjamin Kosnik  <bkoz@redhat.com>

	* config/os/solaris/solaris2.5/bits/os_defines.h: Remove
	_G_USING_THUNKS.
	* config/os/solaris/solaris2.6/bits/os_defines.h: Same.
	* config/os/solaris/solaris2.7/bits/os_defines.h: Same.

From-SVN: r52838
2002-04-28 00:42:12 +00:00
Hans-Peter Nilsson 7e67bb8588 cpu_limits.h: New file.
* config/cpu/mmix/bits/cpu_limits.h: New file.
	* configure.target (CPULIMITSH): Use it.

From-SVN: r52674
2002-04-23 17:46:24 +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 cff5778913 linker-map.gnu (__malloc_alloc_template): Add.
2002-04-17  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu (__malloc_alloc_template): Add.
	(__default_alloc_template): Same.
	* include/bits/stl_alloc.h (__malloc_alloc_template): Add extern
	template.
	(__default_alloc_template): Same.

From-SVN: r52441
2002-04-17 20:08:18 +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