OSDN Git Service

PR libstdc++/13583
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Oct 2005 06:19:13 +0000 (06:19 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Oct 2005 06:19:13 +0000 (06:19 +0000)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/config/linker-map.gnu
libstdc++-v3/configure
libstdc++-v3/configure.ac
libstdc++-v3/include/bits/locale_classes.h
libstdc++-v3/src/locale.cc
libstdc++-v3/testsuite/testsuite_abi.cc

index 653b0de..e9f6883 100644 (file)
@@ -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)
index 0b89892..fa13a61 100644 (file)
@@ -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 {
 
index 1a32ed4..5a25997 100755 (executable)
@@ -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.
index d350e6e..fc31bc6 100644 (file)
@@ -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.
index 08c1927..aed938d 100644 (file)
@@ -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>
index 0117d15..5498eae 100644 (file)
 #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
index 223af51..d0e65af 100644 (file)
@@ -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");
     }