Mercurial > gnulib
changeset 40095:f3ca098a0aac
localename: Assume setlocale function.
* lib/localename.c (gl_locale_name_posix): Assume setlocale exists.
* m4/localename.m4 (gl_LOCALENAME): Don't test whether setlocale exists.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 06 Jan 2019 21:22:38 +0100 |
parents | 3bde449680d6 |
children | 5d6ccca8afb9 |
files | ChangeLog lib/localename.c m4/localename.m4 |
diffstat | 3 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Jan 06 20:53:44 2019 +0100 +++ b/ChangeLog Sun Jan 06 21:22:38 2019 +0100 @@ -1,3 +1,9 @@ +2019-01-06 Bruno Haible <bruno@clisp.org> + + localename: Assume setlocale function. + * lib/localename.c (gl_locale_name_posix): Assume setlocale exists. + * m4/localename.m4 (gl_LOCALENAME): Don't test whether setlocale exists. + 2019-01-06 Bruno Haible <bruno@clisp.org> doc: Add documentation about container data types.
--- a/lib/localename.c Sun Jan 06 20:53:44 2019 +0100 +++ b/lib/localename.c Sun Jan 06 21:22:38 2019 +0100 @@ -3269,7 +3269,7 @@ /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. On some systems this can be done by the 'setlocale' function itself. */ -#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL +#if defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL locname = setlocale (category, NULL); #else /* On other systems we ignore what setlocale reports and instead look at the
--- a/m4/localename.m4 Sun Jan 06 20:53:44 2019 +0100 +++ b/m4/localename.m4 Sun Jan 06 21:22:38 2019 +0100 @@ -1,4 +1,4 @@ -# localename.m4 serial 5 +# localename.m4 serial 6 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -11,7 +11,6 @@ AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME]) AC_REQUIRE([gt_INTL_MACOSX]) AC_CHECK_HEADERS_ONCE([langinfo.h]) - AC_CHECK_FUNCS([setlocale]) AC_CHECK_FUNCS_ONCE([newlocale duplocale freelocale]) if test $ac_cv_func_newlocale != yes; then HAVE_NEWLOCALE=0