summaryrefslogtreecommitdiff
path: root/m4/threadlib.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-01-18 18:25:25 +0100
committerLudovic Courtès <ludo@gnu.org>2023-01-18 22:50:18 +0100
commitaeb22f486139f457ae7fc44c2d931312aaae52d8 (patch)
tree0fbfe6d421e637553f9bca39f08577c0ddb990e8 /m4/threadlib.m4
parent4404b553a5a135aee5a606dedea9b6fa25363be4 (diff)
downloadguile-aeb22f486139f457ae7fc44c2d931312aaae52d8.tar.gz
Update Gnulib to v0.1-5703-g356a414e8c and add 'posix_spawn' module.
This is a followup to edfca3b7e5931b5b5a83112e2a9813b068be99c2, which added the 'posix_spawnp' module but not 'posix_spawn'. * m4/gnulib-cache.m4: Add 'posix_spawn' module. * gnulib-local/m4/clock_time.m4.diff: Adjust. * configure.ac: Move 'gl_EARLY' use right after 'AC_PROG_CC'.
Diffstat (limited to 'm4/threadlib.m4')
-rw-r--r--m4/threadlib.m417
1 files changed, 10 insertions, 7 deletions
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index ecb4970af..332491d42 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 32
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+# threadlib.m4 serial 33
+dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -174,7 +174,7 @@ dnl Sets the variable LIBPMULTITHREAD, for programs that really need
dnl multithread functionality. The difference between LIBPTHREAD and
dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically
dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not.
-dnl Sets the variable LIB_SCHED_YIELD to the linker options needed to use the
+dnl Sets the variable SCHED_YIELD_LIB to the linker options needed to use the
dnl sched_yield() function.
dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
dnl multithread-safe programs.
@@ -297,13 +297,16 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
[AC_LANG_PROGRAM(
[[#include <sched.h>]],
[[sched_yield ();]])],
- [LIB_SCHED_YIELD=
+ [SCHED_YIELD_LIB=
],
[dnl Solaris 7...10 has sched_yield in librt, not in libpthread or libc.
- AC_CHECK_LIB([rt], [sched_yield], [LIB_SCHED_YIELD=-lrt],
+ AC_CHECK_LIB([rt], [sched_yield], [SCHED_YIELD_LIB=-lrt],
[dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
- AC_CHECK_LIB([posix4], [sched_yield], [LIB_SCHED_YIELD=-lposix4])])
+ AC_CHECK_LIB([posix4], [sched_yield], [SCHED_YIELD_LIB=-lposix4])])
])
+ AC_SUBST([SCHED_YIELD_LIB])
+ dnl For backward compatibility.
+ LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
AC_SUBST([LIB_SCHED_YIELD])
gl_pthreadlib_body_done=done
@@ -362,7 +365,7 @@ AC_DEFUN([gl_STDTHREADLIB_BODY],
fi
else
dnl Libraries needed by thrd.c, mtx.c, cnd.c, tss.c.
- LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
+ LIBSTDTHREAD="$LIBPMULTITHREAD $SCHED_YIELD_LIB"
fi
;;
esac