Hi, Fabrice Fontaine wrote: > HAVE_PTHREAD_COND_xxx variables are wrongly set to 1 instead of 0 if > HAVE_PTHREAD_H is set to 0 since > https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=e08989ca11a13c8a09cb0c34f797af5a40753379
Indeed, that's obviously a copy&paste mistake. > This will result in the following build failure if threads are not > available, for example with coreutils in version 8.32: Thanks for the analysis and fix. Applied with a ChangeLog entry: 2021-04-04 Fabrice Fontaine <[email protected]> pthread-cond: Fix wrong configure results when <pthread.h> is absent. * m4/pthread-cond.m4 (gl_PTHREAD_COND): When <pthread.h> does not exist, set HAVE_PTHREAD_COND_* to 0, not to 1. diff --git a/m4/pthread-cond.m4 b/m4/pthread-cond.m4 index 75e37c6..8922a8a 100644 --- a/m4/pthread-cond.m4 +++ b/m4/pthread-cond.m4 @@ -1,4 +1,4 @@ -# pthread-cond.m4 serial 1 +# pthread-cond.m4 serial 2 dnl Copyright (C) 2019-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -23,14 +23,14 @@ AC_DEFUN([gl_PTHREAD_COND], REPLACE_PTHREAD_COND_DESTROY=1 else if test $HAVE_PTHREAD_H = 0; then - HAVE_PTHREAD_COND_INIT=1 - HAVE_PTHREAD_CONDATTR_INIT=1 - HAVE_PTHREAD_CONDATTR_DESTROY=1 - HAVE_PTHREAD_COND_WAIT=1 - HAVE_PTHREAD_COND_TIMEDWAIT=1 - HAVE_PTHREAD_COND_SIGNAL=1 - HAVE_PTHREAD_COND_BROADCAST=1 - HAVE_PTHREAD_COND_DESTROY=1 + HAVE_PTHREAD_COND_INIT=0 + HAVE_PTHREAD_CONDATTR_INIT=0 + HAVE_PTHREAD_CONDATTR_DESTROY=0 + HAVE_PTHREAD_COND_WAIT=0 + HAVE_PTHREAD_COND_TIMEDWAIT=0 + HAVE_PTHREAD_COND_SIGNAL=0 + HAVE_PTHREAD_COND_BROADCAST=0 + HAVE_PTHREAD_COND_DESTROY=0 fi fi ])
