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: Benjamin Kosnik <bkoz at redhat dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sat, 31 Jan 2004 10:39:07 -0600
- Subject: Re: Compile failure on win32: __GTHREAD_MUTEX_INIT' was notdeclaredin this scope
- Organization: Red Hat / Chicago
- References: <401B66D1.5090106@bothner.com>
>Huh? As of 5 minutes ago CVS mainline was broken.
Yep.
2004-01-31 Per Bothner <per@bothner.com>
* include/ext/mt_allocator.h
(__mt_alloc::_S_thread_freelist_mutex): Guard with
__GTHREAD_MUTEX_INIT.
Index: include/ext/mt_allocator.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/ext/mt_allocator.h,v
retrieving revision 1.12
diff -c -p -r1.12 mt_allocator.h
*** include/ext/mt_allocator.h 29 Jan 2004 00:18:39 -0000 1.12
--- include/ext/mt_allocator.h 31 Jan 2004 16:36:54 -0000
*************** namespace __gnu_cxx
*** 837,843 ****
--- 837,848 ----
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()