diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2004-10-29 06:23:18 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2004-10-29 04:23:18 +0000 |
commit | e95dc99b7b412f1d1890db2f738580dfeb826d64 (patch) | |
tree | bccd869f2811734b3f8196e381259f8667ac37f5 /gcc/gthr-posix.h | |
parent | d1ea4593075a282c71a4560b32d50a26d3519092 (diff) | |
download | gcc-e95dc99b7b412f1d1890db2f738580dfeb826d64.zip gcc-e95dc99b7b412f1d1890db2f738580dfeb826d64.tar.gz gcc-e95dc99b7b412f1d1890db2f738580dfeb826d64.tar.bz2 |
gthr-posix.h (__gthread_recursive_mutex_init_function): Guard with #ifdef PTHREAD_MUTEX_RECURSIVE/#endif pairs.
* gthr-posix.h (__gthread_recursive_mutex_init_function): Guard
with #ifdef PTHREAD_MUTEX_RECURSIVE/#endif pairs.
From-SVN: r89805
Diffstat (limited to 'gcc/gthr-posix.h')
-rw-r--r-- | gcc/gthr-posix.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h index 7cab614..a46c653 100644 --- a/gcc/gthr-posix.h +++ b/gcc/gthr-posix.h @@ -54,8 +54,10 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t; #define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER #elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) #define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP -#else +#elif defined(PTHREAD_MUTEX_RECURSIVE) #define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function +#else +#define __GTHREAD_RECURSIVE_MUTEX_INIT RECURSIVE_ERRORCHECKMUTEX #endif #if SUPPORTS_WEAK && GTHREAD_USE_WEAK @@ -529,7 +531,7 @@ __gthread_mutex_unlock (__gthread_mutex_t *mutex) return 0; } -#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP +#if !defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) && defined(PTHREAD_MUTEX_RECURSIVE) static inline int __gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex) { |