This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]