1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-06-15 15:25:49 +00:00
Files
gnulib/modules/pthread-once-tests
Bruno Haible d941c98dbf pthread-once: Reduce link dependencies.
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.
2025-09-21 02:11:03 +02:00

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@