diff --git a/Makefile.in b/Makefile.in index c4055c3be..2e958c259 100644 --- a/Makefile.in +++ b/Makefile.in @@ -71,7 +71,6 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ SHELL = @SHELL@ EGREP = @EGREP@ -GREP = @GREP@ SED = @SED@ INSTALL = $(SHELL) $(scriptdir)/install-sh -c @@ -119,7 +118,7 @@ check check-verbose check-fuzzer fuzz pre-install: config.status done 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 ( cd $(top_srcdir) && uncrustify -c etc/uncrustify.cfg --replace --no-backup -F $(top_builddir)/uncrustify.files ) diff --git a/lib/eventlog/Makefile.in b/lib/eventlog/Makefile.in index 45b9ad2e9..0796154ad 100644 --- a/lib/eventlog/Makefile.in +++ b/lib/eventlog/Makefile.in @@ -33,7 +33,7 @@ incdir = $(top_srcdir)/include # Compiler & tools to use CC = @CC@ LIBTOOL = @LIBTOOL@ -GREP = @GREP@ +EGREP = @EGREP@ # C preprocessor flags CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@ @@ -152,11 +152,9 @@ check-fuzzer: check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ diff --git a/lib/iolog/Makefile.in b/lib/iolog/Makefile.in index 2dde029d0..6f35db0e4 100644 --- a/lib/iolog/Makefile.in +++ b/lib/iolog/Makefile.in @@ -35,7 +35,7 @@ cross_compiling = @CROSS_COMPILING@ CC = @CC@ LIBTOOL = @LIBTOOL@ SHA1SUM = @SHA1SUM@ -GREP = @GREP@ +EGREP = @EGREP@ SED = @SED@ # Libraries @@ -200,11 +200,9 @@ fuzz_iolog_json_seed_corpus.zip: rm -rf $$tdir run-fuzz_iolog_json: fuzz_iolog_json - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -227,11 +225,9 @@ fuzz_iolog_legacy_seed_corpus.zip: rm -rf $$tdir run-fuzz_iolog_legacy: fuzz_iolog_legacy - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -254,11 +250,9 @@ fuzz_iolog_timing_seed_corpus.zip: rm -rf $$tdir run-fuzz_iolog_timing: fuzz_iolog_timing - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ 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) @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -327,11 +319,9 @@ check-fuzzer: $(FUZZ_PROGS) check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ diff --git a/lib/util/Makefile.in b/lib/util/Makefile.in index ad97748f8..8d52252c8 100644 --- a/lib/util/Makefile.in +++ b/lib/util/Makefile.in @@ -55,7 +55,7 @@ CPP = @CPP@ HOSTCPP = @CPP_FOR_BUILD@ LIBTOOL = @LIBTOOL@ SHA1SUM = @SHA1SUM@ -GREP = @GREP@ +EGREP = @EGREP@ SED = @SED@ AWK = @AWK@ @@ -342,11 +342,9 @@ fuzz_sudo_conf_seed_corpus.zip: rm -rf $$tdir run-fuzz_sudo_conf: fuzz_sudo_conf - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -408,11 +406,9 @@ fuzz: run-fuzz_sudo_conf check-fuzzer: $(FUZZ_PROGS) @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ 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 check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -449,9 +443,9 @@ check: $(TEST_PROGS) check-fuzzer if test -f globtest; then \ mkdir -p `$(SED) 's@/[^/]*$$@@' $(srcdir)/regress/glob/files | sort -u`; \ touch `cat $(srcdir)/regress/glob/files`; \ - chmod 0755 `$(GREP) '/r[^/]*$$' $(srcdir)/regress/glob/files`; \ - chmod 0444 `$(GREP) '/s[^/]*$$' $(srcdir)/regress/glob/files`; \ - chmod 0711 `$(GREP) '/t[^/]*$$' $(srcdir)/regress/glob/files`; \ + chmod 0755 `$(EGREP) '/r[^/]*$$' $(srcdir)/regress/glob/files`; \ + chmod 0444 `$(EGREP) '/s[^/]*$$' $(srcdir)/regress/glob/files`; \ + chmod 0711 `$(EGREP) '/t[^/]*$$' $(srcdir)/regress/glob/files`; \ ./globtest $(srcdir)/regress/glob/globtest.in || rval=`expr $$rval + $$?`; \ rm -rf fake; \ fi; \ diff --git a/logsrvd/Makefile.in b/logsrvd/Makefile.in index c9ba8658c..c7f2e2d88 100644 --- a/logsrvd/Makefile.in +++ b/logsrvd/Makefile.in @@ -36,7 +36,7 @@ cross_compiling = @CROSS_COMPILING@ CC = @CC@ LIBTOOL = @LIBTOOL@ SHA1SUM = @SHA1SUM@ -GREP = @GREP@ +EGREP = @EGREP@ SED = @SED@ # Our install program supports extra flags... @@ -195,11 +195,9 @@ fuzz_logsrvd_conf_seed_corpus.zip: rm -rf $$tdir run-fuzz_logsrvd_conf: fuzz_logsrvd_conf - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -258,11 +256,9 @@ fuzz: run-fuzz_logsrvd_conf check-fuzzer: $(FUZZ_PROGS) @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -273,11 +269,9 @@ check-fuzzer: $(FUZZ_PROGS) check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ diff --git a/plugins/python/Makefile.in b/plugins/python/Makefile.in index 1510d22e7..ad83e1ab3 100644 --- a/plugins/python/Makefile.in +++ b/plugins/python/Makefile.in @@ -36,7 +36,7 @@ cross_compiling = @CROSS_COMPILING@ # Compiler & tools to use CC = @CC@ LIBTOOL = @LIBTOOL@ -GREP = @GREP@ +EGREP = @EGREP@ SED = @SED@ AWK = @AWK@ @@ -228,11 +228,9 @@ check-fuzzer: check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index e24a85520..5c6beeb8e 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -47,7 +47,7 @@ LIBTOOL = @LIBTOOL@ SHA1SUM = @SHA1SUM@ FLEX = @FLEX@ YACC = @YACC@ -GREP = @GREP@ +EGREP = @EGREP@ SED = @SED@ AWK = @AWK@ @@ -431,11 +431,9 @@ fuzz_policy_seed_corpus.zip: rm -rf $$tdir run-fuzz_policy: fuzz_policy - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -458,11 +456,9 @@ fuzz_sudoers_seed_corpus.zip: rm -rf $$tdir run-fuzz_sudoers: fuzz_sudoers - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -485,11 +481,9 @@ fuzz_sudoers_ldif_seed_corpus.zip: rm -rf $$tdir run-fuzz_sudoers_ldif: fuzz_sudoers_ldif - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ 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) @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ @@ -654,11 +646,9 @@ check-fuzzer: $(FUZZ_PROGS) check: $(TEST_PROGS) visudo testsudoers cvtsudoers check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \ diff --git a/src/Makefile.in b/src/Makefile.in index bfa941565..850b73212 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -35,7 +35,7 @@ cross_compiling = @CROSS_COMPILING@ # Compiler & tools to use CC = @CC@ LIBTOOL = @LIBTOOL@ -GREP = @GREP@ +EGREP = @EGREP@ SED = @SED@ AWK = @AWK@ @@ -332,11 +332,9 @@ check-fuzzer: check: $(TEST_PROGS) check-fuzzer @if test X"$(cross_compiling)" != X"yes"; then \ - if locale -a 2>&1 | $(GREP) '^C.UTF-8$$' >/dev/null 2>&1; then \ - LC_ALL=C.UTF-8; export LC_ALL; \ - else \ - LC_ALL=C; export LC_ALL; \ - fi; \ + l=`locale -a 2>&1 | $(EGREP) -i '^C.UTF-?8$$'`; \ + test -n "$$l" || l="C"; \ + LC_ALL="$$l"; export LC_ALL; \ unset LANG || LANG=; \ unset LANGUAGE || LANGUAGE=; \ MALLOC_OPTIONS=S; export MALLOC_OPTIONS; \