* lib/threads.in.h (thrd_sleep): Consider REPLACE_THRD_SLEEP.
(thrd_yield): Consider REPLACE_THRD_YIELD.
(mtx_init): Consider REPLACE_MTX_INIT.
(mtx_lock): Consider REPLACE_MTX_LOCK.
(mtx_trylock): Consider REPLACE_MTX_TRYLOCK.
(mtx_timedlock): Consider REPLACE_MTX_TIMEDLOCK.
(mtx_unlock): Consider REPLACE_MTX_UNLOCK.
(mtx_destroy): Consider REPLACE_MTX_DESTROY.
(call_once): Consider REPLACE_CALL_ONCE. Fix warning message.
(cnd_init): Consider REPLACE_CND_INIT.
(cnd_wait): Consider REPLACE_CND_WAIT.
(cnd_timedwait): Consider REPLACE_CND_TIMEDWAIT.
(cnd_signal): Consider REPLACE_CND_SIGNAL.
(cnd_broadcast): Consider REPLACE_CND_BROADCAST.
(cnd_destroy): Consider REPLACE_CND_DESTROY.
(tss_create): Consider REPLACE_TSS_CREATE.
(tss_set): Consider REPLACE_TSS_SET.
(tss_get): Consider REPLACE_TSS_GET.
(tss_delete): Consider REPLACE_TSS_DELETE.
* m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_CALL_ONCE,
REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT,
REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT,
REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK,
REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK,
REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE,
REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET.
* modules/threads-h (Makefile.am): Substitute REPLACE_CALL_ONCE,
REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT,
REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT,
REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK,
REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK,
REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE,
REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET.
* m4/thrd.m4 (gl_FUNC_THRD_CREATE): New macro.
* modules/thrd (configure.ac): Invoke gl_FUNC_THRD_CREATE.
* m4/call_once.m4: New file.
* modules/call_once (Files): Add m4/call_once.m4.
(configure.ac): Invoke gl_FUNC_CALL_ONCE. Consider REPLACE_CALL_ONCE.
* m4/cnd.m4: New file.
* modules/cnd (Files): Add m4/cnd.m4.
(configure.ac): Invoke gl_FUNC_CND_INIT. Consider REPLACE_CND_INIT.
* m4/mtx.m4: New file.
* modules/mtx (Files): Add m4/mtx.m4.
(configure.ac): Invoke gl_FUNC_MTX_INIT. Consider REPLACE_MTX_INIT.
* m4/tss.m4: New file.
* modules/tss (Files): Add m4/tss.m4.
(configure.ac): Invoke gl_FUNC_TSS_CREATE. Consider REPLACE_TSS_CREATE.
* doc/posix-functions/call_once.texi: Mention the Android API levels.
* doc/posix-functions/cnd_broadcast.texi: Likewise.
* doc/posix-functions/cnd_destroy.texi: Likewise.
* doc/posix-functions/cnd_init.texi: Likewise.
* doc/posix-functions/cnd_signal.texi: Likewise.
* doc/posix-functions/cnd_timedwait.texi: Likewise.
* doc/posix-functions/cnd_wait.texi: Likewise.
* doc/posix-functions/mtx_destroy.texi: Likewise.
* doc/posix-functions/mtx_init.texi: Likewise.
* doc/posix-functions/mtx_lock.texi: Likewise.
* doc/posix-functions/mtx_timedlock.texi: Likewise.
* doc/posix-functions/mtx_trylock.texi: Likewise.
* doc/posix-functions/mtx_unlock.texi: Likewise.
* doc/posix-functions/thrd_create.texi: Likewise.
* doc/posix-functions/thrd_current.texi: Likewise.
* doc/posix-functions/thrd_detach.texi: Likewise.
* doc/posix-functions/thrd_equal.texi: Likewise.
* doc/posix-functions/thrd_exit.texi: Likewise.
* doc/posix-functions/thrd_join.texi: Likewise.
* doc/posix-functions/thrd_sleep.texi: Likewise.
* doc/posix-functions/thrd_yield.texi: Likewise.
* doc/posix-functions/tss_create.texi: Likewise.
* doc/posix-functions/tss_delete.texi: Likewise.
* doc/posix-functions/tss_get.texi: Likewise.
* doc/posix-functions/tss_set.texi: Likewise.
+2024-01-25 Bruno Haible <bruno@clisp.org>
+
+ Resolve conflicts for functions introduced in Android API level 30.
+
+ * lib/threads.in.h (thrd_sleep): Consider REPLACE_THRD_SLEEP.
+ (thrd_yield): Consider REPLACE_THRD_YIELD.
+ (mtx_init): Consider REPLACE_MTX_INIT.
+ (mtx_lock): Consider REPLACE_MTX_LOCK.
+ (mtx_trylock): Consider REPLACE_MTX_TRYLOCK.
+ (mtx_timedlock): Consider REPLACE_MTX_TIMEDLOCK.
+ (mtx_unlock): Consider REPLACE_MTX_UNLOCK.
+ (mtx_destroy): Consider REPLACE_MTX_DESTROY.
+ (call_once): Consider REPLACE_CALL_ONCE. Fix warning message.
+ (cnd_init): Consider REPLACE_CND_INIT.
+ (cnd_wait): Consider REPLACE_CND_WAIT.
+ (cnd_timedwait): Consider REPLACE_CND_TIMEDWAIT.
+ (cnd_signal): Consider REPLACE_CND_SIGNAL.
+ (cnd_broadcast): Consider REPLACE_CND_BROADCAST.
+ (cnd_destroy): Consider REPLACE_CND_DESTROY.
+ (tss_create): Consider REPLACE_TSS_CREATE.
+ (tss_set): Consider REPLACE_TSS_SET.
+ (tss_get): Consider REPLACE_TSS_GET.
+ (tss_delete): Consider REPLACE_TSS_DELETE.
+ * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_CALL_ONCE,
+ REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT,
+ REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT,
+ REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK,
+ REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK,
+ REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE,
+ REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET.
+ * modules/threads-h (Makefile.am): Substitute REPLACE_CALL_ONCE,
+ REPLACE_CND_BROADCAST, REPLACE_CND_DESTROY, REPLACE_CND_INIT,
+ REPLACE_CND_SIGNAL, REPLACE_CND_TIMEDWAIT, REPLACE_CND_WAIT,
+ REPLACE_MTX_DESTROY, REPLACE_MTX_INIT, REPLACE_MTX_LOCK,
+ REPLACE_MTX_TIMEDLOCK, REPLACE_MTX_TRYLOCK, REPLACE_MTX_UNLOCK,
+ REPLACE_THRD_SLEEP, REPLACE_THRD_YIELD, REPLACE_TSS_CREATE,
+ REPLACE_TSS_DELETE, REPLACE_TSS_GET, REPLACE_TSS_SET.
+ * m4/thrd.m4 (gl_FUNC_THRD_CREATE): New macro.
+ * modules/thrd (configure.ac): Invoke gl_FUNC_THRD_CREATE.
+ * m4/call_once.m4: New file.
+ * modules/call_once (Files): Add m4/call_once.m4.
+ (configure.ac): Invoke gl_FUNC_CALL_ONCE. Consider REPLACE_CALL_ONCE.
+ * m4/cnd.m4: New file.
+ * modules/cnd (Files): Add m4/cnd.m4.
+ (configure.ac): Invoke gl_FUNC_CND_INIT. Consider REPLACE_CND_INIT.
+ * m4/mtx.m4: New file.
+ * modules/mtx (Files): Add m4/mtx.m4.
+ (configure.ac): Invoke gl_FUNC_MTX_INIT. Consider REPLACE_MTX_INIT.
+ * m4/tss.m4: New file.
+ * modules/tss (Files): Add m4/tss.m4.
+ (configure.ac): Invoke gl_FUNC_TSS_CREATE. Consider REPLACE_TSS_CREATE.
+ * doc/posix-functions/call_once.texi: Mention the Android API levels.
+ * doc/posix-functions/cnd_broadcast.texi: Likewise.
+ * doc/posix-functions/cnd_destroy.texi: Likewise.
+ * doc/posix-functions/cnd_init.texi: Likewise.
+ * doc/posix-functions/cnd_signal.texi: Likewise.
+ * doc/posix-functions/cnd_timedwait.texi: Likewise.
+ * doc/posix-functions/cnd_wait.texi: Likewise.
+ * doc/posix-functions/mtx_destroy.texi: Likewise.
+ * doc/posix-functions/mtx_init.texi: Likewise.
+ * doc/posix-functions/mtx_lock.texi: Likewise.
+ * doc/posix-functions/mtx_timedlock.texi: Likewise.
+ * doc/posix-functions/mtx_trylock.texi: Likewise.
+ * doc/posix-functions/mtx_unlock.texi: Likewise.
+ * doc/posix-functions/thrd_create.texi: Likewise.
+ * doc/posix-functions/thrd_current.texi: Likewise.
+ * doc/posix-functions/thrd_detach.texi: Likewise.
+ * doc/posix-functions/thrd_equal.texi: Likewise.
+ * doc/posix-functions/thrd_exit.texi: Likewise.
+ * doc/posix-functions/thrd_join.texi: Likewise.
+ * doc/posix-functions/thrd_sleep.texi: Likewise.
+ * doc/posix-functions/thrd_yield.texi: Likewise.
+ * doc/posix-functions/tss_create.texi: Likewise.
+ * doc/posix-functions/tss_delete.texi: Likewise.
+ * doc/posix-functions/tss_get.texi: Likewise.
+ * doc/posix-functions/tss_set.texi: Likewise.
+
2024-01-21 Bruno Haible <bruno@clisp.org>
readutmp: Port to Android NDK r26.
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@item
This function uses an incorrectly defined @code{thrd_start_t} on some platforms:
AIX 7.2.
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@item
The exit code provided to this function is discarded on some platforms:
AIX 7.3.1.
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@item
This function never stores an exit code on some platforms:
AIX 7.3.1.
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on many platforms:
-glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.27, macOS 11.1, FreeBSD 9.3, NetBSD 8.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
@end itemize
Portability problems not fixed by Gnulib:
/* An ISO C 11 compatible <threads.h>.
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
#endif
#if @GNULIB_THRD@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_THRD_SLEEP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define thrd_sleep rpl_thrd_sleep
+# endif
+_GL_FUNCDECL_RPL (thrd_sleep, int,
+ (const struct timespec *, struct timespec *)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (thrd_sleep, int,
+ (const struct timespec *, struct timespec *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (thrd_sleep, int,
(const struct timespec *, struct timespec *)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (thrd_sleep, int,
(const struct timespec *, struct timespec *));
+# endif
_GL_CXXALIASWARN (thrd_sleep);
#elif defined GNULIB_POSIXCHECK
# undef thrd_sleep
#endif
#if @GNULIB_THRD@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_THRD_YIELD@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define thrd_yield rpl_thrd_yield
+# endif
+_GL_FUNCDECL_RPL (thrd_yield, void, (void));
+_GL_CXXALIAS_RPL (thrd_yield, void, (void));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (thrd_yield, void, (void));
-# endif
+# endif
_GL_CXXALIAS_SYS (thrd_yield, void, (void));
+# endif
_GL_CXXALIASWARN (thrd_yield);
#elif defined GNULIB_POSIXCHECK
# undef thrd_yield
#endif
#if @GNULIB_MTX@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_MTX_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mtx_init rpl_mtx_init
+# endif
+_GL_FUNCDECL_RPL (mtx_init, int, (mtx_t *, int) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mtx_init, int, (mtx_t *, int));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (mtx_init, int, (mtx_t *, int) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (mtx_init, int, (mtx_t *, int));
+# endif
_GL_CXXALIASWARN (mtx_init);
#elif defined GNULIB_POSIXCHECK
# undef mtx_init
#endif
#if @GNULIB_MTX@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_MTX_LOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mtx_lock rpl_mtx_lock
+# endif
+_GL_FUNCDECL_RPL (mtx_lock, int, (mtx_t *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mtx_lock, int, (mtx_t *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (mtx_lock, int, (mtx_t *) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (mtx_lock, int, (mtx_t *));
+# endif
_GL_CXXALIASWARN (mtx_lock);
#elif defined GNULIB_POSIXCHECK
# undef mtx_lock
#endif
#if @GNULIB_MTX@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_MTX_TRYLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mtx_trylock rpl_mtx_trylock
+# endif
+_GL_FUNCDECL_RPL (mtx_trylock, int, (mtx_t *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mtx_trylock, int, (mtx_t *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (mtx_trylock, int, (mtx_t *) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (mtx_trylock, int, (mtx_t *));
+# endif
_GL_CXXALIASWARN (mtx_trylock);
#elif defined GNULIB_POSIXCHECK
# undef mtx_trylock
#endif
#if @GNULIB_MTX@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_MTX_TIMEDLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mtx_timedlock rpl_mtx_timedlock
+# endif
+_GL_FUNCDECL_RPL (mtx_timedlock, int, (mtx_t *, const struct timespec *)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (mtx_timedlock, int, (mtx_t *, const struct timespec *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (mtx_timedlock, int, (mtx_t *, const struct timespec *)
_GL_ARG_NONNULL ((1, 2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (mtx_timedlock, int, (mtx_t *, const struct timespec *));
+# endif
_GL_CXXALIASWARN (mtx_timedlock);
#elif defined GNULIB_POSIXCHECK
# undef mtx_timedlock
#endif
#if @GNULIB_MTX@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_MTX_UNLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mtx_unlock rpl_mtx_unlock
+# endif
+_GL_FUNCDECL_RPL (mtx_unlock, int, (mtx_t *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mtx_unlock, int, (mtx_t *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (mtx_unlock, int, (mtx_t *) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (mtx_unlock, int, (mtx_t *));
+# endif
_GL_CXXALIASWARN (mtx_unlock);
#elif defined GNULIB_POSIXCHECK
# undef mtx_unlock
#endif
#if @GNULIB_MTX@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_MTX_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mtx_destroy rpl_mtx_destroy
+# endif
+_GL_FUNCDECL_RPL (mtx_destroy, void, (mtx_t *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mtx_destroy, void, (mtx_t *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (mtx_destroy, void, (mtx_t *) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (mtx_destroy, void, (mtx_t *));
+# endif
_GL_CXXALIASWARN (mtx_destroy);
#elif defined GNULIB_POSIXCHECK
# undef mtx_destroy
#endif
#if @GNULIB_CALL_ONCE@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_CALL_ONCE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define call_once rpl_call_once
+# endif
+_GL_FUNCDECL_RPL (call_once, void, (once_flag *, void (*) (void))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (call_once, void, (once_flag *, void (*) (void)));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (call_once, void, (once_flag *, void (*) (void))
_GL_ARG_NONNULL ((1, 2)));
-# endif
+# endif
_GL_CXXALIAS_SYS_CAST (call_once, void, (once_flag *, void (*) (void)));
+# endif
_GL_CXXALIASWARN (call_once);
#elif defined GNULIB_POSIXCHECK
# undef call_once
# if HAVE_RAW_DECL_CALL_ONCE
_GL_WARN_ON_USE (call_once, "call_once is unportable - "
- "use gnulib module mtx for portability");
+ "use gnulib module call_once for portability");
# endif
#endif
#endif
#if @GNULIB_CND@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_CND_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define cnd_init rpl_cnd_init
+# endif
+_GL_FUNCDECL_RPL (cnd_init, int, (cnd_t *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (cnd_init, int, (cnd_t *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (cnd_init, int, (cnd_t *) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (cnd_init, int, (cnd_t *));
+# endif
_GL_CXXALIASWARN (cnd_init);
#elif defined GNULIB_POSIXCHECK
# undef cnd_init
#endif
#if @GNULIB_CND@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_CND_WAIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define cnd_wait rpl_cnd_wait
+# endif
+_GL_FUNCDECL_RPL (cnd_wait, int, (cnd_t *, mtx_t *) _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (cnd_wait, int, (cnd_t *, mtx_t *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (cnd_wait, int, (cnd_t *, mtx_t *) _GL_ARG_NONNULL ((1, 2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (cnd_wait, int, (cnd_t *, mtx_t *));
+# endif
_GL_CXXALIASWARN (cnd_wait);
#elif defined GNULIB_POSIXCHECK
# undef cnd_wait
#endif
#if @GNULIB_CND@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_CND_TIMEDWAIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define cnd_timedwait rpl_cnd_timedwait
+# endif
+_GL_FUNCDECL_RPL (cnd_timedwait, int,
+ (cnd_t *, mtx_t *, const struct timespec *)
+ _GL_ARG_NONNULL ((1, 2, 3)));
+_GL_CXXALIAS_RPL (cnd_timedwait, int,
+ (cnd_t *, mtx_t *, const struct timespec *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (cnd_timedwait, int,
(cnd_t *, mtx_t *, const struct timespec *)
_GL_ARG_NONNULL ((1, 2, 3)));
-# endif
+# endif
_GL_CXXALIAS_SYS (cnd_timedwait, int,
(cnd_t *, mtx_t *, const struct timespec *));
+# endif
_GL_CXXALIASWARN (cnd_timedwait);
#elif defined GNULIB_POSIXCHECK
# undef cnd_timedwait
#endif
#if @GNULIB_CND@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_CND_SIGNAL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define cnd_signal rpl_cnd_signal
+# endif
+_GL_FUNCDECL_RPL (cnd_signal, int, (cnd_t *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (cnd_signal, int, (cnd_t *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (cnd_signal, int, (cnd_t *) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (cnd_signal, int, (cnd_t *));
+# endif
_GL_CXXALIASWARN (cnd_signal);
#elif defined GNULIB_POSIXCHECK
# undef cnd_signal
#endif
#if @GNULIB_CND@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_CND_BROADCAST@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define cnd_broadcast rpl_cnd_broadcast
+# endif
+_GL_FUNCDECL_RPL (cnd_broadcast, int, (cnd_t *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (cnd_broadcast, int, (cnd_t *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (cnd_broadcast, int, (cnd_t *) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (cnd_broadcast, int, (cnd_t *));
+# endif
_GL_CXXALIASWARN (cnd_broadcast);
#elif defined GNULIB_POSIXCHECK
# undef cnd_broadcast
#endif
#if @GNULIB_CND@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_CND_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define cnd_destroy rpl_cnd_destroy
+# endif
+_GL_FUNCDECL_RPL (cnd_destroy, void, (cnd_t *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (cnd_destroy, void, (cnd_t *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (cnd_destroy, void, (cnd_t *) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (cnd_destroy, void, (cnd_t *));
+# endif
_GL_CXXALIASWARN (cnd_destroy);
#elif defined GNULIB_POSIXCHECK
# undef cnd_destroy
#endif
#if @GNULIB_TSS@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_TSS_CREATE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define tss_create rpl_tss_create
+# endif
+_GL_FUNCDECL_RPL (tss_create, int, (tss_t *, tss_dtor_t) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (tss_create, int, (tss_t *, tss_dtor_t));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (tss_create, int, (tss_t *, tss_dtor_t) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (tss_create, int, (tss_t *, tss_dtor_t));
+# endif
_GL_CXXALIASWARN (tss_create);
#elif defined GNULIB_POSIXCHECK
# undef tss_create
#endif
#if @GNULIB_TSS@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_TSS_SET@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define tss_set rpl_tss_set
+# endif
+_GL_FUNCDECL_RPL (tss_set, int, (tss_t, void *));
+_GL_CXXALIAS_RPL (tss_set, int, (tss_t, void *));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (tss_set, int, (tss_t, void *));
-# endif
+# endif
_GL_CXXALIAS_SYS (tss_set, int, (tss_t, void *));
+# endif
_GL_CXXALIASWARN (tss_set);
#elif defined GNULIB_POSIXCHECK
# undef tss_set
#endif
#if @GNULIB_TSS@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_TSS_GET@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define tss_get rpl_tss_get
+# endif
+_GL_FUNCDECL_RPL (tss_get, void *, (tss_t));
+_GL_CXXALIAS_RPL (tss_get, void *, (tss_t));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (tss_get, void *, (tss_t));
-# endif
+# endif
_GL_CXXALIAS_SYS (tss_get, void *, (tss_t));
+# endif
_GL_CXXALIASWARN (tss_get);
#elif defined GNULIB_POSIXCHECK
# undef tss_get
#endif
#if @GNULIB_TSS@
-# if !@HAVE_THREADS_H@
+# if @REPLACE_TSS_DELETE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define tss_delete rpl_tss_delete
+# endif
+_GL_FUNCDECL_RPL (tss_delete, void, (tss_t));
+_GL_CXXALIAS_RPL (tss_delete, void, (tss_t));
+# else
+# if !@HAVE_THREADS_H@
_GL_FUNCDECL_SYS (tss_delete, void, (tss_t));
-# endif
+# endif
_GL_CXXALIAS_SYS (tss_delete, void, (tss_t));
+# endif
_GL_CXXALIASWARN (tss_delete);
#elif defined GNULIB_POSIXCHECK
# undef tss_delete
--- /dev/null
+# call_once.m4 serial 1
+dnl Copyright (C) 2024 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.
+
+AC_DEFUN([gl_FUNC_CALL_ONCE],
+[
+ AC_REQUIRE([gl_THREADS_H])
+ gl_CHECK_FUNCS_ANDROID([call_once], [[#include <threads.h>]])
+ case "$gl_cv_onwards_func_call_once" in
+ future*)
+ REPLACE_CALL_ONCE=1
+ ;;
+ esac
+])
--- /dev/null
+# cnd.m4 serial 1
+dnl Copyright (C) 2024 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.
+
+AC_DEFUN([gl_FUNC_CND_INIT],
+[
+ AC_REQUIRE([gl_THREADS_H])
+ gl_CHECK_FUNCS_ANDROID([cnd_init], [[#include <threads.h>]])
+ case "$gl_cv_onwards_func_cnd_init" in
+ future*)
+ REPLACE_CND_INIT=1
+ dnl Assume that the other cnd_* functions are introduced at the same time
+ dnl as cnd_init.
+ REPLACE_CND_BROADCAST=1
+ REPLACE_CND_DESTROY=1
+ REPLACE_CND_SIGNAL=1
+ REPLACE_CND_TIMEDWAIT=1
+ REPLACE_CND_WAIT=1
+ ;;
+ esac
+])
--- /dev/null
+# mtx.m4 serial 1
+dnl Copyright (C) 2024 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.
+
+AC_DEFUN([gl_FUNC_MTX_INIT],
+[
+ AC_REQUIRE([gl_THREADS_H])
+ gl_CHECK_FUNCS_ANDROID([mtx_init], [[#include <threads.h>]])
+ case "$gl_cv_onwards_func_mtx_init" in
+ future*)
+ REPLACE_MTX_INIT=1
+ dnl Assume that the other mtx_* functions are introduced at the same time
+ dnl as mtx_init.
+ REPLACE_MTX_DESTROY=1
+ REPLACE_MTX_LOCK=1
+ REPLACE_MTX_TIMEDLOCK=1
+ REPLACE_MTX_TRYLOCK=1
+ REPLACE_MTX_UNLOCK=1
+ ;;
+ esac
+])
-# thrd.m4 serial 4
-dnl Copyright (C) 2019-2023 Free Software Foundation, Inc.
+# thrd.m4 serial 4.1
+dnl Copyright (C) 2019-2024 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.
+AC_DEFUN([gl_FUNC_THRD_CREATE],
+[
+ AC_REQUIRE([gl_THREADS_H])
+ gl_CHECK_FUNCS_ANDROID([thrd_create], [[#include <threads.h>]])
+ case "$gl_cv_onwards_func_thrd_create" in
+ future*)
+ REPLACE_THRD_CREATE=1
+ dnl Assume that the other thrd_* functions are introduced at the same time
+ dnl as thrd_create.
+ REPLACE_THRD_CURRENT=1
+ REPLACE_THRD_DETACH=1
+ REPLACE_THRD_EQUAL=1
+ REPLACE_THRD_EXIT=1
+ REPLACE_THRD_JOIN=1
+ REPLACE_THRD_SLEEP=1
+ REPLACE_THRD_YIELD=1
+ ;;
+ esac
+])
+
AC_DEFUN([gl_FUNC_THRD_JOIN],
[
AC_REQUIRE([gl_THREADS_H])
-# threads_h.m4 serial 14
-dnl Copyright (C) 2019-2023 Free Software Foundation, Inc.
+# threads_h.m4 serial 14.1
+dnl Copyright (C) 2019-2024 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.
AC_DEFUN([gl_THREADS_H_DEFAULTS],
[
dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_THREAD_LOCAL=1; AC_SUBST([HAVE_THREAD_LOCAL])
- BROKEN_THRD_JOIN=0; AC_SUBST([BROKEN_THRD_JOIN])
- BROKEN_THRD_START_T=0; AC_SUBST([BROKEN_THRD_START_T])
- REPLACE_THRD_CREATE=0; AC_SUBST([REPLACE_THRD_CREATE])
- REPLACE_THRD_CURRENT=0; AC_SUBST([REPLACE_THRD_CURRENT])
- REPLACE_THRD_DETACH=0; AC_SUBST([REPLACE_THRD_DETACH])
- REPLACE_THRD_EQUAL=0; AC_SUBST([REPLACE_THRD_EQUAL])
- REPLACE_THRD_EXIT=0; AC_SUBST([REPLACE_THRD_EXIT])
- REPLACE_THRD_JOIN=0; AC_SUBST([REPLACE_THRD_JOIN])
+ HAVE_THREAD_LOCAL=1; AC_SUBST([HAVE_THREAD_LOCAL])
+ BROKEN_THRD_JOIN=0; AC_SUBST([BROKEN_THRD_JOIN])
+ BROKEN_THRD_START_T=0; AC_SUBST([BROKEN_THRD_START_T])
+ REPLACE_CALL_ONCE=0; AC_SUBST([REPLACE_CALL_ONCE])
+ REPLACE_CND_BROADCAST=0; AC_SUBST([REPLACE_CND_BROADCAST])
+ REPLACE_CND_DESTROY=0; AC_SUBST([REPLACE_CND_DESTROY])
+ REPLACE_CND_INIT=0; AC_SUBST([REPLACE_CND_INIT])
+ REPLACE_CND_SIGNAL=0; AC_SUBST([REPLACE_CND_SIGNAL])
+ REPLACE_CND_TIMEDWAIT=0; AC_SUBST([REPLACE_CND_TIMEDWAIT])
+ REPLACE_CND_WAIT=0; AC_SUBST([REPLACE_CND_WAIT])
+ REPLACE_MTX_DESTROY=0; AC_SUBST([REPLACE_MTX_DESTROY])
+ REPLACE_MTX_INIT=0; AC_SUBST([REPLACE_MTX_INIT])
+ REPLACE_MTX_LOCK=0; AC_SUBST([REPLACE_MTX_LOCK])
+ REPLACE_MTX_TIMEDLOCK=0; AC_SUBST([REPLACE_MTX_TIMEDLOCK])
+ REPLACE_MTX_TRYLOCK=0; AC_SUBST([REPLACE_MTX_TRYLOCK])
+ REPLACE_MTX_UNLOCK=0; AC_SUBST([REPLACE_MTX_UNLOCK])
+ REPLACE_THRD_CREATE=0; AC_SUBST([REPLACE_THRD_CREATE])
+ REPLACE_THRD_CURRENT=0; AC_SUBST([REPLACE_THRD_CURRENT])
+ REPLACE_THRD_DETACH=0; AC_SUBST([REPLACE_THRD_DETACH])
+ REPLACE_THRD_EQUAL=0; AC_SUBST([REPLACE_THRD_EQUAL])
+ REPLACE_THRD_EXIT=0; AC_SUBST([REPLACE_THRD_EXIT])
+ REPLACE_THRD_JOIN=0; AC_SUBST([REPLACE_THRD_JOIN])
+ REPLACE_THRD_SLEEP=0; AC_SUBST([REPLACE_THRD_SLEEP])
+ REPLACE_THRD_YIELD=0; AC_SUBST([REPLACE_THRD_YIELD])
+ REPLACE_TSS_CREATE=0; AC_SUBST([REPLACE_TSS_CREATE])
+ REPLACE_TSS_DELETE=0; AC_SUBST([REPLACE_TSS_DELETE])
+ REPLACE_TSS_GET=0; AC_SUBST([REPLACE_TSS_GET])
+ REPLACE_TSS_SET=0; AC_SUBST([REPLACE_TSS_SET])
])
--- /dev/null
+# tss.m4 serial 1
+dnl Copyright (C) 2024 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.
+
+AC_DEFUN([gl_FUNC_TSS_CREATE],
+[
+ AC_REQUIRE([gl_THREADS_H])
+ gl_CHECK_FUNCS_ANDROID([tss_create], [[#include <threads.h>]])
+ case "$gl_cv_onwards_func_tss_create" in
+ future*)
+ REPLACE_TSS_CREATE=1
+ dnl Assume that the other tss_* functions are introduced at the same time
+ dnl as tss_create.
+ REPLACE_TSS_DELETE=1
+ REPLACE_TSS_GET=1
+ REPLACE_TSS_SET=1
+ ;;
+ esac
+])
Files:
lib/call_once.c
+m4/call_once.m4
Depends-on:
threads-h
configure.ac:
AC_REQUIRE([gl_THREADS_H])
-gl_CONDITIONAL([GL_COND_OBJ_CALL_ONCE], [test $HAVE_THREADS_H = 0])
+gl_FUNC_CALL_ONCE
+gl_CONDITIONAL([GL_COND_OBJ_CALL_ONCE],
+ [test $HAVE_THREADS_H = 0 || test $REPLACE_CALL_ONCE = 1])
gl_THREADS_MODULE_INDICATOR([call_once])
Makefile.am:
Files:
lib/cnd.c
+m4/cnd.m4
Depends-on:
threads-h
configure.ac:
AC_REQUIRE([gl_THREADS_H])
-gl_CONDITIONAL([GL_COND_OBJ_CND], [test $HAVE_THREADS_H = 0])
+gl_FUNC_CND_INIT
+gl_CONDITIONAL([GL_COND_OBJ_CND],
+ [test $HAVE_THREADS_H = 0 || test $REPLACE_CND_INIT = 1])
gl_THREADS_MODULE_INDICATOR([cnd])
Makefile.am:
Files:
lib/mtx.c
+m4/mtx.m4
Depends-on:
threads-h
configure.ac:
AC_REQUIRE([gl_THREADS_H])
-gl_CONDITIONAL([GL_COND_OBJ_MTX], [test $HAVE_THREADS_H = 0])
+gl_FUNC_MTX_INIT
+gl_CONDITIONAL([GL_COND_OBJ_MTX],
+ [test $HAVE_THREADS_H = 0 || test $REPLACE_MTX_INIT = 1])
gl_THREADS_MODULE_INDICATOR([mtx])
Makefile.am:
configure.ac:
AC_REQUIRE([gl_THREADS_H])
+gl_FUNC_THRD_CREATE
gl_FUNC_THRD_JOIN
gl_CONDITIONAL([GL_COND_OBJ_THRD],
[test $HAVE_THREADS_H = 0 || test $REPLACE_THRD_CREATE = 1 || test $REPLACE_THRD_JOIN = 1])
-e 's|@''HAVE_THREAD_LOCAL''@|$(HAVE_THREAD_LOCAL)|g' \
-e 's|@''BROKEN_THRD_JOIN''@|$(BROKEN_THRD_JOIN)|g' \
-e 's|@''BROKEN_THRD_START_T''@|$(BROKEN_THRD_START_T)|g' \
+ -e 's|@''REPLACE_CALL_ONCE''@|$(REPLACE_CALL_ONCE)|g' \
+ -e 's|@''REPLACE_CND_BROADCAST''@|$(REPLACE_CND_BROADCAST)|g' \
+ -e 's|@''REPLACE_CND_DESTROY''@|$(REPLACE_CND_DESTROY)|g' \
+ -e 's|@''REPLACE_CND_INIT''@|$(REPLACE_CND_INIT)|g' \
+ -e 's|@''REPLACE_CND_SIGNAL''@|$(REPLACE_CND_SIGNAL)|g' \
+ -e 's|@''REPLACE_CND_TIMEDWAIT''@|$(REPLACE_CND_TIMEDWAIT)|g' \
+ -e 's|@''REPLACE_CND_WAIT''@|$(REPLACE_CND_WAIT)|g' \
+ -e 's|@''REPLACE_MTX_DESTROY''@|$(REPLACE_MTX_DESTROY)|g' \
+ -e 's|@''REPLACE_MTX_INIT''@|$(REPLACE_MTX_INIT)|g' \
+ -e 's|@''REPLACE_MTX_LOCK''@|$(REPLACE_MTX_LOCK)|g' \
+ -e 's|@''REPLACE_MTX_TIMEDLOCK''@|$(REPLACE_MTX_TIMEDLOCK)|g' \
+ -e 's|@''REPLACE_MTX_TRYLOCK''@|$(REPLACE_MTX_TRYLOCK)|g' \
+ -e 's|@''REPLACE_MTX_UNLOCK''@|$(REPLACE_MTX_UNLOCK)|g' \
-e 's|@''REPLACE_THRD_CREATE''@|$(REPLACE_THRD_CREATE)|g' \
-e 's|@''REPLACE_THRD_CURRENT''@|$(REPLACE_THRD_CURRENT)|g' \
-e 's|@''REPLACE_THRD_DETACH''@|$(REPLACE_THRD_DETACH)|g' \
-e 's|@''REPLACE_THRD_EQUAL''@|$(REPLACE_THRD_EQUAL)|g' \
-e 's|@''REPLACE_THRD_EXIT''@|$(REPLACE_THRD_EXIT)|g' \
-e 's|@''REPLACE_THRD_JOIN''@|$(REPLACE_THRD_JOIN)|g' \
+ -e 's|@''REPLACE_THRD_SLEEP''@|$(REPLACE_THRD_SLEEP)|g' \
+ -e 's|@''REPLACE_THRD_YIELD''@|$(REPLACE_THRD_YIELD)|g' \
+ -e 's|@''REPLACE_TSS_CREATE''@|$(REPLACE_TSS_CREATE)|g' \
+ -e 's|@''REPLACE_TSS_DELETE''@|$(REPLACE_TSS_DELETE)|g' \
+ -e 's|@''REPLACE_TSS_GET''@|$(REPLACE_TSS_GET)|g' \
+ -e 's|@''REPLACE_TSS_SET''@|$(REPLACE_TSS_SET)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _Noreturn/r $(_NORETURN_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
Files:
lib/tss.c
+m4/tss.m4
Depends-on:
threads-h
configure.ac:
AC_REQUIRE([gl_THREADS_H])
-gl_CONDITIONAL([GL_COND_OBJ_TSS], [test $HAVE_THREADS_H = 0])
+gl_FUNC_TSS_CREATE
+gl_CONDITIONAL([GL_COND_OBJ_TSS],
+ [test $HAVE_THREADS_H = 0 || test $REPLACE_TSS_CREATE = 1])
gl_THREADS_MODULE_INDICATOR([tss])
Makefile.am: