Po Lu wrote:
> this new release of the Android NDK

Thanks for notifying us about it. In the NDK r26, I see new functions
were added at the Android levels 30, 31, 32, 33, 34.

At level 30 the added functions are:

<pthread.h>
pthread_cond_clockwait
pthread_mutex_clocklock
pthread_rwlock_clockrdlock
pthread_rwlock_clockwrlock

<threads.h>
call_once
cnd_broadcast
cnd_destroy
cnd_init
cnd_signal
cnd_timedwait
cnd_wait
mtx_destroy
mtx_init
mtx_lock
mtx_timedlock
mtx_trylock
mtx_unlock
thrd_create
thrd_current
thrd_detach
thrd_equal
thrd_exit
thrd_join
thrd_sleep
thrd_yield
tss_create
tss_delete
tss_get
tss_set

<stdio.h>
renameat2

<sys/stat.h>
statx

<sys/mman.h>
mlock2
memfd_create

<sys/semaphore.h>
sem_clockwait


The added functions in <threads.h> need code changes in Gnulib. Namely, when
a user compiles a program with an NDK version < 21, <threads.h> and all the
threads.h functions are missing, and the Gnulib replacements need to have
function names prefixed with rpl_ (to avoid problems when the program is run
on a machine that has these functions defined in libc).

When the NDK version is ≥ 21 but the Android API level is < 30, these functions
are defined as inline functions in the Android libc header files, and Gnulib
does not activate its replacements.

For the other ones, only documentation tweaks are needed.


2024-01-25  Bruno Haible  <[email protected]>

        Resolve conflicts for functions introduced in Android API level 30.

        * doc/glibc-functions/memfd_create.texi: Mention the Android API levels.
        * doc/glibc-functions/mlock2.texi: Likewise.
        * doc/glibc-functions/pthread_cond_clockwait.texi: Likewise.
        * doc/glibc-functions/pthread_mutex_clocklock.texi: Likewise.
        * doc/glibc-functions/pthread_rwlock_clockrdlock.texi: Likewise.
        * doc/glibc-functions/pthread_rwlock_clockwrlock.texi: Likewise.
        * doc/glibc-functions/renameat2.texi: Likewise.
        * doc/glibc-functions/sem_clockwait.texi: Likewise.
        * doc/glibc-functions/statx.texi: Likewise.

        * 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.
>From f6b7fae65d86bdd1d401c08b1b591e0f88f1ea23 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Thu, 25 Jan 2024 20:15:10 +0100
Subject: [PATCH 1/2] 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.
---
 ChangeLog                              |  77 ++++++++
 doc/posix-functions/call_once.texi     |   2 +-
 doc/posix-functions/cnd_broadcast.texi |   2 +-
 doc/posix-functions/cnd_destroy.texi   |   2 +-
 doc/posix-functions/cnd_init.texi      |   2 +-
 doc/posix-functions/cnd_signal.texi    |   2 +-
 doc/posix-functions/cnd_timedwait.texi |   2 +-
 doc/posix-functions/cnd_wait.texi      |   2 +-
 doc/posix-functions/mtx_destroy.texi   |   2 +-
 doc/posix-functions/mtx_init.texi      |   2 +-
 doc/posix-functions/mtx_lock.texi      |   2 +-
 doc/posix-functions/mtx_timedlock.texi |   2 +-
 doc/posix-functions/mtx_trylock.texi   |   2 +-
 doc/posix-functions/mtx_unlock.texi    |   2 +-
 doc/posix-functions/thrd_create.texi   |   2 +-
 doc/posix-functions/thrd_current.texi  |   2 +-
 doc/posix-functions/thrd_detach.texi   |   2 +-
 doc/posix-functions/thrd_equal.texi    |   2 +-
 doc/posix-functions/thrd_exit.texi     |   2 +-
 doc/posix-functions/thrd_join.texi     |   2 +-
 doc/posix-functions/thrd_sleep.texi    |   2 +-
 doc/posix-functions/thrd_yield.texi    |   2 +-
 doc/posix-functions/tss_create.texi    |   2 +-
 doc/posix-functions/tss_delete.texi    |   2 +-
 doc/posix-functions/tss_get.texi       |   2 +-
 doc/posix-functions/tss_set.texi       |   2 +-
 lib/threads.in.h                       | 238 +++++++++++++++++++++----
 m4/call_once.m4                        |  16 ++
 m4/cnd.m4                              |  24 +++
 m4/mtx.m4                              |  23 +++
 m4/thrd.m4                             |  22 ++-
 m4/threads_h.m4                        |  39 ++--
 m4/tss.m4                              |  21 +++
 modules/call_once                      |   5 +-
 modules/cnd                            |   5 +-
 modules/mtx                            |   5 +-
 modules/thrd                           |   1 +
 modules/threads-h                      |  19 ++
 modules/tss                            |   5 +-
 39 files changed, 471 insertions(+), 79 deletions(-)
 create mode 100644 m4/call_once.m4
 create mode 100644 m4/cnd.m4
 create mode 100644 m4/mtx.m4
 create mode 100644 m4/tss.m4

diff --git a/ChangeLog b/ChangeLog
index 110ac01f14..39bb69bb4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,80 @@
+2024-01-25  Bruno Haible  <[email protected]>
+
+	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  <[email protected]>
 
 	readutmp, boot-time: Port to Android NDK r26.
diff --git a/doc/posix-functions/call_once.texi b/doc/posix-functions/call_once.texi
index 5728740372..5f01303062 100644
--- a/doc/posix-functions/call_once.texi
+++ b/doc/posix-functions/call_once.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/cnd_broadcast.texi b/doc/posix-functions/cnd_broadcast.texi
index 218c9c6a7c..0eb7a8baf9 100644
--- a/doc/posix-functions/cnd_broadcast.texi
+++ b/doc/posix-functions/cnd_broadcast.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/cnd_destroy.texi b/doc/posix-functions/cnd_destroy.texi
index 9f82abc0af..9f6dd89a02 100644
--- a/doc/posix-functions/cnd_destroy.texi
+++ b/doc/posix-functions/cnd_destroy.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/cnd_init.texi b/doc/posix-functions/cnd_init.texi
index 044e34c638..d0a98eae31 100644
--- a/doc/posix-functions/cnd_init.texi
+++ b/doc/posix-functions/cnd_init.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/cnd_signal.texi b/doc/posix-functions/cnd_signal.texi
index 319178987a..b7c16aedf0 100644
--- a/doc/posix-functions/cnd_signal.texi
+++ b/doc/posix-functions/cnd_signal.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/cnd_timedwait.texi b/doc/posix-functions/cnd_timedwait.texi
index 1a70edfaca..61f63f1d3e 100644
--- a/doc/posix-functions/cnd_timedwait.texi
+++ b/doc/posix-functions/cnd_timedwait.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/cnd_wait.texi b/doc/posix-functions/cnd_wait.texi
index 6b1ccb535a..14513bd934 100644
--- a/doc/posix-functions/cnd_wait.texi
+++ b/doc/posix-functions/cnd_wait.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/mtx_destroy.texi b/doc/posix-functions/mtx_destroy.texi
index c2136a27d5..77768ba7dd 100644
--- a/doc/posix-functions/mtx_destroy.texi
+++ b/doc/posix-functions/mtx_destroy.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/mtx_init.texi b/doc/posix-functions/mtx_init.texi
index e7497122f7..191764d648 100644
--- a/doc/posix-functions/mtx_init.texi
+++ b/doc/posix-functions/mtx_init.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/mtx_lock.texi b/doc/posix-functions/mtx_lock.texi
index 8d78b5d4e5..2b7ec899fb 100644
--- a/doc/posix-functions/mtx_lock.texi
+++ b/doc/posix-functions/mtx_lock.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/mtx_timedlock.texi b/doc/posix-functions/mtx_timedlock.texi
index 38f8517fd9..9ea7a913eb 100644
--- a/doc/posix-functions/mtx_timedlock.texi
+++ b/doc/posix-functions/mtx_timedlock.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/mtx_trylock.texi b/doc/posix-functions/mtx_trylock.texi
index 718c0d814f..3ff87ee9e8 100644
--- a/doc/posix-functions/mtx_trylock.texi
+++ b/doc/posix-functions/mtx_trylock.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/mtx_unlock.texi b/doc/posix-functions/mtx_unlock.texi
index a6ab90a00f..3a05477c9f 100644
--- a/doc/posix-functions/mtx_unlock.texi
+++ b/doc/posix-functions/mtx_unlock.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/thrd_create.texi b/doc/posix-functions/thrd_create.texi
index 4c85b26f81..f9b25fbfac 100644
--- a/doc/posix-functions/thrd_create.texi
+++ b/doc/posix-functions/thrd_create.texi
@@ -16,7 +16,7 @@
 @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.
diff --git a/doc/posix-functions/thrd_current.texi b/doc/posix-functions/thrd_current.texi
index 4f2097e254..388ba97df4 100644
--- a/doc/posix-functions/thrd_current.texi
+++ b/doc/posix-functions/thrd_current.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/thrd_detach.texi b/doc/posix-functions/thrd_detach.texi
index 201190eb13..9e8979e0e9 100644
--- a/doc/posix-functions/thrd_detach.texi
+++ b/doc/posix-functions/thrd_detach.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/thrd_equal.texi b/doc/posix-functions/thrd_equal.texi
index f2ba54b2a1..c44950f6fc 100644
--- a/doc/posix-functions/thrd_equal.texi
+++ b/doc/posix-functions/thrd_equal.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/thrd_exit.texi b/doc/posix-functions/thrd_exit.texi
index d212ce8d50..3a3e83e035 100644
--- a/doc/posix-functions/thrd_exit.texi
+++ b/doc/posix-functions/thrd_exit.texi
@@ -16,7 +16,7 @@
 @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.
diff --git a/doc/posix-functions/thrd_join.texi b/doc/posix-functions/thrd_join.texi
index 06c4ce9f7f..36f03adab3 100644
--- a/doc/posix-functions/thrd_join.texi
+++ b/doc/posix-functions/thrd_join.texi
@@ -16,7 +16,7 @@
 @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.
diff --git a/doc/posix-functions/thrd_sleep.texi b/doc/posix-functions/thrd_sleep.texi
index 6d75427f85..3d2abb5efa 100644
--- a/doc/posix-functions/thrd_sleep.texi
+++ b/doc/posix-functions/thrd_sleep.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/thrd_yield.texi b/doc/posix-functions/thrd_yield.texi
index 4b715455d7..458888afb1 100644
--- a/doc/posix-functions/thrd_yield.texi
+++ b/doc/posix-functions/thrd_yield.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/tss_create.texi b/doc/posix-functions/tss_create.texi
index 2eb6596833..cf5049cdef 100644
--- a/doc/posix-functions/tss_create.texi
+++ b/doc/posix-functions/tss_create.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/tss_delete.texi b/doc/posix-functions/tss_delete.texi
index 046d2ddfa7..700db8281a 100644
--- a/doc/posix-functions/tss_delete.texi
+++ b/doc/posix-functions/tss_delete.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/tss_get.texi b/doc/posix-functions/tss_get.texi
index 34cc36ebd2..4c425967c1 100644
--- a/doc/posix-functions/tss_get.texi
+++ b/doc/posix-functions/tss_get.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/doc/posix-functions/tss_set.texi b/doc/posix-functions/tss_set.texi
index b973e2ef18..7cf6bd7902 100644
--- a/doc/posix-functions/tss_set.texi
+++ b/doc/posix-functions/tss_set.texi
@@ -16,7 +16,7 @@
 @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:
diff --git a/lib/threads.in.h b/lib/threads.in.h
index 1e45700427..06bc9b78df 100644
--- a/lib/threads.in.h
+++ b/lib/threads.in.h
@@ -225,13 +225,24 @@ _GL_WARN_ON_USE (thrd_equal, "thrd_equal is unportable - "
 #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
@@ -242,10 +253,18 @@ _GL_WARN_ON_USE (thrd_sleep, "thrd_sleep is unportable - "
 #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
@@ -367,10 +386,18 @@ typedef pthread_mutex_t mtx_t;
 #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
@@ -381,10 +408,18 @@ _GL_WARN_ON_USE (mtx_init, "mtx_init is unportable - "
 #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
@@ -395,10 +430,18 @@ _GL_WARN_ON_USE (mtx_lock, "mtx_lock is unportable - "
 #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
@@ -409,11 +452,20 @@ _GL_WARN_ON_USE (mtx_trylock, "mtx_trylock is unportable - "
 #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
@@ -424,10 +476,18 @@ _GL_WARN_ON_USE (mtx_timedlock, "mtx_timedlock is unportable - "
 #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
@@ -438,10 +498,18 @@ _GL_WARN_ON_USE (mtx_unlock, "mtx_unlock is unportable - "
 #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
@@ -476,17 +544,26 @@ typedef pthread_once_t once_flag;
 #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
 
@@ -512,10 +589,18 @@ typedef pthread_cond_t cnd_t;
 #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
@@ -526,10 +611,18 @@ _GL_WARN_ON_USE (cnd_init, "cnd_init is unportable - "
 #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
@@ -540,13 +633,24 @@ _GL_WARN_ON_USE (cnd_wait, "cnd_wait is unportable - "
 #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
@@ -557,10 +661,18 @@ _GL_WARN_ON_USE (cnd_timedwait, "cnd_timedwait is unportable - "
 #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
@@ -571,10 +683,18 @@ _GL_WARN_ON_USE (cnd_signal, "cnd_signal is unportable - "
 #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
@@ -585,10 +705,18 @@ _GL_WARN_ON_USE (cnd_broadcast, "cnd_broadcast is unportable - "
 #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
@@ -637,10 +765,18 @@ typedef void (*tss_dtor_t) (void *);
 #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
@@ -651,10 +787,18 @@ _GL_WARN_ON_USE (tss_create, "tss_create is unportable - "
 #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
@@ -665,10 +809,18 @@ _GL_WARN_ON_USE (tss_set, "tss_set is unportable - "
 #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
@@ -679,10 +831,18 @@ _GL_WARN_ON_USE (tss_get, "tss_get is unportable - "
 #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
diff --git a/m4/call_once.m4 b/m4/call_once.m4
new file mode 100644
index 0000000000..160e8f95cf
--- /dev/null
+++ b/m4/call_once.m4
@@ -0,0 +1,16 @@
+# 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
+])
diff --git a/m4/cnd.m4 b/m4/cnd.m4
new file mode 100644
index 0000000000..ecc6f87a75
--- /dev/null
+++ b/m4/cnd.m4
@@ -0,0 +1,24 @@
+# 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
+])
+
diff --git a/m4/mtx.m4 b/m4/mtx.m4
new file mode 100644
index 0000000000..e446f7510f
--- /dev/null
+++ b/m4/mtx.m4
@@ -0,0 +1,23 @@
+# 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
+])
diff --git a/m4/thrd.m4 b/m4/thrd.m4
index 1745ee97d5..0bae4b1c52 100644
--- a/m4/thrd.m4
+++ b/m4/thrd.m4
@@ -1,9 +1,29 @@
-# thrd.m4 serial 5
+# thrd.m4 serial 6
 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])
diff --git a/m4/threads_h.m4 b/m4/threads_h.m4
index e1ed1a1444..c76a7d87a1 100644
--- a/m4/threads_h.m4
+++ b/m4/threads_h.m4
@@ -1,4 +1,4 @@
-# threads_h.m4 serial 15
+# threads_h.m4 serial 16
 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,
@@ -209,13 +209,32 @@ AC_DEFUN([gl_THREADS_H_REQUIRE_DEFAULTS]
 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])
 ])
diff --git a/m4/tss.m4 b/m4/tss.m4
new file mode 100644
index 0000000000..fb82b5e5d0
--- /dev/null
+++ b/m4/tss.m4
@@ -0,0 +1,21 @@
+# 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
+])
diff --git a/modules/call_once b/modules/call_once
index 3efc3f3736..c48847a54b 100644
--- a/modules/call_once
+++ b/modules/call_once
@@ -3,6 +3,7 @@ call_once() function: ISO C 11 once-only initialization.
 
 Files:
 lib/call_once.c
+m4/call_once.m4
 
 Depends-on:
 threads-h
@@ -10,7 +11,9 @@ windows-once
 
 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:
diff --git a/modules/cnd b/modules/cnd
index cb4ec4a5bd..0b14931cc4 100644
--- a/modules/cnd
+++ b/modules/cnd
@@ -3,6 +3,7 @@ ISO C 11 condition variable functions.
 
 Files:
 lib/cnd.c
+m4/cnd.m4
 
 Depends-on:
 threads-h
@@ -11,7 +12,9 @@ gettimeofday
 
 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:
diff --git a/modules/mtx b/modules/mtx
index e5da0413db..3e4ca38b0e 100644
--- a/modules/mtx
+++ b/modules/mtx
@@ -3,6 +3,7 @@ ISO C 11 mutex functions.
 
 Files:
 lib/mtx.c
+m4/mtx.m4
 
 Depends-on:
 threads-h
@@ -14,7 +15,9 @@ windows-timedrecmutex
 
 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:
diff --git a/modules/thrd b/modules/thrd
index cbb98f9491..e007ccd8bf 100644
--- a/modules/thrd
+++ b/modules/thrd
@@ -12,6 +12,7 @@ nanosleep
 
 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])
diff --git a/modules/threads-h b/modules/threads-h
index 8e9da83eee..b9e483e693 100644
--- a/modules/threads-h
+++ b/modules/threads-h
@@ -58,12 +58,31 @@ threads.h: threads.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(_NORETURN_H
 	      -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)' \
diff --git a/modules/tss b/modules/tss
index 8cdb448f23..efd95b0f15 100644
--- a/modules/tss
+++ b/modules/tss
@@ -3,6 +3,7 @@ ISO C 11 thread-specific storage functions.
 
 Files:
 lib/tss.c
+m4/tss.m4
 
 Depends-on:
 threads-h
@@ -10,7 +11,9 @@ windows-tls
 
 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:
-- 
2.34.1

>From 3132f95f5f8612a66aa8c06e87b43bda37c02641 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Thu, 25 Jan 2024 20:17:33 +0100
Subject: [PATCH 2/2] Resolve conflicts for functions introduced in Android API
 level 30.

* doc/glibc-functions/memfd_create.texi: Mention the Android API levels.
* doc/glibc-functions/mlock2.texi: Likewise.
* doc/glibc-functions/pthread_cond_clockwait.texi: Likewise.
* doc/glibc-functions/pthread_mutex_clocklock.texi: Likewise.
* doc/glibc-functions/pthread_rwlock_clockrdlock.texi: Likewise.
* doc/glibc-functions/pthread_rwlock_clockwrlock.texi: Likewise.
* doc/glibc-functions/renameat2.texi: Likewise.
* doc/glibc-functions/sem_clockwait.texi: Likewise.
* doc/glibc-functions/statx.texi: Likewise.
---
 ChangeLog                                           | 10 ++++++++++
 doc/glibc-functions/memfd_create.texi               |  2 +-
 doc/glibc-functions/mlock2.texi                     |  4 ++--
 doc/glibc-functions/pthread_cond_clockwait.texi     |  4 ++--
 doc/glibc-functions/pthread_mutex_clocklock.texi    |  4 ++--
 doc/glibc-functions/pthread_rwlock_clockrdlock.texi |  4 ++--
 doc/glibc-functions/pthread_rwlock_clockwrlock.texi |  4 ++--
 doc/glibc-functions/renameat2.texi                  |  4 ++--
 doc/glibc-functions/sem_clockwait.texi              |  4 ++--
 doc/glibc-functions/statx.texi                      |  4 ++--
 10 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 39bb69bb4e..0500ac1751 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,16 @@
 
 	Resolve conflicts for functions introduced in Android API level 30.
 
+	* doc/glibc-functions/memfd_create.texi: Mention the Android API levels.
+	* doc/glibc-functions/mlock2.texi: Likewise.
+	* doc/glibc-functions/pthread_cond_clockwait.texi: Likewise.
+	* doc/glibc-functions/pthread_mutex_clocklock.texi: Likewise.
+	* doc/glibc-functions/pthread_rwlock_clockrdlock.texi: Likewise.
+	* doc/glibc-functions/pthread_rwlock_clockwrlock.texi: Likewise.
+	* doc/glibc-functions/renameat2.texi: Likewise.
+	* doc/glibc-functions/sem_clockwait.texi: Likewise.
+	* doc/glibc-functions/statx.texi: Likewise.
+
 	* lib/threads.in.h (thrd_sleep): Consider REPLACE_THRD_SLEEP.
 	(thrd_yield): Consider REPLACE_THRD_YIELD.
 	(mtx_init): Consider REPLACE_MTX_INIT.
diff --git a/doc/glibc-functions/memfd_create.texi b/doc/glibc-functions/memfd_create.texi
index b3852a5b55..0192869dae 100644
--- a/doc/glibc-functions/memfd_create.texi
+++ b/doc/glibc-functions/memfd_create.texi
@@ -26,5 +26,5 @@
 @item
 This function exists only on Linux and FreeBSD and is therefore
 missing on many non-glibc platforms:
-glibc 2.26, macOS 11.1, FreeBSD 12.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+glibc 2.26, macOS 11.1, FreeBSD 12.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
 @end itemize
diff --git a/doc/glibc-functions/mlock2.texi b/doc/glibc-functions/mlock2.texi
index 697b4877f8..88826f411f 100644
--- a/doc/glibc-functions/mlock2.texi
+++ b/doc/glibc-functions/mlock2.texi
@@ -25,6 +25,6 @@
 @itemize
 @item
 This function exists only on Linux and is therefore
-missing on all non-glibc platforms:
-glibc 2.26, macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+missing on many platforms:
+glibc 2.26, macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
 @end itemize
diff --git a/doc/glibc-functions/pthread_cond_clockwait.texi b/doc/glibc-functions/pthread_cond_clockwait.texi
index 9c3eabc53f..95c2d22bfe 100644
--- a/doc/glibc-functions/pthread_cond_clockwait.texi
+++ b/doc/glibc-functions/pthread_cond_clockwait.texi
@@ -22,6 +22,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+This function is missing on many platforms:
+macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
 @end itemize
diff --git a/doc/glibc-functions/pthread_mutex_clocklock.texi b/doc/glibc-functions/pthread_mutex_clocklock.texi
index 466c9f720c..06dd84c8a8 100644
--- a/doc/glibc-functions/pthread_mutex_clocklock.texi
+++ b/doc/glibc-functions/pthread_mutex_clocklock.texi
@@ -13,6 +13,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+This function is missing on many platforms:
+macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
 @end itemize
diff --git a/doc/glibc-functions/pthread_rwlock_clockrdlock.texi b/doc/glibc-functions/pthread_rwlock_clockrdlock.texi
index efde9e68c9..5c5ba934f8 100644
--- a/doc/glibc-functions/pthread_rwlock_clockrdlock.texi
+++ b/doc/glibc-functions/pthread_rwlock_clockrdlock.texi
@@ -22,6 +22,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+This function is missing on many platforms:
+macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
 @end itemize
diff --git a/doc/glibc-functions/pthread_rwlock_clockwrlock.texi b/doc/glibc-functions/pthread_rwlock_clockwrlock.texi
index 01e47dc08e..a980c97d2a 100644
--- a/doc/glibc-functions/pthread_rwlock_clockwrlock.texi
+++ b/doc/glibc-functions/pthread_rwlock_clockwrlock.texi
@@ -22,6 +22,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+This function is missing on many platforms:
+macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
 @end itemize
diff --git a/doc/glibc-functions/renameat2.texi b/doc/glibc-functions/renameat2.texi
index b845a43a27..a59b797260 100644
--- a/doc/glibc-functions/renameat2.texi
+++ b/doc/glibc-functions/renameat2.texi
@@ -14,6 +14,6 @@
 @itemize
 @item
 This function exists only on Linux and is therefore
-missing on all non-glibc platforms:
-glibc 2.27, macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 1.7.x, mingw, MSVC 14, Android 9.0.
+missing on many platforms:
+glibc 2.27, macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 1.7.x, mingw, MSVC 14, Android API level 29.
 @end itemize
diff --git a/doc/glibc-functions/sem_clockwait.texi b/doc/glibc-functions/sem_clockwait.texi
index e846f3c2b3..8b418dfe8b 100644
--- a/doc/glibc-functions/sem_clockwait.texi
+++ b/doc/glibc-functions/sem_clockwait.texi
@@ -22,6 +22,6 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+This function is missing on many platforms:
+macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
 @end itemize
diff --git a/doc/glibc-functions/statx.texi b/doc/glibc-functions/statx.texi
index 0218e8bebb..cd32c608f4 100644
--- a/doc/glibc-functions/statx.texi
+++ b/doc/glibc-functions/statx.texi
@@ -13,8 +13,8 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-This function is missing on all non-glibc platforms:
-glibc 2.27, macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+This function is missing on many platforms:
+glibc 2.27, macOS 11.1, FreeBSD 14.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android API level 29.
 @item
 There is an incompatible function of the same name on some platforms:
 AIX 5.2 or newer.
-- 
2.34.1

Reply via email to