view modules/localename @ 39634:a0d115233cd6

localename: Add support for per-thread locales on Solaris 11.4. * lib/locale.in.h (newlocale, freelocale): New declarations. (duplocale): Declare also when the 'localename' module requests it. * lib/localename.c (struniq_hash_node): Renamed from hash_node. (STRUNIQ_HASH_TABLE_SIZE): Renamed from HASH_TABLE_SIZE. (struniq): Update. (struct locale_categories_names, struct locale_hash_node): New types. (LOCALE_HASH_TABLE_SIZE): New constant. (locale_hash_table, locale_lock): New variables. (pointer_hash, get_locale_t_name): New functions. (newlocale, duplocale, freelocale): New overridden functions. (gl_locale_name_thread_unsafe): Use get_locale_t_name. * m4/intlsolaris.m4: New file. * m4/localename.m4 (gl_LOCALENAME): Require gl_LOCALE_H_DEFAULTS. Invoke gt_INTL_SOLARIS. Set HAVE_NEWLOCALE, HAVE_DUPLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_DUPLOCALE, REPLACE_FREELOCALE. * m4/locale_h.m4 (gl_LOCALE_H): Test whether newlocale, freelocale are declared. (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALENAME, HAVE_NEWLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE. * modules/locale (Makefile.am): Substitute GNULIB_LOCALENAME, HAVE_NEWLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE. * modules/localename (Files): Add intlsolaris.m4. (Depends-on): Add 'locale'. (configure.ac): Invoke gl_LOCALE_MODULE_INDICATOR. * tests/test-locale-c++.cc (newlocale, freelocale): Prepare for checking the signatures.
author Bruno Haible <bruno@clisp.org>
date Sun, 14 Oct 2018 17:03:01 +0200
parents ee1dd8186486
children 1ebb12ec25e0
line wrap: on
line source

Description:
Return current locale's name, according to glibc naming conventions.

Files:
lib/localename.h
lib/localename.c
m4/localename.m4
m4/intlmacosx.m4
m4/intlsolaris.m4
m4/lcmessage.m4

Depends-on:
extensions
locale
flexmember
strdup
lock
langinfo

configure.ac:
gl_LOCALENAME
gl_LOCALE_MODULE_INDICATOR([localename])

Makefile.am:
lib_SOURCES += localename.c

Include:
"localename.h"

Link:
@INTL_MACOSX_LIBS@
$(LTLIBTHREAD) when linking with libtool, $(LIBTHREAD) otherwise

License:
LGPLv2+

Maintainer:
all