Hash :
bc2d70ee
Author :
Date :
2025-02-14T15:24:54
newlocale: Work around macOS, NetBSD, Solaris 11 OpenIndiana bug. * m4/newlocale.m4 (gl_FUNC_NEWLOCALE): Test for the "null base" bug. Set REPLACE_NEWLOCALE to 1 if it has the bug. * lib/newlocale.c (newlocale): Add alternative implementation that uses the system's newlocale(). * modules/newlocale (configure.ac): Consider REPLACE_NEWLOCALE. * tests/test-newlocale.c: Include <langinfo.h>. (main): Verify fix for the "null base" bug. * modules/newlocale-tests (configure.ac): Test for nl_langinfo_l. * doc/posix-functions/newlocale.texi: Mention the "null base" bug.
Description:
newlocale() function: create a locale object.
Files:
lib/newlocale.c
m4/newlocale.m4
Depends-on:
locale-h
localename-environ
configure.ac:
gl_FUNC_NEWLOCALE
gl_CONDITIONAL([GL_COND_OBJ_NEWLOCALE],
[test $HAVE_LOCALE_T = 0 || { test $REPLACE_NEWLOCALE = 1 && test "$gt_localename_enhances_locale_funcs" != yes; }])
AM_COND_IF([GL_COND_OBJ_NEWLOCALE], [
gl_PREREQ_NEWLOCALE
])
gl_LOCALE_MODULE_INDICATOR([newlocale])
Makefile.am:
if GL_COND_OBJ_NEWLOCALE
lib_SOURCES += newlocale.c
endif
Include:
<locale.h>
License:
LGPLv2+
Maintainer:
all