]> 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:41:14 +0000 (12:41 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:56:49 +0000 (15:56 +0100)
* m4/fts.m4 (gl_FUNC_FTS_CORE): Use rpl_* symbols also when the system
will have fts_open in a future version.
* m4/iswblank.m4 (gl_FUNC_ISWBLANK): Conditionally set REPLACE_ISWBLANK.
* m4/mbtowc.m4 (gl_FUNC_MBTOWC): Conditionally set REPLACE_MBTOWC.
* m4/vdprintf.m4 (gl_REPLACE_VDPRINTF): Conditionally set
REPLACE_VDPRINTF.
* m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Conditionally set
REPLACE_WCSNRTOMBS.

ChangeLog
m4/fts.m4
m4/iswblank.m4
m4/mbtowc.m4
m4/vdprintf.m4
m4/wcsnrtombs.m4

index f8a57d2d70c12f9dd922d33d9578637744c9cc72..c00928615f9e32871effdc2bcf8fb266875888e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,15 @@
 
        Resolve conflicts for functions introduced in Android API level 21.
 
+       * m4/fts.m4 (gl_FUNC_FTS_CORE): Use rpl_* symbols also when the system
+       will have fts_open in a future version.
+       * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Conditionally set REPLACE_ISWBLANK.
+       * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Conditionally set REPLACE_MBTOWC.
+       * m4/vdprintf.m4 (gl_REPLACE_VDPRINTF): Conditionally set
+       REPLACE_VDPRINTF.
+       * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Conditionally set
+       REPLACE_WCSNRTOMBS.
+
        * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Conditionally set
        REPLACE_MBSNRTOWCS.
        * lib/wchar.in.h (mbsnrtowcs): Disable _GL_CXXALIASWARN invocation on
index eec034287cc05e29e9055d794a15750a2417d1a8..6f521f5141944d8aa0b0824a8f723c76db440d8d 100644 (file)
--- a/m4/fts.m4
+++ b/m4/fts.m4
@@ -1,4 +1,4 @@
-#serial 23
+#serial 24
 dnl Copyright (C) 2005-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,
@@ -30,8 +30,12 @@ AC_DEFUN([gl_FUNC_FTS_CORE],
   fi
 
   gl_CHECK_FUNCS_ANDROID([fts_open], [[#include <fts.h>]])
-  if test $ac_cv_func_fts_open = yes; then
-    dnl The system already has the symbols fts_open, etc.
+  if case "$gl_cv_onwards_func_fts_open" in \
+       yes | future*) true ;; \
+       *) false ;; \
+     esac; then
+    dnl The system already has the symbols fts_open, etc. or will have them
+    dnl in a future version.
     dnl Avoid conflicts between these symbols and ours at the linker level.
     AC_DEFINE([fts_open], [rpl_fts_open],
       [Define to the overridden function name])
index f3f96bb78446b54e805bbd9c488b00e8b5b525e4..b1220b1e936a6ed430988101ded1f66a6dd2a23c 100644 (file)
@@ -1,4 +1,4 @@
-# iswblank.m4 serial 6
+# iswblank.m4 serial 7
 dnl Copyright (C) 2011-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,
@@ -17,7 +17,11 @@ AC_DEFUN([gl_FUNC_ISWBLANK],
   ]])
   if test $ac_cv_func_iswblank = no; then
     HAVE_ISWBLANK=0
-    if test $ac_cv_have_decl_iswblank = yes; then
+    if test $ac_cv_have_decl_iswblank = yes \
+       || case "$gl_cv_onwards_func_iswblank" in \
+            future*) true ;; \
+            *) false ;; \
+          esac; then
       REPLACE_ISWBLANK=1
     fi
   fi
index 88eb39a6de7dd9646aef8ae8f3cd17d44c10b68a..02ed6ebb33a73d4f8a3241337e95ece462c38e1a 100644 (file)
@@ -1,4 +1,4 @@
-# mbtowc.m4 serial 4
+# mbtowc.m4 serial 5
 dnl Copyright (C) 2011-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,6 +11,9 @@ AC_DEFUN([gl_FUNC_MBTOWC],
   gl_CHECK_FUNCS_ANDROID([mbtowc], [[#include <stdlib.h>]])
   if test $ac_cv_func_mbtowc = no; then
     HAVE_MBTOWC=0
+    case "$gl_cv_onwards_func_mbtowc" in
+      future*) REPLACE_MBTOWC=1 ;;
+    esac
   else
     if false; then
       REPLACE_MBTOWC=1
index 1420efdb51a2a8d49772b11b6893ca8700476588..1df2bc1505adf135cdaf6434b757b30fe29c433a 100644 (file)
@@ -1,4 +1,4 @@
-# vdprintf.m4 serial 2
+# vdprintf.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_VDPRINTF],
 [
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_LIBOBJ([vdprintf])
-  if test $ac_cv_func_vdprintf = yes; then
+  if test $ac_cv_func_vdprintf = yes \
+     || case "$gl_cv_onwards_func_vdprintf" in \
+          future*) true ;; \
+          *) false ;; \
+        esac; then
     REPLACE_VDPRINTF=1
   fi
   gl_PREREQ_VDPRINTF
index af6d26c78d0a64a111ca17610489a1bc103191c3..ab22f6cd63c3807b55d8d4d11f0e89eb11a33f15 100644 (file)
@@ -1,4 +1,4 @@
-# wcsnrtombs.m4 serial 8
+# wcsnrtombs.m4 serial 9
 dnl Copyright (C) 2008-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,
@@ -14,6 +14,9 @@ AC_DEFUN([gl_FUNC_WCSNRTOMBS],
   gl_CHECK_FUNCS_ANDROID([wcsnrtombs], [[#include <wchar.h>]])
   if test $ac_cv_func_wcsnrtombs = no; then
     HAVE_WCSNRTOMBS=0
+    case "$gl_cv_onwards_func_wcsnrtombs" in
+      future*) REPLACE_WCSNRTOMBS=1 ;;
+    esac
   else
     if test $REPLACE_MBSTATE_T = 1; then
       REPLACE_WCSNRTOMBS=1