]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 16.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 01:05:15 +0000 (02:05 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:56:11 +0000 (15:56 +0100)
* m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TSEARCH.
* lib/search.in.h (tsearch, tfind, tdelete, twalk): Disable
_GL_CXXALIASWARN invocation on non-glibc systems.

ChangeLog
lib/search.in.h
m4/tsearch.m4

index 72838038177c327a65a6576137216f8b43f98812..8f536cfc734d364449bd9c761de0e1f806c74a51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 
        Resolve conflicts for functions introduced in Android API level 16.
 
+       * m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TSEARCH.
+       * lib/search.in.h (tsearch, tfind, tdelete, twalk): Disable
+       _GL_CXXALIASWARN invocation on non-glibc systems.
+
        * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Conditionally set
        REPLACE_FACCESSAT.
        * lib/unistd.in.h (faccessat): Disable _GL_CXXALIASWARN invocation on
index cf5bfb9b1ba840a301c38c9bb29fb3528fe65382..e8cd6992e76dc8eac714a9ae24d931199847137f 100644 (file)
@@ -156,7 +156,9 @@ _GL_CXXALIAS_SYS (tsearch, void *,
                   (const void *key, void **vrootp,
                    _gl_search_compar_fn compar));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (tsearch);
+# endif
 
 /* Searches an element in the tree *VROOTP that compares equal to KEY.
    If one is found, it is returned.  Otherwise, NULL is returned.  */
@@ -181,7 +183,9 @@ _GL_CXXALIAS_SYS_CAST (tfind, void *,
                        (const void *key, void *const *vrootp,
                         _gl_search_compar_fn compar));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (tfind);
+# endif
 
 /* Searches an element in the tree *VROOTP that compares equal to KEY.
    If one is found, it is removed from the tree, and its parent node is
@@ -205,7 +209,9 @@ _GL_CXXALIAS_SYS (tdelete, void *,
                   (const void *restrict key, void **restrict vrootp,
                    _gl_search_compar_fn compar));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (tdelete);
+# endif
 
 /* Perform a depth-first, left-to-right traversal of the tree VROOT.
    The ACTION function is called:
@@ -233,7 +239,9 @@ _GL_FUNCDECL_SYS (twalk, void,
 _GL_CXXALIAS_SYS (twalk, void,
                   (const void *vroot, _gl_search_action_fn action));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (twalk);
+# endif
 
 /* Flags used by tsearch.c.  */
 # define GNULIB_defined_tsearch  (@REPLACE_TSEARCH@ || !@HAVE_TSEARCH@)
index d78da9b198d4b650acf1d009f691f191de1189cf..0781151e525ad0576d46dbbe055c7accf436a21b 100644 (file)
@@ -1,4 +1,4 @@
-# tsearch.m4 serial 10
+# tsearch.m4 serial 11
 dnl Copyright (C) 2006-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,
@@ -53,6 +53,9 @@ main ()
     esac
   else
     HAVE_TSEARCH=0
+    case "$gl_cv_onwards_func_tsearch" in
+      future*) REPLACE_TSEARCH=1 ;;
+    esac
   fi
   if test $ac_cv_func_twalk != yes; then
     HAVE_TWALK=0