From af3fb3d6dc3907a45f05d913e9b2fafe42bcc053 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Sat, 31 Jan 2004 09:38:45 -0800 Subject: [PATCH] 2004-01-31 Per Bothner * include/ext/mt_allocator.h (__mt_alloc::_S_thread_freelist_mutex): Guard with __GTHREAD_MUTEX_INIT. From-SVN: r77042 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/ext/mt_allocator.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 55b8f7910f9..068c63621be 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2004-01-31 Per Bothner + + * include/ext/mt_allocator.h + (__mt_alloc::_S_thread_freelist_mutex): Guard with + __GTHREAD_MUTEX_INIT. + 2004-01-31 Paolo Carlini * 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 9bb7bf47ddd..1afd5de5225 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 __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() -- 2.30.2