>From 3dfb81922f3c40795b047c4305cfa28cd60c3269 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 12:22:31 +0100 Subject: [PATCH 21/47] Resolve conflicts for functions introduced in Android API level 21. * m4/dprintf.m4 (gl_REPLACE_DPRINTF): Conditionally set REPLACE_DPRINTF. * lib/stdio.in.h (dprintf): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 4 ++++ lib/stdio.in.h | 2 ++ m4/dprintf.m4 | 8 ++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6f1cb08a0..ea0077fcbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Resolve conflicts for functions introduced in Android API level 21. + * m4/dprintf.m4 (gl_REPLACE_DPRINTF): Conditionally set REPLACE_DPRINTF. + * lib/stdio.in.h (dprintf): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Conditionally set REPLACE_DUPLOCALE. * m4/localename.m4 (gl_LOCALENAME): Conditionally set REPLACE_NEWLOCALE, diff --git a/lib/stdio.in.h b/lib/stdio.in.h index e3bd60dae1..3f8ea98533 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -210,7 +210,9 @@ _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF diff --git a/m4/dprintf.m4 b/m4/dprintf.m4 index 54c186620b..1ffed0d627 100644 --- a/m4/dprintf.m4 +++ b/m4/dprintf.m4 @@ -1,4 +1,4 @@ -# dprintf.m4 serial 2 +# dprintf.m4 serial 3 dnl Copyright (C) 2009-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, @@ -18,7 +18,11 @@ AC_DEFUN([gl_REPLACE_DPRINTF], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_LIBOBJ([dprintf]) - if test $ac_cv_func_dprintf = yes; then + if test $ac_cv_func_dprintf = yes \ + || case "$gl_cv_onwards_func_dprintf" in \ + future*) true ;; \ + *) false ;; \ + esac; then REPLACE_DPRINTF=1 fi gl_PREREQ_DPRINTF -- 2.34.1