>From 381bf82ca7834d90974821f42179afcf46e2b357 Mon Sep 17 00:00:00 2001 From: Bruno Haible Subject: [PATCH 2/5] pthread-spin: Fix errors in C++ mode. * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Mark the pthread_spin_* functions as nonexistent when exists but does not define the pthread_spinlock_t type. --- ChangeLog | 7 +++++++ m4/pthread-spin.m4 | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d99aca..23e8176 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2019-11-21 Bruno Haible + pthread-spin: Fix errors in C++ mode. + * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Mark the pthread_spin_* + functions as nonexistent when exists but does not define + the pthread_spinlock_t type. + +2019-11-21 Bruno Haible + pthread-mutex: Fix errors in C++ mode. * m4/pthread-mutex.m4 (gl_PTHREAD_MUTEX): Test whether pthread_mutexattr_getrobust exists. If not, define diff --git a/m4/pthread-spin.m4 b/m4/pthread-spin.m4 index 9352d5a..c546e2f 100644 --- a/m4/pthread-spin.m4 +++ b/m4/pthread-spin.m4 @@ -1,4 +1,4 @@ -# pthread-spin.m4 serial 1 +# pthread-spin.m4 serial 2 dnl Copyright (C) 2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -19,7 +19,7 @@ AC_DEFUN([gl_PTHREAD_SPIN], REPLACE_PTHREAD_SPIN_UNLOCK=1 REPLACE_PTHREAD_SPIN_DESTROY=1 else - if test $HAVE_PTHREAD_H = 0; then + if test $HAVE_PTHREAD_H = 0 || test $HAVE_PTHREAD_SPINLOCK_T = 0; then HAVE_PTHREAD_SPIN_INIT=0 HAVE_PTHREAD_SPIN_LOCK=0 HAVE_PTHREAD_SPIN_TRYLOCK=0 -- 2.7.4