+2025-05-04 Bruno Haible <bruno@clisp.org>
+
+ getlocalename_l-unsafe: Improve support for Solaris 11 OpenIndiana.
+ Suggested by Andy Fiddaman <illumos@fiddaman.net> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2025-05/msg00018.html>.
+ * lib/getlocalename_l-unsafe.c (getlocalename_l_unsafe): On Solaris, use
+ the system's getlocalename_l() function if available.
+
2025-05-04 Bruno Haible <bruno@clisp.org>
vc-mtime: Don't crash if xgetcwd() returns NULL.
/* We shouldn't get here. */
return (struct string_with_storage) { "", STORAGE_INDEFINITE };
# else
- /* Solaris 11 OpenIndiana.
- For the internal structure of locale objects, see
+ /* Solaris 11 OpenIndiana or Solaris 11 OmniOS. */
+# if HAVE_GETLOCALENAME_L
+ /* illumos after April 2025. */
+# undef getlocalename_l
+ const char *name = getlocalename_l (category, locale);
+ return (struct string_with_storage) { name, STORAGE_OBJECT };
+# else
+ /* For the internal structure of locale objects, see
https://github.com/OpenIndiana/illumos-gate/blob/master/usr/src/lib/libc/port/locale/localeimpl.h */
switch (category)
{
default: /* We shouldn't get here. */
return (struct string_with_storage) { "", STORAGE_INDEFINITE };
}
+# endif
# endif
#elif HAVE_NAMELESS_LOCALES
/* OpenBSD >= 6.2, AIX >= 7.1 */