From: Per Bothner Date: Sat, 31 Jan 2004 17:38:45 +0000 (-0800) Subject: 2004-01-31 Per Bothner X-Git-Tag: releases/gcc-4.0.0~10506 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af3fb3d6dc3907a45f05d913e9b2fafe42bcc053;p=thirdparty%2Fgcc.git 2004-01-31 Per Bothner * include/ext/mt_allocator.h (__mt_alloc::_S_thread_freelist_mutex): Guard with __GTHREAD_MUTEX_INIT. From-SVN: r77042 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 55b8f7910f92..068c63621be1 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 9bb7bf47dddb..1afd5de52253 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()