* lib/search.in.h (twalk): Consider REPLACE_TWALK.
* m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize REPLACE_TWALK.
* modules/search (Makefile.am): Substitute REPLACE_TWALK.
* m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TWALK.
* modules/tsearch (configure.ac): Consider REPLACE_TWALK.
+2023-01-22 Bruno Haible <bruno@clisp.org>
+
+ Resolve conflicts for functions introduced in Android API level 21.
+
+ * lib/search.in.h (twalk): Consider REPLACE_TWALK.
+ * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize REPLACE_TWALK.
+ * modules/search (Makefile.am): Substitute REPLACE_TWALK.
+ * m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TWALK.
+ * modules/tsearch (configure.ac): Consider REPLACE_TWALK.
+
2023-01-22 Bruno Haible <bruno@clisp.org>
Resolve conflicts for functions introduced in Android API level 19.
# define tsearch rpl_tsearch
# define tfind rpl_tfind
# define tdelete rpl_tdelete
+# endif
+# endif
+# if @REPLACE_TWALK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define twalk rpl_twalk
# endif
# endif
pointer to the key,
2. an indicator which visit of the node this is,
3. the level of the node in the tree (0 for the root). */
-# if @REPLACE_TSEARCH@
+# if @REPLACE_TWALK@
_GL_FUNCDECL_RPL (twalk, void,
(const void *vroot, _gl_search_action_fn action)
_GL_ARG_NONNULL ((2)));
/* Flags used by tsearch.c. */
# define GNULIB_defined_tsearch (@REPLACE_TSEARCH@ || !@HAVE_TSEARCH@)
-# define GNULIB_defined_twalk (@REPLACE_TSEARCH@ || !@HAVE_TWALK@)
+# define GNULIB_defined_twalk (@REPLACE_TWALK@ || !@HAVE_TWALK@)
#elif defined GNULIB_POSIXCHECK
# undef tsearch
-# search_h.m4 serial 15
+# search_h.m4 serial 16
dnl Copyright (C) 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,
HAVE_TSEARCH=1; AC_SUBST([HAVE_TSEARCH])
HAVE_TWALK=1; AC_SUBST([HAVE_TWALK])
REPLACE_TSEARCH=0; AC_SUBST([REPLACE_TSEARCH])
+ REPLACE_TWALK=0; AC_SUBST([REPLACE_TWALK])
])
-# tsearch.m4 serial 11
+# tsearch.m4 serial 12
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,
case "$gl_cv_func_tdelete_works" in
*no)
REPLACE_TSEARCH=1
+ REPLACE_TWALK=1
;;
esac
else
fi
if test $ac_cv_func_twalk != yes; then
HAVE_TWALK=0
+ case "$gl_cv_onwards_func_twalk" in
+ future*) REPLACE_TWALK=1 ;;
+ esac
fi
])
-e 's|@''HAVE_TSEARCH''@|$(HAVE_TSEARCH)|g' \
-e 's|@''HAVE_TWALK''@|$(HAVE_TWALK)|g' \
-e 's|@''REPLACE_TSEARCH''@|$(REPLACE_TSEARCH)|g' \
+ -e 's|@''REPLACE_TWALK''@|$(REPLACE_TWALK)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
configure.ac:
gl_FUNC_TSEARCH
gl_CONDITIONAL([GL_COND_OBJ_TSEARCH],
- [test $HAVE_TSEARCH = 0 || test $HAVE_TWALK = 0 || test $REPLACE_TSEARCH = 1])
+ [test $HAVE_TSEARCH = 0 || test $HAVE_TWALK = 0 || test $REPLACE_TSEARCH = 1 || test $REPLACE_TWALK = 1])
AM_COND_IF([GL_COND_OBJ_TSEARCH], [
gl_PREREQ_TSEARCH
])