# HG changeset patch # User Bruno Haible # Date 1258929174 -3600 # Node ID f7a07cd4228a82f20ce55ce1a186dc71816f3d47 # Parent 2da64958ab60b86a4e3c6c537732d60746354874 Check that defines locale_t and LC_GLOBAL_LOCALE. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-11-22 Bruno Haible + * modules/locale-tests (configure.ac): Test for newlocale function. + * tests/test-locale.c: When the system has extended locale functions, + verify that defines locale_t and LC_GLOBAL_LOCALE. + locale: Make locale_t available when possible. * lib/locale.in.h: Include when it exists. * m4/locale_h.m4 (gl_LOCALE_H): Check for and arrange to diff --git a/modules/locale-tests b/modules/locale-tests --- a/modules/locale-tests +++ b/modules/locale-tests @@ -5,6 +5,7 @@ verify configure.ac: +AC_CHECK_FUNCS_ONCE([newlocale]) Makefile.am: TESTS += test-locale diff --git a/tests/test-locale.c b/tests/test-locale.c --- a/tests/test-locale.c +++ b/tests/test-locale.c @@ -33,6 +33,11 @@ LC_TIME }; +#if HAVE_NEWLOCALE +/* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */ +locale_t b = LC_GLOBAL_LOCALE; +#endif + /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *));