Resolve conflicts for functions introduced in Android API level 19.
+ * lib/inttypes.in.h (imaxabs): Consider REPLACE_IMAXABS. Disable
+ _GL_CXXALIASWARN invocation on non-glibc systems.
+ (imaxdiv): Consider REPLACE_IMAXDIV. Disable _GL_CXXALIASWARN invocation
+ on non-glibc systems.
+ * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize HAVE_IMAXABS,
+ HAVE_IMAXDIV, REPLACE_IMAXABS, REPLACE_IMAXDIV.
+ * modules/inttypes-incomplete (Makefile.am): Substitute REPLACE_IMAXABS,
+ REPLACE_IMAXDIV.
+ * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Conditionally set HAVE_IMAXABS,
+ REPLACE_IMAXABS.
+ * modules/imaxabs (configure.ac): Consider HAVE_IMAXABS, REPLACE_IMAXABS.
+ * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Conditionally set HAVE_IMAXDIV,
+ REPLACE_IMAXDIV.
+ * modules/imaxdiv (configure.ac): Consider HAVE_IMAXDIV, REPLACE_IMAXDIV.
+
* m4/futimens.m4 (gl_FUNC_FUTIMENS): Conditionally set REPLACE_FUTIMENS.
* lib/sys_stat.in.h (futimens): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.
#endif
#if @GNULIB_IMAXABS@
-# if !@HAVE_DECL_IMAXABS@
-extern intmax_t imaxabs (intmax_t);
+# if @REPLACE_IMAXABS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef imaxabs
+# define imaxabs rpl_imaxabs
+# endif
+_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x));
+_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x));
+# else
+# if !@HAVE_DECL_IMAXABS@
+_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x));
+# endif
+_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (imaxabs);
# endif
#elif defined GNULIB_POSIXCHECK
# undef imaxabs
# define GNULIB_defined_imaxdiv_t 1
# endif
# endif
-# if !@HAVE_DECL_IMAXDIV@
-extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
+# if @REPLACE_IMAXDIV@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef imaxdiv
+# define imaxdiv rpl_imaxdiv
+# endif
+_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+# else
+# if !@HAVE_DECL_IMAXDIV@
+_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+# endif
+_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (imaxdiv);
# endif
#elif defined GNULIB_POSIXCHECK
# undef imaxdiv
-# imaxabs.m4 serial 5
+# imaxabs.m4 serial 6
dnl Copyright (C) 2006, 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,
dnl On OSF/1 5.1 with cc, this function is declared but not defined.
gl_CHECK_FUNCS_ANDROID([imaxabs], [[#include <inttypes.h>]])
+ if test $ac_cv_func_imaxabs = no; then
+ HAVE_IMAXABS=0
+ case "$gl_cv_onwards_func_imaxabs" in
+ future*) REPLACE_IMAXABS=1 ;;
+ esac
+ fi
AC_CHECK_DECLS_ONCE([imaxabs])
if test "$ac_cv_have_decl_imaxabs" != yes; then
HAVE_DECL_IMAXABS=0
-# imaxdiv.m4 serial 6
+# imaxdiv.m4 serial 7
dnl Copyright (C) 2006, 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,
dnl On OSF/1 5.1 with cc, this function is declared but not defined.
gl_CHECK_FUNCS_ANDROID([imaxdiv], [[#include <inttypes.h>]])
+ if test $ac_cv_func_imaxdiv = no; then
+ HAVE_IMAXDIV=0
+ case "$gl_cv_onwards_func_imaxdiv" in
+ future*) REPLACE_IMAXDIV=1 ;;
+ esac
+ fi
AC_CHECK_DECLS_ONCE([imaxdiv])
if test "$ac_cv_have_decl_imaxdiv" != yes; then
HAVE_DECL_IMAXDIV=0
-# inttypes.m4 serial 36
+# inttypes.m4 serial 37
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,
HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T])
+ HAVE_IMAXABS=1; AC_SUBST([HAVE_IMAXABS])
+ HAVE_IMAXDIV=1; AC_SUBST([HAVE_IMAXDIV])
+ REPLACE_IMAXABS=0; AC_SUBST([REPLACE_IMAXABS])
+ REPLACE_IMAXDIV=0; AC_SUBST([REPLACE_IMAXDIV])
REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
configure.ac:
gl_FUNC_IMAXABS
-gl_CONDITIONAL([GL_COND_OBJ_IMAXABS], [test $ac_cv_func_imaxabs = no])
+gl_CONDITIONAL([GL_COND_OBJ_IMAXABS],
+ [test $HAVE_IMAXABS = 0 || test $REPLACE_IMAXABS = 1])
AM_COND_IF([GL_COND_OBJ_IMAXABS], [
gl_PREREQ_IMAXABS
])
configure.ac:
gl_FUNC_IMAXDIV
-gl_CONDITIONAL([GL_COND_OBJ_IMAXDIV], [test $ac_cv_func_imaxdiv = no])
+gl_CONDITIONAL([GL_COND_OBJ_IMAXDIV],
+ [test $HAVE_IMAXDIV = 0 || test $REPLACE_IMAXDIV = 1])
AM_COND_IF([GL_COND_OBJ_IMAXDIV], [
gl_PREREQ_IMAXDIV
])
-e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
-e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
-e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/g' \
+ -e 's/@''REPLACE_IMAXABS''@/$(REPLACE_IMAXABS)/g' \
+ -e 's/@''REPLACE_IMAXDIV''@/$(REPLACE_IMAXDIV)/g' \
-e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
-e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
-e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \