diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-10-11 06:19:13 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-10-11 06:19:13 +0000 |
commit | 659203b81e9b5956d9b56b7c23153c1242f1faad (patch) | |
tree | a25c3b10a5e437f7a6875e11b8b8bd9c85f26839 /libstdc++-v3 | |
parent | 3f21b3423169fbcfbca6480a0c43e6c72b991ebe (diff) | |
download | gcc-659203b81e9b5956d9b56b7c23153c1242f1faad.tar.gz |
PR libstdc++/13583
* include/bits/locale_classes.h (locale::_Impl::_M_install_cache):
Move out of line.
* src/locale.cc: Define here, add mutex.
* configure.ac (libtool_VERSION): To 6:7:0.
* configure: Regenerate.
* testsuite/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.7.
* config/linker-map.gnu: Export locale::_Impl::_M_install_cache.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105221 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 14 | ||||
-rw-r--r-- | libstdc++-v3/config/linker-map.gnu | 16 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 2 | ||||
-rw-r--r-- | libstdc++-v3/configure.ac | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/locale_classes.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/src/locale.cc | 24 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/testsuite_abi.cc | 1 |
7 files changed, 56 insertions, 9 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 653b0de58df..e9f68830103 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,17 @@ +2005-10-10 Benjamin Kosnik <bkoz@redhat.com> + + * configure.ac (libtool_VERSION): To 6:7:0. + * configure: Regenerate. + * testsuite/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.7. + * config/linker-map.gnu: Export locale::_Impl::_M_install_cache. + +2005-10-10 Ian Lance Taylor <ian@airs.com> + + PR libstdc++/13583 + * include/bits/locale_classes.h (locale::_Impl::_M_install_cache): + Move out of line. + * src/locale.cc: Define here, add mutex. + 2005-10-09 Paolo Carlini <pcarlini@suse.de> PR libstdc++/24061 (issue 6.19) diff --git a/libstdc++-v3/config/linker-map.gnu b/libstdc++-v3/config/linker-map.gnu index 0b898925878..fa13a614e2e 100644 --- a/libstdc++-v3/config/linker-map.gnu +++ b/libstdc++-v3/config/linker-map.gnu @@ -84,7 +84,7 @@ GLIBCXX_3.4 { std::locale::[A-Zj-z]*; std::locale::_[A-Ha-z]*; std::locale::_Impl::[A-Za-z]*; - std::locale::_Impl::_M_[A-Za-z]*; +# std::locale::_Impl::_M_[A-Za-z]*; std::locale::_[J-Ra-z]*; std::locale::_S_normalize_category*; std::locale::_[T-Za-z]*; @@ -468,6 +468,12 @@ GLIBCXX_3.4 { _ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv; + # std::locale::Impl _M_ members + _ZNSt6locale5_Impl16_M_install_facetEPKNS_2idEPKNS_5facetE; + _ZNSt6locale5_Impl16_M_replace_facetEPKS0_PKNS_2idE; + _ZNSt6locale5_Impl19_M_replace_categoryEPKS0_PKPKNS_2idE; + _ZNSt6locale5_Impl21_M_replace_categoriesEPKS0_i; + # DO NOT DELETE THIS LINE. Port-specific symbols, if any, will be here. local: @@ -571,10 +577,16 @@ GLIBCXX_3.4.6 { _ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv; - _ZN9__gnu_cxx6__poolILb1EE13_M_initializeEv; + _ZN9__gnu_cxx6__poolILb1EE13_M_initializeEv; } GLIBCXX_3.4.5; +GLIBCXX_3.4.7 { + + _ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetE[jm]; + +} GLIBCXX_3.4.6; + # Symbols in the support library (libsupc++) have their own tag. CXXABI_1.3 { diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 1a32ed4d2f7..5a259974766 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -1376,7 +1376,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD # For libtool versioning info, format is CURRENT:REVISION:AGE -libtool_VERSION=6:6:0 +libtool_VERSION=6:7:0 # Find the rest of the source tree framework. diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index d350e6e9910..fc31bc68b6e 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -12,7 +12,7 @@ AC_CONFIG_HEADER(config.h) ### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD # For libtool versioning info, format is CURRENT:REVISION:AGE -libtool_VERSION=6:6:0 +libtool_VERSION=6:7:0 AC_SUBST(libtool_VERSION) # Find the rest of the source tree framework. diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h index 08c192754dc..aed938d0c10 100644 --- a/libstdc++-v3/include/bits/locale_classes.h +++ b/libstdc++-v3/include/bits/locale_classes.h @@ -559,11 +559,7 @@ namespace std { _M_install_facet(&_Facet::id, __facet); } void - _M_install_cache(const facet* __cache, size_t __index) throw() - { - __cache->_M_add_reference(); - _M_caches[__index] = __cache; - } + _M_install_cache(const facet*, size_t); }; template<typename _Facet> diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index 0117d152979..5498eaee7a3 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -33,6 +33,13 @@ #include <cwctype> // For towupper, etc. #include <locale> #include <bits/atomicity.h> +#include <bits/concurrence.h> + +namespace __gnu_internal +{ + // Mutex object for cache access + static __glibcxx_mutex_define_initialized(locale_cache_mutex); +} namespace std { @@ -366,6 +373,23 @@ namespace std } } + void + locale::_Impl:: + _M_install_cache(const facet* __cache, size_t __index) + { + __gnu_cxx::lock sentry(__gnu_internal::locale_cache_mutex); + if (_M_caches[__index] != 0) + { + // Some other thread got in first. + delete __cache; + } + else + { + __cache->_M_add_reference(); + _M_caches[__index] = __cache; + } + } + // locale::id // Definitions for static const data members of locale::id _Atomic_word locale::id::_S_refcount; // init'd to 0 by linker diff --git a/libstdc++-v3/testsuite/testsuite_abi.cc b/libstdc++-v3/testsuite/testsuite_abi.cc index 223af51bb57..d0e65afcf59 100644 --- a/libstdc++-v3/testsuite/testsuite_abi.cc +++ b/libstdc++-v3/testsuite/testsuite_abi.cc @@ -185,6 +185,7 @@ check_version(symbol& test, bool added) known_versions.push_back("GLIBCXX_3.4.4"); known_versions.push_back("GLIBCXX_3.4.5"); known_versions.push_back("GLIBCXX_3.4.6"); + known_versions.push_back("GLIBCXX_3.4.7"); known_versions.push_back("CXXABI_1.3"); known_versions.push_back("CXXABI_1.3.1"); } |