From: Bruno Haible Date: Thu, 21 Nov 2019 10:44:05 +0000 (+0100) Subject: pthread-spin: Fix errors in C++ mode. X-Git-Tag: v1.0~4586 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a075275a0e6782bc12044609893b5c9e37ea631f;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 4d99aca6a8..23e8176022 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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. diff --git a/m4/pthread-spin.m4 b/m4/pthread-spin.m4 index 9352d5a53a..c546e2f7b0 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