]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 23.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 13:11:49 +0000 (14:11 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:57:02 +0000 (15:57 +0100)
* 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
lib/string.in.h
m4/strerror_r.m4

index 496db94438873a4c7b9bff82cb50ae13fdcdc2b1..50cf6768b42403f7b1b49e45f135bc9dfabfa15c 100644 (file)
--- 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.
index 2e078aff4745aedeedbf50e7db981037b06fb8a2..aa088213927463075ed4085e2e5ad9a79b132532 100644 (file)
@@ -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
index 358fc07bfdac4e0e16a6326ae09bb831c86085b8..d790ba877575c21803137e277d6f206bf0233811 100644 (file)
@@ -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
 ])