]> 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:09:49 +0000 (14:09 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:57:00 +0000 (15:57 +0100)
* m4/error_h.m4 (gl_ERROR_H): Conditionally set REPLACE_ERROR.
* lib/error.in.h (error): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/error.in.h
m4/error_h.m4

index 3f429d5afcf1fc24733228e3fa9c1cb9a085e314..496db94438873a4c7b9bff82cb50ae13fdcdc2b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 
        Resolve conflicts for functions introduced in Android API level 23.
 
+       * m4/error_h.m4 (gl_ERROR_H): Conditionally set REPLACE_ERROR.
+       * lib/error.in.h (error): Disable _GL_CXXALIASWARN invocation on
+       non-glibc systems.
+
        * lib/wchar.in.h (wmempcpy): Consider REPLACE_WMEMPCPY.
        * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMPCPY.
        * modules/wchar (Makefile.am): Substitute REPLACE_WMEMPCPY.
index 2ac99c28176c0cfdc24aa5ea04486b4eb60ab565..bfddb011c07f739da5be44cd372cd022e25e3106 100644 (file)
@@ -56,7 +56,9 @@ _GL_FUNCDECL_SYS (error, void,
 _GL_CXXALIAS_SYS (error, void,
                   (int __status, int __errnum, const char *__format, ...));
 #endif
+#if __GLIBC__ >= 2
 _GL_CXXALIASWARN (error);
+#endif
 
 /* Likewise.  If FILENAME is non-NULL, include FILENAME:LINENO: in the
    message.  */
index bb8f68ff8187893f01528a13c56a288bf250b9e4..15b5112309834ca7024c141199d9bb293c5d4235 100644 (file)
@@ -1,4 +1,4 @@
-# error_h.m4 serial 1
+# error_h.m4 serial 2
 dnl Copyright (C) 1996-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,
@@ -11,13 +11,17 @@ AC_DEFUN_ONCE([gl_ERROR_H],
 [
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
+  REPLACE_ERROR=0
+
   gl_CHECK_FUNCS_ANDROID([error], [[#include <error.h>]])
   if test $ac_cv_func_error = yes; then
     HAVE_ERROR=1
   else
     HAVE_ERROR=0
+    case "$gl_cv_onwards_func_error" in
+      future*) REPLACE_ERROR=1 ;;
+    esac
   fi
-  REPLACE_ERROR=0
 
   dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
   dnl maintained in Autoconf and because it invokes AC_LIBOBJ.