>From 639d41bfee3a281ba226188cbc3255f642cf41a0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 12:36:45 +0100 Subject: [PATCH 26/47] Resolve conflicts for functions introduced in Android API level 21. * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Conditionally set REPLACE_MBSNRTOWCS. * lib/wchar.in.h (mbsnrtowcs): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 5 +++++ lib/wchar.in.h | 2 ++ m4/mbsnrtowcs.m4 | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5479a8685e..f8a57d2d70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ Resolve conflicts for functions introduced in Android API level 21. + * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Conditionally set + REPLACE_MBSNRTOWCS. + * lib/wchar.in.h (mbsnrtowcs): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + * m4/execvpe.m4 (gl_FUNC_EXECVPE): Conditionally set REPLACE_EXECVPE. * m4/linkat.m4 (gl_FUNC_LINKAT): Conditionally set REPLACE_LINKAT. * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Conditionally set diff --git a/lib/wchar.in.h b/lib/wchar.in.h index 09c9185f62..354709db52 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -441,7 +441,9 @@ _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, const char **restrict srcp, size_t srclen, size_t len, mbstate_t *restrict ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbsnrtowcs); +# endif #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS diff --git a/m4/mbsnrtowcs.m4 b/m4/mbsnrtowcs.m4 index 1b398c7ca7..34dcf30e63 100644 --- a/m4/mbsnrtowcs.m4 +++ b/m4/mbsnrtowcs.m4 @@ -1,4 +1,4 @@ -# mbsnrtowcs.m4 serial 7 +# mbsnrtowcs.m4 serial 8 dnl Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -17,6 +17,9 @@ AC_DEFUN([gl_FUNC_MBSNRTOWCS], gl_CHECK_FUNCS_ANDROID([mbsnrtowcs], [[#include ]]) if test $ac_cv_func_mbsnrtowcs = no; then HAVE_MBSNRTOWCS=0 + case "$gl_cv_onwards_func_mbsnrtowcs" in + future*) REPLACE_MBSNRTOWCS=1 ;; + esac else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSNRTOWCS=1 -- 2.34.1