From: Bruno Haible Date: Fri, 21 Feb 2025 07:37:10 +0000 (+0100) Subject: localename-unsafe: Remove support for nonexistent Solaris 12. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=329877ac214ca86f7adb6a59f4301fcc33dd8da8;p=gnulib.git localename-unsafe: Remove support for nonexistent Solaris 12. * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Remove test for getlocalename_l. * lib/localename-unsafe.c: Ignore HAVE_GETLOCALENAME_L. --- diff --git a/ChangeLog b/ChangeLog index 4b8faaeb18..609d352b51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-02-21 Bruno Haible + + localename-unsafe: Remove support for nonexistent Solaris 12. + * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Remove test for + getlocalename_l. + * lib/localename-unsafe.c: Ignore HAVE_GETLOCALENAME_L. + 2025-02-21 Bruno Haible setlocale: Relicense under LGPLv2+. diff --git a/lib/localename-unsafe.c b/lib/localename-unsafe.c index ebdf2e9491..97d5f9af92 100644 --- a/lib/localename-unsafe.c +++ b/lib/localename-unsafe.c @@ -46,10 +46,7 @@ # include # endif # if defined __sun -# if HAVE_GETLOCALENAME_L -/* Solaris >= 12. */ -extern char * getlocalename_l(int, locale_t); -# elif HAVE_SOLARIS114_LOCALES +# if HAVE_SOLARIS114_LOCALES # include # endif # endif @@ -3080,10 +3077,7 @@ gl_locale_name_thread_unsafe (int category, _GL_UNUSED const char *categoryname) } return querylocale (mask, thread_locale); # elif defined __sun -# if HAVE_GETLOCALENAME_L - /* Solaris >= 12. */ - return getlocalename_l (category, thread_locale); -# elif HAVE_SOLARIS114_LOCALES +# if HAVE_SOLARIS114_LOCALES /* Solaris >= 11.4. */ void *lcp = (*thread_locale)->core.data->lcp; if (lcp != NULL) diff --git a/m4/intl-thread-locale.m4 b/m4/intl-thread-locale.m4 index 9cdbff2c20..aff83a7ad6 100644 --- a/m4/intl-thread-locale.m4 +++ b/m4/intl-thread-locale.m4 @@ -1,5 +1,5 @@ # intl-thread-locale.m4 -# serial 12 +# serial 13 dnl Copyright (C) 2015-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -118,15 +118,6 @@ int main () [Define if the locale_t type is as on Solaris 11.4.]) fi - dnl Solaris 12 will maybe provide getlocalename_l. If it does, it will - dnl improve the implementation of gl_locale_name_thread(), by removing - dnl the use of undocumented structures. - case "$gt_cv_func_uselocale_works" in - *yes) - AC_CHECK_FUNCS([getlocalename_l]) - ;; - esac - dnl This code is for platforms where the locale_t type does not provide access dnl to the name of each locale category. This code has the drawback that it dnl requires the gnulib overrides of 'newlocale', 'duplocale', 'freelocale',