[Bug libstdc++/51296] Several 30_threads tests FAIL on Tru64 UNIX

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 3 08:50:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51296

--- Comment #32 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-03 08:50:24 UTC ---
Created attachment 26559
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26559
proposed patch

Since a similar problem exists for darwin11's
PTHREAD_RECURSIVE_MUTEX_INITIALIZER this solution is not OSF-specific.  This
allows config/os/*/os_defines.h to define one or more of:

_GTHREAD_USE_MUTEX_INIT_FUNC
_GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
_GTHREAD_USE_COND_INIT_FUNC

which will cause gthr-posix.h to #undef the INIT macro and define an
INIT_FUNCTION instead.  

Would this work here too?  You could either add a config/os/osf/os_defines.h
file (which would also need the other files in config/os/generic to be copied
for osf) or you could just put this in gthr-posix.h

#ifdef __osf__
# define _GTHREAD_USE_MUTEX_INIT_FUNC
# define _GTHREAD_USE_COND_INIT_FUNC
#endif



More information about the Gcc-bugs mailing list