Commit 67c330ae by Rainer Orth Committed by Rainer Orth

re PR target/41810 (Cannot build gcc: gthr-default.h:466: error: '__mutex' was…

re PR target/41810 (Cannot build gcc: gthr-default.h:466: error: '__mutex' was not declared in this scope)

	PR target/41810
	* gthr-solaris.h (__gthread_mutex_destroy): Remove UNUSED.
	[SUPPORTS_WEAK && GTHREAD_USE_WEAK] (__gthread_active_p): Use
	__extension__ to allow cast from function pointer to object
	pointer in C++.
	* doc/install.texi (--enable-threads): Clarify use of Solaris
	threads.

From-SVN: r154708
parent 7400e46b
2009-11-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/41810
* gthr-solaris.h (__gthread_mutex_destroy): Remove UNUSED.
[SUPPORTS_WEAK && GTHREAD_USE_WEAK] (__gthread_active_p): Use
__extension__ to allow cast from function pointer to object
pointer in C++.
* doc/install.texi (--enable-threads): Clarify use of Solaris
threads.
2009-11-27 Steven Bosscher <steven@gcc.gnu.org> 2009-11-27 Steven Bosscher <steven@gcc.gnu.org>
* config/ia64/itanium1.md: Remove. * config/ia64/itanium1.md: Remove.
...@@ -1118,7 +1118,8 @@ RTEMS thread support. ...@@ -1118,7 +1118,8 @@ RTEMS thread support.
@item single @item single
Disable thread support, should work for all platforms. Disable thread support, should work for all platforms.
@item solaris @item solaris
Sun Solaris 2 thread support. Sun Solaris 2/Unix International thread support. Only use this if you
really need to use this legacy API instead of the default, @samp{posix}.
@item vxworks @item vxworks
VxWorks thread support. VxWorks thread support.
@item win32 @item win32
......
...@@ -102,7 +102,8 @@ __gthrw(cond_signal) ...@@ -102,7 +102,8 @@ __gthrw(cond_signal)
static inline int static inline int
__gthread_active_p (void) __gthread_active_p (void)
{ {
static void *const __gthread_active_ptr = (void *) &__gthrw_(thr_create); static void *const __gthread_active_ptr
= __extension__ (void *) &__gthrw_(thr_create);
return __gthread_active_ptr != 0; return __gthread_active_ptr != 0;
} }
...@@ -460,7 +461,7 @@ __gthread_setspecific (__gthread_key_t __key, const void *__ptr) ...@@ -460,7 +461,7 @@ __gthread_setspecific (__gthread_key_t __key, const void *__ptr)
} }
static inline int static inline int
__gthread_mutex_destroy (__gthread_mutex_t * UNUSED(__mutex)) __gthread_mutex_destroy (__gthread_mutex_t *__mutex)
{ {
if (__gthread_active_p ()) if (__gthread_active_p ())
return __gthrw_(mutex_destroy) (__mutex); return __gthrw_(mutex_destroy) (__mutex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment