>From 11525f6203e65c4828f9f643a80916586ec07ed1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 14:11:49 +0100 Subject: [PATCH 33/47] Resolve conflicts for functions introduced in Android API level 23. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Conditionally set REPLACE_STRERROR_R. * lib/string.in.h (strerror_r): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 5 +++++ lib/string.in.h | 2 +- m4/strerror_r.m4 | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 496db94438..50cf6768b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ Resolve conflicts for functions introduced in Android API level 23. + * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Conditionally set + REPLACE_STRERROR_R. + * lib/string.in.h (strerror_r): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + * m4/error_h.m4 (gl_ERROR_H): Conditionally set REPLACE_ERROR. * lib/error.in.h (error): Disable _GL_CXXALIASWARN invocation on non-glibc systems. diff --git a/lib/string.in.h b/lib/string.in.h index 2e078aff47..aa08821392 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -1244,7 +1244,7 @@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) # endif _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); # endif -# if @HAVE_DECL_STRERROR_R@ +# if __GLIBC__ >= 2 && @HAVE_DECL_STRERROR_R@ _GL_CXXALIASWARN (strerror_r); # endif #elif defined GNULIB_POSIXCHECK diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4 index 358fc07bfd..d790ba8775 100644 --- a/m4/strerror_r.m4 +++ b/m4/strerror_r.m4 @@ -1,4 +1,4 @@ -# strerror_r.m4 serial 25 +# strerror_r.m4 serial 26 dnl Copyright (C) 2002, 2007-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, @@ -172,5 +172,9 @@ changequote([,])dnl fi fi fi + else + case "$gl_cv_onwards_func_strerror_r" in + future*) REPLACE_STRERROR_R=1 ;; + esac fi ]) -- 2.34.1