summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-01-06 21:22:38 +0100
committerBruno Haible <bruno@clisp.org>2019-01-06 21:22:38 +0100
commitdb9aa38cc80d3a6e6f77a8a09325d4e3e1a27d97 (patch)
tree04d844c8f84680cf6b0974a07fb3edc9a7c17c30
parent00f99b1de9ee5b457cd5a52226ac18e160f42b76 (diff)
downloadgnulib-db9aa38cc80d3a6e6f77a8a09325d4e3e1a27d97.tar.gz
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.
-rw-r--r--ChangeLog6
-rw-r--r--lib/localename.c2
-rw-r--r--m4/localename.m43
3 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bead627426..464adec026 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
* doc/containers.texi: New file.
* doc/gnulib.texi (Particular Modules): Include it.
diff --git a/lib/localename.c b/lib/localename.c
index 83689df87a..857a76d729 100644
--- a/lib/localename.c
+++ b/lib/localename.c
@@ -3269,7 +3269,7 @@ gl_locale_name_posix (int category, const char *categoryname)
/* 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
diff --git a/m4/localename.m4 b/m4/localename.m4
index bfa19efb95..a9f629dd17 100644
--- a/m4/localename.m4
+++ b/m4/localename.m4
@@ -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_DEFUN([gl_LOCALENAME],
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