The name of the C locale w/ UTF-8 support is not always C.UTF-8.

Use a pattern to find it (if present) and use that value instead
of hard-coding C.UTF-8.  This works around a leak sanitizer crash
on certain inputs.
This commit is contained in:
Todd C. Miller
2022-11-11 07:05:21 -07:00
parent 75008a0570
commit 5683fc6f7a
8 changed files with 68 additions and 107 deletions

View File

@@ -71,7 +71,6 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
SHELL = @SHELL@ SHELL = @SHELL@
EGREP = @EGREP@ EGREP = @EGREP@
GREP = @GREP@
SED = @SED@ SED = @SED@
INSTALL = $(SHELL) $(scriptdir)/install-sh -c INSTALL = $(SHELL) $(scriptdir)/install-sh -c
@@ -119,7 +118,7 @@ check check-verbose check-fuzzer fuzz pre-install: config.status
done done
uncrustify.files: Makefile uncrustify.files: Makefile
$(GREP) '\.[ch]$$' $(top_srcdir)/MANIFEST | $(EGREP) -v '(/zlib/|/(arc4random|arc4random_uniform|chacha_private|charclass|fnmatch|getaddrinfo|getcwd|getdate|getentropy|getopt|getopt_long|glob|gram|inet_ntop|inet_pton|log_server.pb-c|mktemp|pw_dup|reallocarray|mktemp_test|protobuf-c|snprintf|stdbool|strlcat|strlcpy|sudo_queue|toke)\.[ch]$$)' > uncrustify.files $(EGREP) '\.[ch]$$' $(top_srcdir)/MANIFEST | $(EGREP) -v '(/zlib/|/(arc4random|arc4random_uniform|chacha_private|charclass|fnmatch|getaddrinfo|getcwd|getdate|getentropy|getopt|getopt_long|glob|gram|inet_ntop|inet_pton|log_server.pb-c|mktemp|pw_dup|reallocarray|mktemp_test|protobuf-c|snprintf|stdbool|strlcat|strlcpy|sudo_queue|toke)\.[ch]$$)' > uncrustify.files
reformat: uncrustify.files reformat: uncrustify.files
( cd $(top_srcdir) && uncrustify -c etc/uncrustify.cfg --replace --no-backup -F $(top_builddir)/uncrustify.files ) ( cd $(top_srcdir) && uncrustify -c etc/uncrustify.cfg --replace --no-backup -F $(top_builddir)/uncrustify.files )

View File

@@ -33,7 +33,7 @@ incdir = $(top_srcdir)/include
# Compiler & tools to use # Compiler & tools to use
CC = @CC@ CC = @CC@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
GREP = @GREP@ EGREP = @EGREP@
# C preprocessor flags # C preprocessor flags
CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@ CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
@@ -152,11 +152,9 @@ check-fuzzer:
check: $(TEST_PROGS) check-fuzzer check: $(TEST_PROGS) check-fuzzer
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \

View File

@@ -35,7 +35,7 @@ cross_compiling = @CROSS_COMPILING@
CC = @CC@ CC = @CC@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
SHA1SUM = @SHA1SUM@ SHA1SUM = @SHA1SUM@
GREP = @GREP@ EGREP = @EGREP@
SED = @SED@ SED = @SED@
# Libraries # Libraries
@@ -200,11 +200,9 @@ fuzz_iolog_json_seed_corpus.zip:
rm -rf $$tdir rm -rf $$tdir
run-fuzz_iolog_json: fuzz_iolog_json run-fuzz_iolog_json: fuzz_iolog_json
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -227,11 +225,9 @@ fuzz_iolog_legacy_seed_corpus.zip:
rm -rf $$tdir rm -rf $$tdir
run-fuzz_iolog_legacy: fuzz_iolog_legacy run-fuzz_iolog_legacy: fuzz_iolog_legacy
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -254,11 +250,9 @@ fuzz_iolog_timing_seed_corpus.zip:
rm -rf $$tdir rm -rf $$tdir
run-fuzz_iolog_timing: fuzz_iolog_timing run-fuzz_iolog_timing: fuzz_iolog_timing
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -308,11 +302,9 @@ fuzz: run-fuzz_iolog_json run-fuzz_iolog_legacy run-fuzz_iolog_timing
check-fuzzer: $(FUZZ_PROGS) check-fuzzer: $(FUZZ_PROGS)
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -327,11 +319,9 @@ check-fuzzer: $(FUZZ_PROGS)
check: $(TEST_PROGS) check-fuzzer check: $(TEST_PROGS) check-fuzzer
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \

View File

@@ -55,7 +55,7 @@ CPP = @CPP@
HOSTCPP = @CPP_FOR_BUILD@ HOSTCPP = @CPP_FOR_BUILD@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
SHA1SUM = @SHA1SUM@ SHA1SUM = @SHA1SUM@
GREP = @GREP@ EGREP = @EGREP@
SED = @SED@ SED = @SED@
AWK = @AWK@ AWK = @AWK@
@@ -342,11 +342,9 @@ fuzz_sudo_conf_seed_corpus.zip:
rm -rf $$tdir rm -rf $$tdir
run-fuzz_sudo_conf: fuzz_sudo_conf run-fuzz_sudo_conf: fuzz_sudo_conf
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -408,11 +406,9 @@ fuzz: run-fuzz_sudo_conf
check-fuzzer: $(FUZZ_PROGS) check-fuzzer: $(FUZZ_PROGS)
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -424,11 +420,9 @@ check-fuzzer: $(FUZZ_PROGS)
# Note: some regress checks are run from srcdir for consistent error messages # Note: some regress checks are run from srcdir for consistent error messages
check: $(TEST_PROGS) check-fuzzer check: $(TEST_PROGS) check-fuzzer
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -449,9 +443,9 @@ check: $(TEST_PROGS) check-fuzzer
if test -f globtest; then \ if test -f globtest; then \
mkdir -p `$(SED) 's@/[^/]*$$@@' $(srcdir)/regress/glob/files | sort -u`; \ mkdir -p `$(SED) 's@/[^/]*$$@@' $(srcdir)/regress/glob/files | sort -u`; \
touch `cat $(srcdir)/regress/glob/files`; \ touch `cat $(srcdir)/regress/glob/files`; \
chmod 0755 `$(GREP) '/r[^/]*$$' $(srcdir)/regress/glob/files`; \ chmod 0755 `$(EGREP) '/r[^/]*$$' $(srcdir)/regress/glob/files`; \
chmod 0444 `$(GREP) '/s[^/]*$$' $(srcdir)/regress/glob/files`; \ chmod 0444 `$(EGREP) '/s[^/]*$$' $(srcdir)/regress/glob/files`; \
chmod 0711 `$(GREP) '/t[^/]*$$' $(srcdir)/regress/glob/files`; \ chmod 0711 `$(EGREP) '/t[^/]*$$' $(srcdir)/regress/glob/files`; \
./globtest $(srcdir)/regress/glob/globtest.in || rval=`expr $$rval + $$?`; \ ./globtest $(srcdir)/regress/glob/globtest.in || rval=`expr $$rval + $$?`; \
rm -rf fake; \ rm -rf fake; \
fi; \ fi; \

View File

@@ -36,7 +36,7 @@ cross_compiling = @CROSS_COMPILING@
CC = @CC@ CC = @CC@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
SHA1SUM = @SHA1SUM@ SHA1SUM = @SHA1SUM@
GREP = @GREP@ EGREP = @EGREP@
SED = @SED@ SED = @SED@
# Our install program supports extra flags... # Our install program supports extra flags...
@@ -195,11 +195,9 @@ fuzz_logsrvd_conf_seed_corpus.zip:
rm -rf $$tdir rm -rf $$tdir
run-fuzz_logsrvd_conf: fuzz_logsrvd_conf run-fuzz_logsrvd_conf: fuzz_logsrvd_conf
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -258,11 +256,9 @@ fuzz: run-fuzz_logsrvd_conf
check-fuzzer: $(FUZZ_PROGS) check-fuzzer: $(FUZZ_PROGS)
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -273,11 +269,9 @@ check-fuzzer: $(FUZZ_PROGS)
check: $(TEST_PROGS) check-fuzzer check: $(TEST_PROGS) check-fuzzer
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \

View File

@@ -36,7 +36,7 @@ cross_compiling = @CROSS_COMPILING@
# Compiler & tools to use # Compiler & tools to use
CC = @CC@ CC = @CC@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
GREP = @GREP@ EGREP = @EGREP@
SED = @SED@ SED = @SED@
AWK = @AWK@ AWK = @AWK@
@@ -228,11 +228,9 @@ check-fuzzer:
check: $(TEST_PROGS) check-fuzzer check: $(TEST_PROGS) check-fuzzer
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \

View File

@@ -47,7 +47,7 @@ LIBTOOL = @LIBTOOL@
SHA1SUM = @SHA1SUM@ SHA1SUM = @SHA1SUM@
FLEX = @FLEX@ FLEX = @FLEX@
YACC = @YACC@ YACC = @YACC@
GREP = @GREP@ EGREP = @EGREP@
SED = @SED@ SED = @SED@
AWK = @AWK@ AWK = @AWK@
@@ -431,11 +431,9 @@ fuzz_policy_seed_corpus.zip:
rm -rf $$tdir rm -rf $$tdir
run-fuzz_policy: fuzz_policy run-fuzz_policy: fuzz_policy
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -458,11 +456,9 @@ fuzz_sudoers_seed_corpus.zip:
rm -rf $$tdir rm -rf $$tdir
run-fuzz_sudoers: fuzz_sudoers run-fuzz_sudoers: fuzz_sudoers
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -485,11 +481,9 @@ fuzz_sudoers_ldif_seed_corpus.zip:
rm -rf $$tdir rm -rf $$tdir
run-fuzz_sudoers_ldif: fuzz_sudoers_ldif run-fuzz_sudoers_ldif: fuzz_sudoers_ldif
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -635,11 +629,9 @@ fuzz: run-fuzz_policy run-fuzz_sudoers run-fuzz_sudoers_ldif
check-fuzzer: $(FUZZ_PROGS) check-fuzzer: $(FUZZ_PROGS)
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \
@@ -654,11 +646,9 @@ check-fuzzer: $(FUZZ_PROGS)
check: $(TEST_PROGS) visudo testsudoers cvtsudoers check-fuzzer check: $(TEST_PROGS) visudo testsudoers cvtsudoers check-fuzzer
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \

View File

@@ -35,7 +35,7 @@ cross_compiling = @CROSS_COMPILING@
# Compiler & tools to use # Compiler & tools to use
CC = @CC@ CC = @CC@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
GREP = @GREP@ EGREP = @EGREP@
SED = @SED@ SED = @SED@
AWK = @AWK@ AWK = @AWK@
@@ -332,11 +332,9 @@ check-fuzzer:
check: $(TEST_PROGS) check-fuzzer check: $(TEST_PROGS) check-fuzzer
@if test X"$(cross_compiling)" != X"yes"; then \ @if test X"$(cross_compiling)" != X"yes"; then \
if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \
LC_ALL=C.UTF-8; export LC_ALL; \ test -n "$$l" || l="C"; \
else \ LC_ALL="$$l"; export LC_ALL; \
LC_ALL=C; export LC_ALL; \
fi; \
unset LANG || LANG=; \ unset LANG || LANG=; \
unset LANGUAGE || LANGUAGE=; \ unset LANGUAGE || LANGUAGE=; \
MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \