------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca 2005-11-24 22:33 ------- Subject: Re: [4.1 regression] gthr-dce.h:77: error: expected expression before '{' token
> HP-UX 10 is not a primary platform, but this seems an easy fix; let's fix it > if > we can. The enclosed change appears to fix the "__gthrw" regressions on HP-UX 10. I say appears because it hasn't been fully tested. It would need another bootstrap and check for that. On HP-UX 10.20, pthread_once_init and pthread_getunique_np are macro defines. pthread_once_init is an initializer and pthread_getunique_np is an expression (not a function). pthread_key_delete is not defined. I've added some changes to fix warnings about unused arguments arising from this file. I'm not really sure how best to handle the issues arising from trying to use "__gthrw". This could vary from one system to another. Possibly, HP-UX 10 is the only user of this file. Dave -- J. David Anglin [EMAIL PROTECTED] National Research Council of Canada (613) 990-0752 (FAX: 952-6602) Index: gthr-dce.h =================================================================== --- gthr-dce.h (revision 107400) +++ gthr-dce.h (working copy) @@ -55,12 +55,12 @@ typedef pthread_mutex_t __gthread_mutex_t; typedef pthread_mutex_t __gthread_recursive_mutex_t; -#define __GTHREAD_ONCE_INIT __gthrw_pthread_once_init +#define __GTHREAD_ONCE_INIT pthread_once_init #define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function #define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function -#define __GTHREAD_MUTEX_INIT_DEFAULT __gthrw_pthread_once_init +#define __GTHREAD_MUTEX_INIT_DEFAULT pthread_once_init #if SUPPORTS_WEAK && GTHREAD_USE_WEAK # define __gthrw(name) \ @@ -74,9 +74,7 @@ #endif __gthrw(pthread_once); -__gthrw(pthread_once_init); __gthrw(pthread_keycreate); -__gthrw(pthread_key_delete); __gthrw(pthread_getspecific); __gthrw(pthread_setspecific); __gthrw(pthread_create); @@ -96,7 +94,6 @@ __gthrw(pthread_cond_signal); __gthrw(pthread_cond_wait); __gthrw(pthread_exit); -__gthrw(pthread_getunique_np); __gthrw(pthread_mutex_destroy); __gthrw(pthread_self); __gthrw(pthread_yield); @@ -262,7 +259,7 @@ { pthread_t self = __gthrw_pthread_self (); - return (objc_thread_t) __gthrw_pthread_getunique_np (&self); + return (objc_thread_t) pthread_getunique_np (&self); } else return (objc_thread_t) 1; @@ -371,7 +368,7 @@ /* Allocate a condition. */ static inline int -__gthread_objc_condition_allocate (objc_condition_t condition) +__gthread_objc_condition_allocate (UNUSED (objc_condition_t condition)) { if (__gthread_active_p ()) /* Unimplemented. */ @@ -382,7 +379,7 @@ /* Deallocate a condition. */ static inline int -__gthread_objc_condition_deallocate (objc_condition_t condition) +__gthread_objc_condition_deallocate (UNUSED (objc_condition_t condition)) { if (__gthread_active_p ()) /* Unimplemented. */ @@ -393,7 +390,8 @@ /* Wait on the condition */ static inline int -__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex) +__gthread_objc_condition_wait (UNUSED (objc_condition_t condition), + UNUSED (objc_mutex_t mutex)) { if (__gthread_active_p ()) /* Unimplemented. */ @@ -404,7 +402,7 @@ /* Wake up all threads waiting on this condition. */ static inline int -__gthread_objc_condition_broadcast (objc_condition_t condition) +__gthread_objc_condition_broadcast (UNUSED (objc_condition_t condition)) { if (__gthread_active_p ()) /* Unimplemented. */ @@ -415,7 +413,7 @@ /* Wake up one thread waiting on this condition. */ static inline int -__gthread_objc_condition_signal (objc_condition_t condition) +__gthread_objc_condition_signal (UNUSED (objc_condition_t condition)) { if (__gthread_active_p ()) /* Unimplemented. */ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24831