diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-22 18:58:35 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-22 18:58:35 +0000 |
commit | 0f902b7d83e7446527dd05bc087b3958ec14a286 (patch) | |
tree | 565106ab5ef326904ca37ed08d4de1e92243f62f /libstdc++-v3/config | |
parent | 11a83f5126cde974f350ddda001f0c16db9e950e (diff) | |
download | gcc-0f902b7d83e7446527dd05bc087b3958ec14a286.tar.gz |
2003-10-22 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/locale_facets.h: Correct byname facets for "C"
locale.
* config/locale/generic/ctype_members.cc: Same.
* config/locale/generic/messages_members.h: Same.
* config/locale/gnu/ctype_members.cc: Same.
* config/locale/gnu/messages_members.h: Same.
* include/bits/codecvt.h: Same.
* src/ctype.cc: Same.
* testsuite/22_locale/codecvt_byname/1.cc: New.
* testsuite/22_locale/collate/1.cc: Edit.
* testsuite/22_locale/collate_byname/1.cc: Derivation tests, move to...
* testsuite/22_locale/collate_byname/named_equivalence.cc: ...here.
* testsuite/22_locale/ctype/1.cc: Derivation tests.
* testsuite/22_locale/ctype/11844.cc: Move...
* testsuite/22_locale/ctype_base/11844.cc: ...here.
* testsuite/22_locale/ctype_base/1.cc: Move mask bits here.
* testsuite/22_locale/ctype_byname/1.cc: Name.
* testsuite/22_locale/messages_byname/1.cc: New.
* testsuite/22_locale/messages_byname/named_equivalence.cc: New.
* testsuite/22_locale/moneypunct_byname/1.cc: Derivation test.
* testsuite/22_locale/moneypunct_byname/named_equivalence.cc: New.
* testsuite/22_locale/numpunct/1.cc: Edit.
* testsuite/22_locale/numpunct_byname/2.cc: Move...
* testsuite/22_locale/numpunct/members/char/3.cc: ...here.
* testsuite/22_locale/numpunct_byname/1.cc: Derivation tests.
* testsuite/22_locale/numpunct_byname/named_equivalence.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72814 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/config')
4 files changed, 24 insertions, 12 deletions
diff --git a/libstdc++-v3/config/locale/generic/ctype_members.cc b/libstdc++-v3/config/locale/generic/ctype_members.cc index 9b3bddb6bef..71175f14559 100644 --- a/libstdc++-v3/config/locale/generic/ctype_members.cc +++ b/libstdc++-v3/config/locale/generic/ctype_members.cc @@ -43,8 +43,11 @@ namespace std ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) : ctype<char>(0, false, __refs) { - _S_destroy_c_locale(_M_c_locale_ctype); - _S_create_c_locale(_M_c_locale_ctype, __s); + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + _S_destroy_c_locale(_M_c_locale_ctype); + _S_create_c_locale(_M_c_locale_ctype, __s); + } } #ifdef _GLIBCXX_USE_WCHAR_T diff --git a/libstdc++-v3/config/locale/generic/messages_members.h b/libstdc++-v3/config/locale/generic/messages_members.h index 3e9122e880f..cecc6446c71 100644 --- a/libstdc++-v3/config/locale/generic/messages_members.h +++ b/libstdc++-v3/config/locale/generic/messages_members.h @@ -76,6 +76,9 @@ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) : messages<_CharT>(__refs) { - _S_destroy_c_locale(this->_M_c_locale_messages); - _S_create_c_locale(this->_M_c_locale_messages, __s); + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + _S_destroy_c_locale(this->_M_c_locale_messages); + _S_create_c_locale(this->_M_c_locale_messages, __s); + } } diff --git a/libstdc++-v3/config/locale/gnu/ctype_members.cc b/libstdc++-v3/config/locale/gnu/ctype_members.cc index 79a14f57a48..a5394b53828 100644 --- a/libstdc++-v3/config/locale/gnu/ctype_members.cc +++ b/libstdc++-v3/config/locale/gnu/ctype_members.cc @@ -43,12 +43,15 @@ namespace std template<> ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) : ctype<char>(0, false, __refs) - { - _S_destroy_c_locale(_M_c_locale_ctype); - _S_create_c_locale(_M_c_locale_ctype, __s); - _M_toupper = _M_c_locale_ctype->__ctype_toupper; - _M_tolower = _M_c_locale_ctype->__ctype_tolower; - _M_table = _M_c_locale_ctype->__ctype_b; + { + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + _S_destroy_c_locale(_M_c_locale_ctype); + _S_create_c_locale(_M_c_locale_ctype, __s); + _M_toupper = _M_c_locale_ctype->__ctype_toupper; + _M_tolower = _M_c_locale_ctype->__ctype_tolower; + _M_table = _M_c_locale_ctype->__ctype_b; + } } #ifdef _GLIBCXX_USE_WCHAR_T diff --git a/libstdc++-v3/config/locale/gnu/messages_members.h b/libstdc++-v3/config/locale/gnu/messages_members.h index 9bb8e50c438..ed95dfb4c43 100644 --- a/libstdc++-v3/config/locale/gnu/messages_members.h +++ b/libstdc++-v3/config/locale/gnu/messages_members.h @@ -106,6 +106,9 @@ std::strcpy(__tmp, __s); this->_M_name_messages = __tmp; #endif - _S_destroy_c_locale(this->_M_c_locale_messages); - _S_create_c_locale(this->_M_c_locale_messages, __s); + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + _S_destroy_c_locale(this->_M_c_locale_messages); + _S_create_c_locale(this->_M_c_locale_messages, __s); + } } |