|
| 1 | +From 3734443b661799b8fa893d4379be62cd1ce96ae0 Mon Sep 17 00:00:00 2001 |
| 2 | +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> |
| 3 | +Date: Wed, 12 Apr 2023 12:43:23 +0200 |
| 4 | +Subject: [PATCH] Check for setlocale() function |
| 5 | +MIME-Version: 1.0 |
| 6 | +Content-Type: text/plain; charset=UTF-8 |
| 7 | +Content-Transfer-Encoding: 8bit |
| 8 | + |
| 9 | +After modernizing configure.ac, setlocale() stopped to be checked, |
| 10 | +HAVE_SETLOCALE defined, and setlocale() called from main(). As |
| 11 | +a result indent-2.2.13 stopped printing localized messages. |
| 12 | + |
| 13 | +This patch fixes it. |
| 14 | + |
| 15 | +I checked all HAVE_ macros for their configure-time checks. |
| 16 | +HAVE_SETLOCALE was the only missing. |
| 17 | + |
| 18 | +<https://lists.gnu.org/archive/html/bug-indent/2023-04/msg00001.html> |
| 19 | + |
| 20 | +Signed-off-by: Petr Písař <ppisar@redhat.com> |
| 21 | +--- |
| 22 | + configure.ac | 2 +- |
| 23 | + 1 file changed, 1 insertion(+), 1 deletion(-) |
| 24 | + |
| 25 | +diff --git a/configure.ac b/configure.ac |
| 26 | +index 92b612d..85f4383 100644 |
| 27 | +--- a/configure.ac |
| 28 | ++++ b/configure.ac |
| 29 | +@@ -48,7 +48,7 @@ AC_SUBST(localedir) |
| 30 | + AC_CHECK_INCLUDES_DEFAULT |
| 31 | + AC_PROG_EGREP |
| 32 | + |
| 33 | +-AC_CHECK_FUNCS(strchr memcpy memmove utime) |
| 34 | ++AC_CHECK_FUNCS(setlocale strchr memcpy memmove utime) |
| 35 | + AC_CHECK_HEADERS(unistd.h string.h malloc.h utime.h sys/utime.h) |
| 36 | + |
| 37 | + if test "$ac_cv_func_utime" = yes |
| 38 | +-- |
| 39 | +2.40.0 |
| 40 | + |
0 commit comments