]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 21.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 11:22:31 +0000 (12:22 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:56:35 +0000 (15:56 +0100)
* m4/dprintf.m4 (gl_REPLACE_DPRINTF): Conditionally set REPLACE_DPRINTF.
* lib/stdio.in.h (dprintf): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/stdio.in.h
m4/dprintf.m4

index a6f1cb08a0f3456bce218337f278afe5045bf9ac..ea0077fcbbec1f60cab1dc4b46c6deb54d3cb73e 100644 (file)
--- 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,
index e3bd60dae13b0100e3ed266bd7307b2a8efcde17..3f8ea985335fac66cedd886d6a37b3f3a27f9cc9 100644 (file)
@@ -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
index 54c186620b4c2eaff5fef2613c810da5380ff3f9..1ffed0d62704fc5ec6044c70b8d9305ccf58052d 100644 (file)
@@ -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