2004-01-31 Per Bothner <per@bothner.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 31 Jan 2004 17:38:45 +0000 (17:38 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 31 Jan 2004 17:38:45 +0000 (17:38 +0000)
* include/ext/mt_allocator.h
(__mt_alloc::_S_thread_freelist_mutex): Guard with
__GTHREAD_MUTEX_INIT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77042 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/mt_allocator.h

index 55b8f79..068c636 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-31  Per Bothner  <per@bothner.com>
+
+       * include/ext/mt_allocator.h
+       (__mt_alloc::_S_thread_freelist_mutex): Guard with
+       __GTHREAD_MUTEX_INIT.
+
 2004-01-31  Paolo Carlini  <pcarlini@suse.de>
 
        * include/bits/basic_string.tcc (_Rep::_S_create): Minor tweak.
index 9bb7bf4..1afd5de 100644 (file)
@@ -837,7 +837,12 @@ namespace __gnu_cxx
   volatile __mt_alloc<_Tp>::_S_thread_freelist_first = NULL;
 
   template<typename _Tp> __gthread_mutex_t
+#ifdef __GTHREAD_MUTEX_INIT
   __mt_alloc<_Tp>::_S_thread_freelist_mutex = __GTHREAD_MUTEX_INIT;
+#else
+  // XXX
+  __mt_alloc<_Tp>::_S_thread_freelist_mutex;
+#endif
 
   /*
    * Actual initialization in _S_init()