aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-01-31 09:38:45 -0800
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2004-01-31 17:38:45 +0000
commitaf3fb3d6dc3907a45f05d913e9b2fafe42bcc053 (patch)
treec8aa5bfca8403f3d0fab2fcc05bb2e297609e806 /libstdc++-v3
parenta451b0bd9dbfc7cc27597b8668b4cb23822a8262 (diff)
downloadgcc-af3fb3d6dc3907a45f05d913e9b2fafe42bcc053.zip
gcc-af3fb3d6dc3907a45f05d913e9b2fafe42bcc053.tar.gz
gcc-af3fb3d6dc3907a45f05d913e9b2fafe42bcc053.tar.bz2
2004-01-31 Per Bothner <per@bothner.com>
* include/ext/mt_allocator.h (__mt_alloc::_S_thread_freelist_mutex): Guard with __GTHREAD_MUTEX_INIT. From-SVN: r77042
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/ext/mt_allocator.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 55b8f79..068c636 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h
index 9bb7bf4..1afd5de 100644
--- a/libstdc++-v3/include/ext/mt_allocator.h
+++ b/libstdc++-v3/include/ext/mt_allocator.h
@@ -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()