Resolve conflicts for functions introduced in Android API level 21.
+ * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Conditionally set
+ REPLACE_DUPLOCALE.
+ * m4/localename.m4 (gl_LOCALENAME): Conditionally set REPLACE_NEWLOCALE,
+ REPLACE_DUPLOCALE, REPLACE_FREELOCALE.
+ * lib/locale.in.h (newlocale, duplocale, freelocale): Disable
+ _GL_CXXALIASWARN invocation on non-glibc systems.
+
* lib/unistd.in.h (dup3): Consider REPLACE_DUP3. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_DUP3.
(int category_mask, const char *name, locale_t base));
# endif
# endif
-# if @HAVE_NEWLOCALE@
+# if __GLIBC__ >= 2 && @HAVE_NEWLOCALE@
_GL_CXXALIASWARN (newlocale);
# endif
# if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@
_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
# endif
# endif
-# if @HAVE_DUPLOCALE@
+# if __GLIBC__ >= 2 && @HAVE_DUPLOCALE@
_GL_CXXALIASWARN (duplocale);
# endif
# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@
_GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale));
# endif
# endif
-# if @HAVE_FREELOCALE@
+# if __GLIBC__ >= 2 && @HAVE_FREELOCALE@
_GL_CXXALIASWARN (freelocale);
# endif
#elif defined GNULIB_POSIXCHECK
-# duplocale.m4 serial 17
+# duplocale.m4 serial 18
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,
fi
else
HAVE_DUPLOCALE=0
+ case "$gl_cv_onwards_func_duplocale" in
+ future*) REPLACE_DUPLOCALE=1 ;;
+ esac
fi
if test $REPLACE_DUPLOCALE = 1; then
DUPLOCALE_LIB="$SETLOCALE_NULL_LIB"
-# localename.m4 serial 9
+# localename.m4 serial 10
dnl Copyright (C) 2007, 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,
else
dnl In 2019, some versions of z/OS lack the locale_t type and have broken
dnl newlocale, duplocale, freelocale functions.
+ gl_cv_onwards_func_newlocale='future OS version'
+ gl_cv_onwards_func_duplocale='future OS version'
+ gl_cv_onwards_func_freelocale='future OS version'
gl_func_newlocale=no
gl_func_duplocale=no
gl_func_freelocale=no
fi
if test $gl_func_newlocale != yes; then
HAVE_NEWLOCALE=0
+ case "$gl_cv_onwards_func_newlocale" in
+ future*) REPLACE_NEWLOCALE=1 ;;
+ esac
fi
if test $gl_func_duplocale != yes; then
HAVE_DUPLOCALE=0
+ case "$gl_cv_onwards_func_duplocale" in
+ future*) REPLACE_DUPLOCALE=1 ;;
+ esac
fi
if test $gl_func_freelocale != yes; then
HAVE_FREELOCALE=0
+ case "$gl_cv_onwards_func_freelocale" in
+ future*) REPLACE_FREELOCALE=1 ;;
+ esac
fi
if test $gt_localename_enhances_locale_funcs = yes; then
REPLACE_NEWLOCALE=1