diff options
| author | Frank Warmerdam <warmerdam@pobox.com> | 2013-06-19 23:01:19 +0000 |
|---|---|---|
| committer | Frank Warmerdam <warmerdam@pobox.com> | 2013-06-19 23:01:19 +0000 |
| commit | b9b25dd4d55b42ae2db30926a9038228085f8188 (patch) | |
| tree | fecc5b0968f356e20546af6f2852c201b3ca2da8 /src/pj_mutex.c | |
| parent | bbfe2ecbb828c0db78b4b6cbc7c829ccdef0ff64 (diff) | |
| download | PROJ-b9b25dd4d55b42ae2db30926a9038228085f8188.tar.gz PROJ-b9b25dd4d55b42ae2db30926a9038228085f8188.zip | |
use PTHREAD_MUTEX_RECURSIVE_NP on pre-unix98 systems instead of PTHREAD_MUTEX_RECURSIVE
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2342 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/pj_mutex.c')
| -rw-r--r-- | src/pj_mutex.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pj_mutex.c b/src/pj_mutex.c index 60a8e1aa..8106e54c 100644 --- a/src/pj_mutex.c +++ b/src/pj_mutex.c @@ -120,7 +120,11 @@ void pj_acquire_lock() pthread_mutex_lock( &pj_precreated_lock); pthread_mutexattr_init(&mutex_attr); +#ifndef PTHREAD_MUTEX_RECURSIVE + pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE_NP); +#else pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE); +#endif pthread_mutex_init(&pj_core_lock, &mutex_attr); pj_core_lock_created = 1; |
