@itemize
@item
This function is missing on many platforms:
-FreeBSD 9.0, NetBSD 9.0, OpenBSD 6.1, Minix 3.1.8, AIX 6.1, HP-UX 11, IRIX 6.5, Solaris 11.3, Cygwin 2.5.x, mingw, MSVC 14, Android 4.4.
+@c For NetBSD, see https://mail-index.netbsd.org/tech-userlevel/2015/12/29/msg009556.html
+FreeBSD 9.0, NetBSD 10.0, OpenBSD 6.1, Minix 3.1.8, AIX 6.1, HP-UX 11, IRIX 6.5, Solaris 11.3, Cygwin 2.5.x, mingw, MSVC 14, Android API level 20.
@item
This function is not documented and leads to crashes in subsequent
@code{setlocale} invocations on some platforms:
@item
This function is useless because the @code{locale_t} type contains basically
no information on some platforms:
-OpenBSD 6.3.
+OpenBSD 7.4.
@end itemize
#endif
-#if HAVE_GOOD_USELOCALE /* glibc, Mac OS X, FreeBSD >= 9.1, Cygwin >= 2.6,
- Solaris 11 OpenIndiana, or Solaris >= 11.4 */
+#if HAVE_GOOD_USELOCALE /* glibc, musl libc, macOS, FreeBSD >= 9.1, AIX 7.1,
+ AIX >= 7.3, Solaris >= 11.4, Solaris 11 OpenIndiana,
+ Solaris 11 OmniOS, Cygwin >= 2.6,
+ Android API level >= 21 */
/* Simple hash set of strings. We don't want to drag in lots of hash table
code here. */
-# intl-thread-locale.m4 serial 10
+# intl-thread-locale.m4 serial 11
dnl Copyright (C) 2015-2024 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 they did not think about the programs.
dnl In this situation, even the HAVE_NAMELESS_LOCALES support does not work.
dnl So, define HAVE_FAKE_LOCALES and disable all locale_t support.
+ dnl Expected result: HAVE_FAKE_LOCALES is defined on OpenBSD ≥ 6.2.
case "$gt_cv_func_uselocale_works" in
*yes)
AC_CHECK_HEADERS_ONCE([xlocale.h])
;;
esac
+ dnl Expected result: HAVE_SOLARIS114_LOCALES is defined on Solaris ≥ 11.4.
case "$gt_cv_func_uselocale_works" in
*yes)
AC_CACHE_CHECK([for Solaris 11.4 locale system],
dnl requires the gnulib overrides of 'newlocale', 'duplocale', 'freelocale',
dnl which is a problem for GNU libunistring. Therefore try hard to avoid
dnl enabling this code!
+ dnl Expected result: HAVE_NAMELESS_LOCALES is defined on AIX.
gt_nameless_locales=no
case "$host_os" in
dnl It's needed on AIX 7.2.
dnl We cannot support uselocale() on platforms where the locale_t type is
dnl fake. So, set
dnl gt_good_uselocale = gt_working_uselocale && !gt_fake_locales.
+ dnl Expected result: HAVE_GOOD_USELOCALE is defined on all platforms except
+ dnl FreeBSD < 9.1, NetBSD, OpenBSD, Minix, AIX < 7, AIX 7.2, HP-UX, IRIX,
+ dnl Solaris < 11.4, Cygwin < 2.6, mingw, MSVC 14, Android API level < 21.
if test $gt_working_uselocale = yes && test $gt_fake_locales = no; then
gt_good_uselocale=yes
AC_DEFINE([HAVE_GOOD_USELOCALE], [1],
dnl Set gt_localename_enhances_locale_funcs to indicate whether localename.c
dnl overrides newlocale(), duplocale(), freelocale() to keep track of locale
dnl names.
+ dnl Expected result: LOCALENAME_ENHANCE_LOCALE_FUNCS is defined on
+ dnl AIX 7.1, AIX ≥ 7.3.
if test $gt_good_uselocale = yes && test $gt_nameless_locales = yes; then
gt_localename_enhances_locale_funcs=yes
LOCALENAME_ENHANCE_LOCALE_FUNCS=1
dnl Tests whether uselocale() exists and is usable.
dnl Sets gt_working_uselocale and defines HAVE_WORKING_USELOCALE.
+dnl Expected result: HAVE_WORKING_USELOCALE is defined on all platforms except
+dnl FreeBSD < 9.1, NetBSD, OpenBSD < 6.2, Minix, AIX < 7, AIX 7.2, HP-UX, IRIX,
+dnl Solaris < 11.4, Cygwin < 2.6, mingw, MSVC 14, Android API level < 21.
AC_DEFUN([gt_FUNC_USELOCALE],
[
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles