Some tests use HAVE_DECL_ALARM without testing for 'alarm' first. This patch fixes it.
2024-06-03 Bruno Haible <br...@clisp.org> pthread-* tests, regex tests: Prepare for use of 'alarm'. * modules/pthread-cond-tests (configure.ac): Test whether 'alarm' is declared. * modules/pthread-mutex-tests (configure.ac): Likewise. * modules/pthread-once-tests (configure.ac): Likewise. * modules/pthread-rwlock-tests (configure.ac): Likewise. * modules/pthread-tss-tests (configure.ac): Likewise. * modules/regex-tests (configure.ac): Likewise. diff --git a/modules/pthread-cond-tests b/modules/pthread-cond-tests index b104ae0651..fc0a1c8e06 100644 --- a/modules/pthread-cond-tests +++ b/modules/pthread-cond-tests @@ -9,6 +9,7 @@ nanosleep sched_yield configure.ac: +AC_CHECK_DECLS_ONCE([alarm]) Makefile.am: TESTS += test-pthread-cond diff --git a/modules/pthread-mutex-tests b/modules/pthread-mutex-tests index cc234afc77..068dc24f42 100644 --- a/modules/pthread-mutex-tests +++ b/modules/pthread-mutex-tests @@ -11,6 +11,7 @@ random configure.ac: AC_CHECK_HEADERS_ONCE([semaphore.h]) +AC_CHECK_DECLS_ONCE([alarm]) AC_REQUIRE([gl_SEMAPHORE]) Makefile.am: diff --git a/modules/pthread-once-tests b/modules/pthread-once-tests index 9df34462f0..8ec7030ab8 100644 --- a/modules/pthread-once-tests +++ b/modules/pthread-once-tests @@ -10,6 +10,7 @@ pthread-rwlock sched_yield configure.ac: +AC_CHECK_DECLS_ONCE([alarm]) Makefile.am: TESTS += test-pthread-once1 test-pthread-once2 diff --git a/modules/pthread-rwlock-tests b/modules/pthread-rwlock-tests index b63a267876..d125cc9d92 100644 --- a/modules/pthread-rwlock-tests +++ b/modules/pthread-rwlock-tests @@ -12,6 +12,7 @@ random configure.ac: AC_CHECK_HEADERS_ONCE([semaphore.h]) +AC_CHECK_DECLS_ONCE([alarm]) AC_REQUIRE([gl_SEMAPHORE]) Makefile.am: diff --git a/modules/pthread-tss-tests b/modules/pthread-tss-tests index c3060b5ee5..6d097e4dd1 100644 --- a/modules/pthread-tss-tests +++ b/modules/pthread-tss-tests @@ -9,6 +9,7 @@ sched_yield random configure.ac: +AC_CHECK_DECLS_ONCE([alarm]) Makefile.am: TESTS += test-pthread-tss diff --git a/modules/regex-tests b/modules/regex-tests index b6946c1417..5055e4ea3c 100644 --- a/modules/regex-tests +++ b/modules/regex-tests @@ -8,6 +8,7 @@ localcharset wctype-h configure.ac: +AC_CHECK_DECLS_ONCE([alarm]) Makefile.am: TESTS += test-regex