From 66834dae94a1bbb385a926223338a0f437a321d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 26 Apr 2024 11:12:09 +0200 Subject: [PATCH] Fix wretest locale check. While here, remove the comment about FreeBSD, since it is not alone in omitting the first hyphen, and most Linux distributions will happily accept both spellings. --- tests/retest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/retest.c b/tests/retest.c index 1fe095f..7c33150 100644 --- a/tests/retest.c +++ b/tests/retest.c @@ -607,7 +607,8 @@ main(int argc, char **argv) #ifdef WRETEST /* Need an 8-bit locale. Or move the two tests with non-ascii characters to the localized internationalization tests. */ - if (setlocale(LC_CTYPE, "en_US.ISO-8859-1") == NULL) + if (setlocale(LC_CTYPE, "en_US.ISO-8859-1") == NULL && + setlocale(LC_CTYPE, "en_US.ISO8859-1") == NULL) fprintf(stderr, "Could not set locale en_US.ISO-8859-1. Expect some\n" "`Invalid or incomplete multi-byte sequence' errors.\n"); #endif /* WRETEST */ @@ -1724,7 +1725,7 @@ main(int argc, char **argv) #if !defined(WIN32) && !defined(__OpenBSD__) if (setlocale(LC_CTYPE, "en_US.ISO-8859-1") != NULL || - setlocale(LC_CTYPE, "en_US.ISO8859-1" /* FreeBSD seems to spell it differently */) != NULL) + setlocale(LC_CTYPE, "en_US.ISO8859-1") != NULL) { fprintf(output_fd,"\nTesting LC_CTYPE en_US.ISO-8859-1\n"); #ifdef SRC_IN_ISO_8859_1