Branch
Hash :
6790a26c
Author :
Date :
2025-02-13T22:16:13
locale-h: Ensure locale_t type. * lib/locale.in.h (gl_log2_lc_mask, gl_log2_lcmask_to_index, gl_index_to_log2_lcmask): New macros. (LC_COLLATE_MASK, LC_CTYPE_MASK, LC_MESSAGES_MASK, LC_MONETARY_MASK, LC_NUMERIC_MASK, LC_TIME_MASK, LC_ALL_MASK): New macros. (struct gl_locale_category_t, struct gl_locale_t, locale_t): New types. (LC_GLOBAL_LOCALE, GNULIB_defined_locale_t): New macros. * m4/locale_h.m4 (gl_LOCALE_H): Set and define HAVE_WINDOWS_LOCALE_T. (gl_LOCALE_T): Prepare for substituting HAVE_LOCALE_T. * modules/locale-h (Depends-on): Add bool. (Makefile.am): Substitute HAVE_LOCALE_T, HAVE_WINDOWS_LOCALE_T. * tests/test-locale-h.c: Check that the LC_*_MASK macros and locale_t are defined. * doc/posix-headers/locale.texi: Document the change.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
@node locale.h
@section @file{locale.h}
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/locale.h.html}
Gnulib module: locale-h
@mindex locale-h
Portability problems fixed by Gnulib:
@itemize
@item
The definition of @samp{LC_MESSAGES} is missing on some platforms:
mingw, MSVC 14.
@item
The @code{locale_t} type is not defined on some platforms:
glibc 2.11, macOS 11.1, FreeBSD 9.0, NetBSD 6.1, OpenBSD 6.1, Solaris 11.3, mingw, MSVC 14, Android 4.4.
@item
The @code{struct lconv} type does not contain any members on some platforms:
Android up to 2014.
@item
The @code{struct lconv} type does not contain the members
@code{int_p_cs_precedes}, @code{int_p_sign_posn}, @code{int_p_sep_by_space},
@code{int_n_cs_precedes}, @code{int_n_sign_posn}, @code{int_n_sep_by_space}
on some platforms:
glibc, OpenBSD 4.9, HP-UX 11, Solaris 11.4, Cygwin 1.5.x, mingw, MSVC 14.
@item
Some platforms provide a @code{NULL} macro that cannot be used in arbitrary
expressions:
NetBSD 5.0
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@end itemize