gcc/libstdc++-v3/libsupc++
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
..
Makefile.am linker-map.gnu: Export __verbose_terminate_handler. 2002-04-01 21:56:42 +00:00
Makefile.in acinclude: More extensive checks for msgfmt, --enable-nls. 2002-04-02 02:41:50 +00:00
cxxabi.h ChangeLog, [...]: Fix spelling errors. 2001-11-23 16:29:02 +00:00
del_op.cc Add support for -fno-exceptions. 2001-02-16 00:44:44 +00:00
del_opnt.cc Add support for -fno-exceptions. 2001-02-16 00:44:44 +00:00
del_opv.cc Add support for -fno-exceptions. 2001-02-16 00:44:44 +00:00
del_opvnt.cc Add support for -fno-exceptions. 2001-02-16 00:44:44 +00:00
eh_alloc.cc locale.cc (locale::locale(const char*)): Make sure global locales are initialized. 2001-07-02 23:08:28 +00:00
eh_aux_runtime.cc Make -fno-exceptions work. 2001-10-24 02:37:56 +00:00
eh_catch.cc eh_personality.cc (__cxa_call_unexpected): Take void*. 2001-11-17 21:09:23 -05:00
eh_exception.cc libstdc++/3150: revert 2001-11-30 commit. 2002-01-09 20:39:27 +00:00
eh_globals.cc eh_alloc.cc: Ensure that required macros are defined before including gthr.h. 2001-06-08 03:55:43 +00:00
eh_personality.cc re PR c++/3719 (Unable to retrow exception in unexpected exception handler.) 2002-03-30 18:56:34 -08:00
eh_terminate.cc acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Check for fgetwc, fgetws. 2001-06-09 06:49:13 +00:00
eh_throw.cc ChangeLog, [...]: Fix spelling errors. 2001-11-23 16:29:02 +00:00
eh_type.cc Intro.3: More notes. 2001-11-20 00:51:37 +00:00
exception exception (__verbose_terminate_handler): Point to docs. 2002-04-02 02:07:22 +00:00
exception_defines.h Add support for -fno-exceptions. 2001-02-16 00:44:44 +00:00
new re PR libstdc++/4164 (33 Memory Leak when using iostream) 2002-04-16 00:45:36 +00:00
new_handler.cc libstdc++/3150: revert 2001-11-30 commit. 2002-01-09 20:39:27 +00:00
new_op.cc Make -fno-exceptions work. 2001-10-24 02:37:56 +00:00
new_opnt.cc Add support for -fno-exceptions. 2001-02-16 00:44:44 +00:00
new_opv.cc Add support for -fno-exceptions. 2001-02-16 00:44:44 +00:00
new_opvnt.cc Add support for -fno-exceptions. 2001-02-16 00:44:44 +00:00
pure.cc IA-64 ABI Exception Handling. 2001-03-28 03:04:51 -08:00
tinfo.cc libstdc++/3150: revert 2001-11-30 commit. 2002-01-09 20:39:27 +00:00
tinfo.h signbitl.c: Copyright years as list, not range. 2002-01-16 19:57:39 +00:00
tinfo2.cc IA-64 ABI Exception Handling. 2001-03-28 03:04:51 -08:00
typeinfo re PR libstdc++/4164 (33 Memory Leak when using iostream) 2002-04-16 00:45:36 +00:00
unwind-cxx.h eh_personality.cc (__cxa_call_unexpected): Take void*. 2001-11-17 21:09:23 -05:00
vec.cc Make -fno-exceptions work. 2001-10-24 02:37:56 +00:00