newlib-cygwin/newlib/libc/locale
Eric Blake ca3e3bc54e nl_langinfo: Add NL_LOCALE_NAME macro
Provide an extension NL_LOCALE_NAME() macro, with semantics
matching glibc, which can be used as:
  nl_langinfo_l(NL_LOCALE_NAME(LC_MESSAGES), locale);
to get back the locale string that locale was originally
created with during newlocale(). This in turn allows a library
(such as gettext) to determine what thread-local locale settings
it has inherited from the main program without having to be told
what parameters were passed to newlocale(), for less overall
coupling between parts of the program.

gnulib is set up to use the extension:
https://lists.gnu.org/archive/html/bug-gnulib/2017-01/msg00129.html

* libc/include/langinfo.h (NL_LOCALE_NAME): New macro
* libc/locale/nl_langinfo.c (nl_langinfo_l): Expose locale names
of a locale_t's category components.

Signed-off-by: Eric Blake <eblake@redhat.com>
2017-01-20 10:30:47 +01:00
..
Makefile.am Add documentation for duplocale, freelocale, newlocale, and uselocale. 2016-08-15 17:34:40 +02:00
Makefile.in Bump release to 2.5.0 for yearly snapshot. 2016-12-22 21:33:54 -05:00
duplocale.c Add __get_C_locale inline function and fix new locale code for !_MB_CAPABLE targets 2016-08-23 17:57:06 +02:00
freelocale.c Add __get_C_locale inline function and fix new locale code for !_MB_CAPABLE targets 2016-08-23 17:57:06 +02:00
lctype.c Remove non-working __part_load_locale function and any related code 2016-08-15 10:56:57 +02:00
lmessages.c Remove non-working __part_load_locale function and any related code 2016-08-15 10:56:57 +02:00
lmonetary.c Remove non-working __part_load_locale function and any related code 2016-08-15 10:56:57 +02:00
lnumeric.c Remove non-working __part_load_locale function and any related code 2016-08-15 10:56:57 +02:00
locale.c Correct argument to __get_current_locale. 2016-11-28 09:54:38 +01:00
locale.tex Fix mismatched parentheses in documentation. 2015-06-24 12:23:25 +01:00
localeconv.c Avoid crash when calling __localeconv_l with __C_locale 2016-08-24 19:46:55 +02:00
newlocale.c Fix check for empty locale string in newlocale 2016-10-22 20:22:20 +02:00
nl_langinfo.3 * libc/include/langinfo.h: New file. 2002-08-23 01:56:05 +00:00
nl_langinfo.c nl_langinfo: Add NL_LOCALE_NAME macro 2017-01-20 10:30:47 +01:00
setlocale.h Enforce no arguments for __get_current_locale/__get_C_locale 2016-11-28 10:18:49 +01:00
timelocal.c Remove non-working __part_load_locale function and any related code 2016-08-15 10:56:57 +02:00
uselocale.c Add documentation for duplocale, freelocale, newlocale, and uselocale. 2016-08-15 17:34:40 +02:00