This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Compile failure on win32: __GTHREAD_MUTEX_INIT' was notdeclaredin this scope
- From: Per Bothner <per at bothner dot com>
- To: bkoz at redhat dot com
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sat, 31 Jan 2004 00:26:57 -0800
- Subject: Re: Compile failure on win32: __GTHREAD_MUTEX_INIT' was notdeclaredin this scope
>>libstdc++-v3/include/ext/mt_allocator.h:840: error:
>>`__GTHREAD_MUTEX_INIT' was not declared in this scope
> This has been reverted at the moment. If you do a cvs update
> you should be fine.
Huh? As of 5 minutes ago CVS mainline was broken.
mt_allocator_h line 840 references __GTHREAD_MUTEX_INIT inside an
#ifdef __GTHREADS *only*. This cannot possibly be correct, given that
at line 696 it is guarded by both #ifdef __GTHREADS *and*
#ifdef __GTHREAD_MUTEX_INIT.
To continue the build I replaced it by:
template<typename _Tp> __gthread_mutex_t
#ifdef __GTHREAD_MUTEX_INIT
__mt_alloc<_Tp>::_S_thread_freelist_mutex = __GTHREAD_MUTEX_INIT;
#else
__mt_alloc<_Tp>::_S_thread_freelist_mutex;
#endif
Presumably there needs to be a call to __GTHREAD_MUTEX_INIT_FUNCTION
somewhere.
--
--Per Bothner
per@bothner.com http://per.bothner.com/