mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-06-15 15:25:49 +00:00
d941c98dbf
Linking with -lpthread is not needed on musl libc, macOS, NetBSD, Solaris, Cygwin, Haiku, Android. Reported by Michael Osipov <michael.osipov@innomotics.com> and Tijl Coosemans <tijl@FreeBSD.org> in <https://lists.gnu.org/archive/html/bug-gettext/2025-09/msg00019.html>. * m4/pthread-once.m4 (gl_PTHREAD_ONCE): Require gl_PTHREADLIB. Set PTHREAD_ONCE_LIB. * modules/pthread-once (Link): Link with $(PTHREAD_ONCE_LIB) instead of $(LIBPMULTITHREAD). * modules/pthread-once-tests (Makefile.am): Update accordingly.
20 lines
433 B
Plaintext
20 lines
433 B
Plaintext
Files:
|
|
tests/test-pthread-once1.c
|
|
tests/test-pthread-once2.c
|
|
tests/macros.h
|
|
|
|
Depends-on:
|
|
pthread-thread
|
|
pthread-mutex
|
|
pthread-rwlock
|
|
sched_yield
|
|
|
|
configure.ac:
|
|
AC_CHECK_DECLS_ONCE([alarm])
|
|
|
|
Makefile.am:
|
|
TESTS += test-pthread-once1 test-pthread-once2
|
|
check_PROGRAMS += test-pthread-once1 test-pthread-once2
|
|
test_pthread_once1_LDADD = $(LDADD) @PTHREAD_ONCE_LIB@
|
|
test_pthread_once2_LDADD = $(LDADD) @LIBPMULTITHREAD@ @SCHED_YIELD_LIB@
|