From: Bruno Haible Date: Mon, 28 Apr 2025 10:55:11 +0000 (+0200) Subject: threadlib: Avoid multi-dimensional pattern matching. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=6bf21606d019496d27daed25325e5523dff081a1;p=gnulib.git threadlib: Avoid multi-dimensional pattern matching. * m4/threadlib.m4: Change multi-dimensional AS_CASE back to several one-dimensional tests. --- diff --git a/ChangeLog b/ChangeLog index 567b29109a..04a7c7e023 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2025-04-28 Bruno Haible + threadlib: Avoid multi-dimensional pattern matching. + * m4/threadlib.m4: Change multi-dimensional AS_CASE back to several + one-dimensional tests. + threadlib: Correct indentation. * m4/threadlib.m4: Put cases on a fresh line. Correct indentation. diff --git a/m4/threadlib.m4 b/m4/threadlib.m4 index 37def278f6..a0df29e2f0 100644 --- a/m4/threadlib.m4 +++ b/m4/threadlib.m4 @@ -1,5 +1,5 @@ # threadlib.m4 -# serial 44 +# serial 45 dnl Copyright (C) 2005-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -529,7 +529,7 @@ AC_DEFUN([gl_THREADLIB_BODY], AS_IF([test $gl_pthread_api = yes], [ AS_IF([test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes], [ - gl_threads_api=isoc+posix + gl_threads_api="isoc+posix" AC_DEFINE([USE_ISOC_AND_POSIX_THREADS], [1], [Define if the combination of the ISO C and POSIX multithreading APIs can be used.]) LIBTHREAD= LTLIBTHREAD= @@ -564,16 +564,16 @@ AC_DEFUN([gl_THREADLIB_BODY], ]) ]) ]) - AS_CASE([$gl_threads_api@$gl_use_threads@$gl_have_isoc_threads], - [none@isoc@yes], - [ + AS_IF([test $gl_threads_api = none], [ + AS_IF([test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes], [ gl_STDTHREADLIB_BODY LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD gl_threads_api=isoc AC_DEFINE([USE_ISOC_THREADS], [1], [Define if the ISO C multithreading library can be used.]) - ]) + ]) + ]) AS_IF([test $gl_threads_api = none], [ # The "win32" is for backward compatibility. AS_CASE([$gl_use_threads],