gcc/libstdc++-v3/include/bits
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
..
basic_ios.h
basic_ios.tcc std_streambuf.h (basic_streambuf::_M_buf): Change to size_t, from int_type. 2002-07-04 09:20:01 +00:00
basic_string.h stl_vector.h (vector<>): Don't use a name with different meanings before and after re-evaluation in the... 2002-09-10 23:19:10 +00:00
basic_string.tcc 2002-06-04 Paolo Carlini <pcarlini@unitus.it> 2002-06-04 18:20:38 +00:00
boost_concept_check.h stl_map.h, [...]: Reformat and complete doxygenation. 2002-06-22 03:03:56 +00:00
c++config Daily bump. 2002-10-08 07:17:07 +00:00
char_traits.h acinclude.m4: Minor comment tweaks. 2002-09-01 00:33:53 +00:00
codecvt.h Makefile.am (sources): Edit. 2002-09-11 03:36:45 +00:00
concept_check.h
cpp_type_traits.h
deque.tcc deque.tcc, [...]: Re-indent contents of namespace std, re-wrap comment lines as necessary. 2002-08-09 16:51:15 +00:00
fpos.h char_traits.h: Remove generic definitions. 2002-07-31 02:47:36 +00:00
fstream.tcc re PR libstdc++/7445 (poor performance of std::locale::classic() in multi-threaded applications) 2002-08-15 22:25:39 +00:00
functexcept.h
gslice_array.h slice_array.h (_DEFINE_VALARRAY_OPERATOR): Instantiate with new function objects. 2002-08-05 02:09:27 +00:00
gslice.h
indirect_array.h slice_array.h (_DEFINE_VALARRAY_OPERATOR): Instantiate with new function objects. 2002-08-05 02:09:27 +00:00
ios_base.h re PR libstdc++/7219 (_GLIBCPP_DEPRECATED on (ios_base::streamoff and ios_base::streampos types)) 2002-07-24 23:17:13 +00:00
istream.tcc istream.tcc (basic_istream::ignore): Use sbumpc, not snextc. 2002-08-09 06:00:18 +00:00
list.tcc deque.tcc, [...]: Re-indent contents of namespace std, re-wrap comment lines as necessary. 2002-08-09 16:51:15 +00:00
locale_facets.h localefwd.h (class locale): Add static member _S_num_extra_categories... 2002-10-08 23:32:23 +00:00
locale_facets.tcc locale_facets.tcc (num_put::_M_widen_int): Deal correctly with grouped, showbased (oct or hex) zero. 2002-09-27 23:08:22 +00:00
localefwd.h localefwd.h (class locale): Add static member _S_num_extra_categories... 2002-10-08 23:32:23 +00:00
mask_array.h slice_array.h (_DEFINE_VALARRAY_OPERATOR): Instantiate with new function objects. 2002-08-05 02:09:27 +00:00
ostream.tcc char_traits.h: Remove generic definitions. 2002-07-31 02:47:36 +00:00
pthread_allocimpl.h
slice_array.h slice_array.h (_DEFINE_VALARRAY_OPERATOR): Instantiate with new function objects. 2002-08-05 02:09:27 +00:00
sstream.tcc char_traits.h: Remove generic definitions. 2002-07-31 02:47:36 +00:00
stl_algo.h
stl_algobase.h
stl_alloc.h linker-map.gnu: Verbose comments, clean up spacing. 2002-08-23 16:52:29 +00:00
stl_bvector.h stl_vector.h (vector<>): Don't use a name with different meanings before and after re-evaluation in the... 2002-09-10 23:19:10 +00:00
stl_construct.h
stl_deque.h stl_vector.h (vector<>): Don't use a name with different meanings before and after re-evaluation in the... 2002-09-10 23:19:10 +00:00
stl_function.h
stl_heap.h
stl_iterator_base_funcs.h deque.tcc, [...]: Re-indent contents of namespace std, re-wrap comment lines as necessary. 2002-08-09 16:51:15 +00:00
stl_iterator_base_types.h abi.txt: New file. 2002-07-20 06:26:27 +00:00
stl_iterator.h abi.txt: New file. 2002-07-20 06:26:27 +00:00
stl_list.h stl_vector.h (vector<>): Don't use a name with different meanings before and after re-evaluation in the... 2002-09-10 23:19:10 +00:00
stl_map.h linker-map.gnu: Verbose comments, clean up spacing. 2002-08-23 16:52:29 +00:00
stl_multimap.h linker-map.gnu: Verbose comments, clean up spacing. 2002-08-23 16:52:29 +00:00
stl_multiset.h
stl_numeric.h
stl_pair.h stl_pair.h: Tweak comment markup. 2002-05-21 21:09:11 +00:00
stl_pthread_alloc.h
stl_queue.h deque.tcc, [...]: Re-indent contents of namespace std, re-wrap comment lines as necessary. 2002-08-09 16:51:15 +00:00
stl_raw_storage_iter.h
stl_relops.h
stl_set.h
stl_stack.h deque.tcc, [...]: Re-indent contents of namespace std, re-wrap comment lines as necessary. 2002-08-09 16:51:15 +00:00
stl_tempbuf.h
stl_threads.h
stl_tree.h stl_vector.h (vector<>): Don't use a name with different meanings before and after re-evaluation in the... 2002-09-10 23:19:10 +00:00
stl_uninitialized.h
stl_vector.h stl_vector.h (vector<>): Don't use a name with different meanings before and after re-evaluation in the... 2002-09-10 23:19:10 +00:00
stream_iterator.h
streambuf_iterator.h char_traits.h: Remove generic definitions. 2002-07-31 02:47:36 +00:00
streambuf.tcc std_streambuf.h (basic_streambuf::_M_buf): Change to size_t, from int_type. 2002-07-04 09:20:01 +00:00
stringfwd.h acinclude.m4: Minor comment tweaks. 2002-09-01 00:33:53 +00:00
type_traits.h
valarray_array.h valarray_array.h (_DEFINE_ARRAY_FUNCTION): Use our object function surrogates. 2002-08-02 23:08:40 +00:00
valarray_array.tcc
valarray_meta.h valarray_array.h (_DEFINE_ARRAY_FUNCTION): Use our object function surrogates. 2002-08-02 23:08:40 +00:00
vector.tcc deque.tcc, [...]: Re-indent contents of namespace std, re-wrap comment lines as necessary. 2002-08-09 16:51:15 +00:00