From: Bruno Haible Date: Sun, 22 Jan 2023 11:22:31 +0000 (+0100) Subject: Resolve conflicts for functions introduced in Android API level 21. X-Git-Tag: v1.0~1768 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3dfb81922f3c40795b047c4305cfa28cd60c3269;p=gnulib.git 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. --- 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