aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-05-10 21:35:54 +0300
committerArnold D. Robbins <arnold@skeeve.com>2021-05-10 21:35:54 +0300
commit229c965beec283952be89b889b5c407ccf620ace (patch)
treebae512cdd65937de5249fb31450d2a851aa9e194
parentaa6a71c05ac79553f88583264179054998037f90 (diff)
parentf6cc8139dba1adbfa90773c9db8003e5db817d7b (diff)
downloadegawk-229c965beec283952be89b889b5c407ccf620ace.tar.gz
egawk-229c965beec283952be89b889b5c407ccf620ace.tar.bz2
egawk-229c965beec283952be89b889b5c407ccf620ace.zip
Merge branch 'gawk-5.1-stable'
-rw-r--r--helpers/ChangeLog4
-rwxr-xr-xhelpers/update-support.sh5
-rw-r--r--pc/ChangeLog24
-rw-r--r--pc/GenMakefileTst.awk2
-rw-r--r--pc/Makefile11
-rw-r--r--pc/Makefile.tst100
-rw-r--r--pc/config.h6
-rw-r--r--support/ChangeLog6
-rw-r--r--support/Makefile.am6
-rw-r--r--support/Makefile.in28
-rw-r--r--support/malloc/dynarray_at_failure.c39
-rw-r--r--support/malloc/dynarray_resize_clear.c39
-rw-r--r--test/ChangeLog26
-rw-r--r--test/Makefile.am24
-rw-r--r--test/Makefile.in24
-rw-r--r--test/argcasfile.ok6
-rw-r--r--test/iolint.awk20
-rw-r--r--test/iolint.ok10
18 files changed, 273 insertions, 107 deletions
diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index 4f448b99..752e280a 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -1,3 +1,7 @@
+2021-05-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * update-support.sh: Update list of files to copy over.
+
2021-05-07 Arnold D. Robbins <arnold@skeeve.com>
* update-support.sh: Change to work from top level directory.
diff --git a/helpers/update-support.sh b/helpers/update-support.sh
index 06ed1020..90de973a 100755
--- a/helpers/update-support.sh
+++ b/helpers/update-support.sh
@@ -29,9 +29,12 @@ regex_internal.h
verify.h
malloc/dynarray-skeleton.c
malloc/dynarray.h
+malloc/dynarray_at_failure.c
malloc/dynarray_emplace_enlarge.c
+malloc/dynarray_emplace_enlarge.c
malloc/dynarray_finalize.c
-malloc/dynarray_resize.c"
+malloc/dynarray_resize.c
+malloc/dynarray_resize_clear.c"
for i in $FILE_LIST
do
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 37821c66..e71ef987 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,27 @@
+2021-05-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * GenMakefileTst.awk: Use ~ to match @echo line instead of ==,
+ gets things more right. Thanks to Manuel Collado for the
+ suggestion.
+ * Makefile.tst: Regenerated.
+ * Makefile (DYNOBJS): Add dynarray_at_failure$O and
+ dynarray_resize_clear$O.
+
+2021-05-09 Eli Zaretskii <eliz@gnu.org>
+
+ * Makefile.tst (testext): Use $(CMP), not a literal "cmp", so that
+ end-of-line differences could be ignored on MS-DOS/Windows.
+ (argcasfile): Use ' /no/such/file', with a leading space, to avoid
+ MinGW thinking it's a file name, and converting it to C:\foo\bar.
+ test/argcasfile.ok adjusted accordingly.
+
+ * Makefile (VPATH): Adapt to addition of support/malloc
+ directory.
+ (DYNOBJS): New list with dependencies of new files in
+ support/malloc.
+ (LIBOBJS): Add DYNOBJS.
+ (regex$O): Depend on some files in support/malloc.
+
2021-05-05 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.tst: Rebuilt.
diff --git a/pc/GenMakefileTst.awk b/pc/GenMakefileTst.awk
index 298b3887..daa720c1 100644
--- a/pc/GenMakefileTst.awk
+++ b/pc/GenMakefileTst.awk
@@ -109,7 +109,7 @@ function print_recipe( i, start)
return
# First line if it's @echo $@
- if (recipe_lines[2] == "\t@echo $@") {
+ if (recipe_lines[2] ~ /\t@echo $@/) {
start = 3
print recipe_lines[2]
} else
diff --git a/pc/Makefile b/pc/Makefile
index beafd3d6..0dc8bb40 100644
--- a/pc/Makefile
+++ b/pc/Makefile
@@ -101,7 +101,7 @@ DO_LNK = $($(LNK))
DO_BIND= $($(BIND))
#------------------------------------------------------------------------
# To allow Make find files in the support subdirectory.
-VPATH = .;./support
+VPATH = .;./support;./support/malloc
#========================================================================
# End of general configuration. Some platform-specific configuration
# notes appear below.
@@ -241,7 +241,10 @@ ALLOBJS = $(AWKOBJS) awkgram$O getid$O $(OBJ)
# LIBOBJS
# GNU and other stuff that gawk uses as library routines.
-LIBOBJS= getopt$O getopt1$O dfa$O regex$O random$O localeinfo$O
+DYNOBJS= dynarray_resize$O dynarray_emplace_enlarge$O dynarray_finalize$O \
+ dynarray_at_failure$O dynarray_resize_clear$O
+
+LIBOBJS= getopt$O getopt1$O dfa$O random$O localeinfo$O regex$O $(DYNOBJS)
GAWKOBJS = $(ALLOBJS) $(LIBOBJS)
@@ -271,9 +274,11 @@ $(RSPFILE) : $(GAWKOBJS)
# and we have -I. on the compiler command line. unistd.h is
# included by awk.h.
# 2. custom.h is not mentioned because pc ports don't use it.
-$(ALLOBJS) $(LIBOBJS): \
+$(ALLOBJS) $(LIBOBJS) $(DYNOBJS): \
awk.h regex.h config.h gettext.h mbsupport.h protos.h dfa.h getopt.h nonposix.h
+$(DYNOBJS) regex$O: dynarray.h libc-config.h malloc/dynarray.h malloc/dynarray-skeleton.c
+
builtin$O: floatmagic.h random.h popen.h
random$O: random.h
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index d37233b5..7bab0e3d 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -331,9 +331,10 @@ EXPECTED_FAIL_DJGPP = \
# List of tests that fail on MinGW
EXPECTED_FAIL_MINGW = \
backbigs1 backsmalls1 clos1way6 devfd devfd1 devfd2 \
- errno exitval2 fork fork2 fts getfile getlnhd ignrcas3 inetdayt \
- inetecht mbfw1 mbprintf1 mbprintf4 mbstr1 mbstr2 pid pipeio2 \
- pty1 pty2 readdir rstest4 rstest5 status-close timeout
+ errno exitval2 fmttest fork fork2 fts functab5 \
+ getfile getlnhd hsprint ignrcas3 inetdayt inetecht inf-nan-torture \
+ mbfw1 mbprintf1 mbprintf4 mbstr1 mbstr2 \
+ pid pipeio2 pty1 pty2 readdir rstest4 rstest5 status-close timeout
# List of tests that fail on z/OS
@@ -544,8 +545,8 @@ compare::
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
inftest::
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@echo This test is very machine specific...
@$(AWK) -f "$(srcdir)"/inftest.awk | sed "s/inf/Inf/g" >_$@ || echo EXIT CODE: $$? >> _$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -578,8 +579,8 @@ strftime::
@-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0
devfd::
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@$(AWK) 1 /dev/fd/4 /dev/fd/5 4<"$(srcdir)"/devfd.in4 5<"$(srcdir)"/devfd.in5 >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ || echo EXIT CODE: $$? >> _$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -600,8 +601,8 @@ tweakfld::
# AIX /bin/sh exec's the last command in a list, therefore issue a ":"
# command so that pid.sh is fork'ed as a child before being exec'ed.
pid::
- @echo $@
@echo Expect $@ to fail with DJGPP and MinGW.
+ @echo $@
@AWKPATH="$(srcdir)" AWK=$(AWKPROG) $(SHELL) "$(srcdir)"/pid.sh $$$$ > _`basename $@` ; :
@-$(CMP) "$(srcdir)"/pid.ok _`basename $@` && rm -f _`basename $@`
@@ -645,8 +646,8 @@ pipeio1::
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
pipeio2::
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@$(AWK) -v SRCDIR="$(srcdir)" -f "$(srcdir)"/pipeio2.awk >_$@ || echo EXIT CODE: $$? >> _$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -756,15 +757,15 @@ binmode1::
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
devfd1::
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@$(AWK) -f "$(srcdir)"/$@.awk 4< "$(srcdir)"/devfd.in1 5< "$(srcdir)"/devfd.in2 >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
# The program text is the '1' which will print each record. How compact can you get?
devfd2::
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@$(AWK) 1 /dev/fd/4 /dev/fd/5 4< "$(srcdir)"/devfd.in1 5< "$(srcdir)"/devfd.in2 >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -891,8 +892,8 @@ mpfrmemok1:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
jarebug::
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@"$(srcdir)"/$@.sh "$(AWKPROG)" "$(srcdir)"/$@.awk "$(srcdir)"/$@.in "_$@" || echo EXIT CODE: $$? >> _$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -1036,19 +1037,19 @@ testext::
@echo $@
@$(AWK) ' /^(@load|BEGIN)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk
@$(AWK) -f ./testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \
- then cmp "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \
- else cmp "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; fi
+ @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \
+ then $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \
+ else $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; fi
getfile:
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -v TESTEXT_QUIET=1 -ltestext -f $@.awk < $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
readdir:
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@if [ "`uname`" = Linux ] && [ "`stat -f . 2>/dev/null | awk 'NR == 2 { print $$NF }'`" = nfs ]; then \
echo This test may fail on GNU/Linux systems when run on NFS or JFS filesystems.; \
echo If it does, try rerunning on an ext'[234]' filesystem. ; \
@@ -1073,8 +1074,8 @@ readdir_retest:
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
fts:
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@case `uname` in \
IRIX) \
echo This test may fail on IRIX systems when run on an NFS filesystem.; \
@@ -1095,8 +1096,8 @@ charasbytes:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
symtab6:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -1152,8 +1153,8 @@ watchpoint1:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
pty1:
- @echo $@
@echo Expect $@ to fail with DJGPP and MinGW.
+ @echo $@
@-case `uname` in \
*[Oo][Ss]/390*) : ;; \
*) AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \
@@ -1161,8 +1162,8 @@ pty1:
esac
pty2:
- @echo $@
@echo Expect $@ to fail with DJGPP and MinGW.
+ @echo $@
@-case `uname` in \
*[Oo][Ss]/390*) : ;; \
*) AWKPATH="$(srcdir)" $(AWK) -f $@.awk | od -c | $(AWK) '{ $$1 = $$1 ; print }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \
@@ -1170,8 +1171,8 @@ pty2:
esac
ignrcas3::
- @echo $@
@echo Expect $@ to fail with DJGPP and MinGW.
+ @echo $@
@-if locale -a | grep ell_GRC.1253 > /dev/null ; then \
[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ell_GRC.1253 ; export GAWKLOCALE; \
AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \
@@ -1181,9 +1182,9 @@ ignrcas3::
arrdbg:
@echo $@
@$(AWK) -v "okfile=./$@.ok" -v "mpfr_okfile=./$@-mpfr.ok" -f "$(srcdir)"/$@.awk | grep array_f >_$@ || echo EXIT CODE: $$? >> _$@
- @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \
- then cmp "."/$@-mpfr.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; \
- else cmp "."/$@.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; fi
+ @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \
+ then $(CMP) "."/$@-mpfr.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; \
+ else $(CMP) "."/$@.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; fi
sourcesplit:
@echo $@
@@ -1202,8 +1203,8 @@ nsbad_cmd:
# Use [:] in the regexp to keep MSYS from converting the /'s to \'s.
nonfatal1:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk 2>&1 | $(AWK) '{print gensub(/invalid[:].*$$/, "invalid", 1, $$0)}' >_$@ || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -1237,14 +1238,13 @@ typedregex4:
iolint:
@echo $@
@echo hello > 'echo hello'
- @touch 'exec cat' ; chmod 755 'exec cat'
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
- @-$(RM) -f cat 'echo hello' 'exec cat' f1 f2 md5sum
+ @-$(RM) -f cat 'echo hello' f1 f2 cksum
argcasfile:
@echo $@
- @$(AWK) -f "$(srcdir)"/$@.awk ARGC=1 /no/such/file < "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @$(AWK) -f "$(srcdir)"/$@.awk ARGC=1 ' /no/such/file' < "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
@@ -1541,8 +1541,8 @@ exit2:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
exitval2:
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -1748,6 +1748,7 @@ hex2:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
hsprint:
+ @echo Expect $@ to fail with MinGW.
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(TESTOUTCMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2118,8 +2119,8 @@ rand:
else $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ; fi
randtest:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2241,14 +2242,14 @@ rstest3:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
rstest4:
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
rstest5:
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2324,8 +2325,8 @@ splitwht:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
status-close:
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2350,8 +2351,8 @@ strnum2:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
strtod:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2524,8 +2525,8 @@ fflush:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
getlnhd:
- @echo $@
@echo Expect $@ to fail with DJGPP and MinGW.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2587,39 +2588,39 @@ arraytype:
else $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ; fi
backw:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
clos1way:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=C; export GAWKLOCALE; \
AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
clos1way2:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
clos1way3:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
clos1way4:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
clos1way5:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2821,14 +2822,14 @@ gnuops2:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
gnuops3:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
gnureops:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2848,8 +2849,8 @@ icasers:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
id:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -2900,6 +2901,7 @@ indirectcall2:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
inf-nan-torture:
+ @echo Expect $@ to fail with MinGW.
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -3030,8 +3032,8 @@ nonfatal2:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
nonfatal3:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -3162,8 +3164,8 @@ regnul2:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
regx8bit:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -3420,6 +3422,7 @@ backsmalls2:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
fmttest:
+ @echo Expect $@ to fail with MinGW.
@echo $@ $(ZOS_FAIL)
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(TESTOUTCMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -3509,14 +3512,14 @@ fnmatch:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
fork:
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
fork2:
- @echo $@
@echo Expect $@ to fail with MinGW.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -3526,6 +3529,7 @@ functab4:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
functab5:
+ @echo Expect $@ to fail with MinGW.
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -3606,8 +3610,8 @@ mpfrrndeval:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
mpfrsqrt:
- @echo $@
@echo Expect $@ to fail with DJGPP.
+ @echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
diff --git a/pc/config.h b/pc/config.h
index a31f3b87..19f6fcae 100644
--- a/pc/config.h
+++ b/pc/config.h
@@ -464,7 +464,7 @@
#define PACKAGE_NAME "GNU Awk"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "GNU Awk 5.1.1b"
+#define PACKAGE_STRING "GNU Awk 5.1.1c"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gawk"
@@ -473,7 +473,7 @@
#define PACKAGE_URL "http://www.gnu.org/software/gawk/"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "5.1.1b"
+#define PACKAGE_VERSION "5.1.1c"
/* Define to 1 if *printf supports %a format */
#define PRINTF_HAS_A_FORMAT 1
@@ -534,7 +534,7 @@
/* Version number of package */
-#define VERSION "5.1.1b"
+#define VERSION "5.1.1c"
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
diff --git a/support/ChangeLog b/support/ChangeLog
index 94f51917..73f585c6 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,9 @@
+2021-05-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * support/dynarray_at_failure.c, support/dynarray_resize_clear.c:
+ New files.
+ * Makefile.am (libsupport_a_SOURCES): Add them.
+
2021-05-07 Arnold D. Robbins <arnold@skeeve.com>
* cdefs.h, libc-config.h, malloc/dynarray-skeleton.c,
diff --git a/support/Makefile.am b/support/Makefile.am
index 6a7ef615..18e50204 100644
--- a/support/Makefile.am
+++ b/support/Makefile.am
@@ -62,9 +62,11 @@ libsupport_a_SOURCES = \
verify.h \
xalloc.h \
malloc/dynarray.h \
- malloc/dynarray_resize.c \
+ malloc/dynarray_at_failure.c \
malloc/dynarray_emplace_enlarge.c \
- malloc/dynarray_finalize.c
+ malloc/dynarray_finalize.c \
+ malloc/dynarray_resize.c \
+ malloc/dynarray_resize_clear.c
# For some make's, e.g. OpenBSD, that don't define this
RM = rm -f
diff --git a/support/Makefile.in b/support/Makefile.in
index 719a38e8..2253488e 100644
--- a/support/Makefile.in
+++ b/support/Makefile.in
@@ -143,9 +143,11 @@ libsupport_a_LIBADD =
am__dirstamp = $(am__leading_dot)dirstamp
am_libsupport_a_OBJECTS = dfa.$(OBJEXT) getopt.$(OBJEXT) \
getopt1.$(OBJEXT) localeinfo.$(OBJEXT) random.$(OBJEXT) \
- regex.$(OBJEXT) malloc/dynarray_resize.$(OBJEXT) \
+ regex.$(OBJEXT) malloc/dynarray_at_failure.$(OBJEXT) \
malloc/dynarray_emplace_enlarge.$(OBJEXT) \
- malloc/dynarray_finalize.$(OBJEXT)
+ malloc/dynarray_finalize.$(OBJEXT) \
+ malloc/dynarray_resize.$(OBJEXT) \
+ malloc/dynarray_resize_clear.$(OBJEXT)
libsupport_a_OBJECTS = $(am_libsupport_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -165,9 +167,11 @@ am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/dfa.Po ./$(DEPDIR)/getopt.Po \
./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/localeinfo.Po \
./$(DEPDIR)/random.Po ./$(DEPDIR)/regex.Po \
+ malloc/$(DEPDIR)/dynarray_at_failure.Po \
malloc/$(DEPDIR)/dynarray_emplace_enlarge.Po \
malloc/$(DEPDIR)/dynarray_finalize.Po \
- malloc/$(DEPDIR)/dynarray_resize.Po
+ malloc/$(DEPDIR)/dynarray_resize.Po \
+ malloc/$(DEPDIR)/dynarray_resize_clear.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -382,9 +386,11 @@ libsupport_a_SOURCES = \
verify.h \
xalloc.h \
malloc/dynarray.h \
- malloc/dynarray_resize.c \
+ malloc/dynarray_at_failure.c \
malloc/dynarray_emplace_enlarge.c \
- malloc/dynarray_finalize.c
+ malloc/dynarray_finalize.c \
+ malloc/dynarray_resize.c \
+ malloc/dynarray_resize_clear.c
# For some make's, e.g. OpenBSD, that don't define this
@@ -431,12 +437,16 @@ malloc/$(am__dirstamp):
malloc/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) malloc/$(DEPDIR)
@: > malloc/$(DEPDIR)/$(am__dirstamp)
-malloc/dynarray_resize.$(OBJEXT): malloc/$(am__dirstamp) \
+malloc/dynarray_at_failure.$(OBJEXT): malloc/$(am__dirstamp) \
malloc/$(DEPDIR)/$(am__dirstamp)
malloc/dynarray_emplace_enlarge.$(OBJEXT): malloc/$(am__dirstamp) \
malloc/$(DEPDIR)/$(am__dirstamp)
malloc/dynarray_finalize.$(OBJEXT): malloc/$(am__dirstamp) \
malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/dynarray_resize.$(OBJEXT): malloc/$(am__dirstamp) \
+ malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/dynarray_resize_clear.$(OBJEXT): malloc/$(am__dirstamp) \
+ malloc/$(DEPDIR)/$(am__dirstamp)
libsupport.a: $(libsupport_a_OBJECTS) $(libsupport_a_DEPENDENCIES) $(EXTRA_libsupport_a_DEPENDENCIES)
$(AM_V_at)-rm -f libsupport.a
@@ -456,9 +466,11 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeinfo.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_at_failure.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_emplace_enlarge.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_finalize.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_resize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_resize_clear.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@@ -614,9 +626,11 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/localeinfo.Po
-rm -f ./$(DEPDIR)/random.Po
-rm -f ./$(DEPDIR)/regex.Po
+ -rm -f malloc/$(DEPDIR)/dynarray_at_failure.Po
-rm -f malloc/$(DEPDIR)/dynarray_emplace_enlarge.Po
-rm -f malloc/$(DEPDIR)/dynarray_finalize.Po
-rm -f malloc/$(DEPDIR)/dynarray_resize.Po
+ -rm -f malloc/$(DEPDIR)/dynarray_resize_clear.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-local distclean-tags
@@ -668,9 +682,11 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/localeinfo.Po
-rm -f ./$(DEPDIR)/random.Po
-rm -f ./$(DEPDIR)/regex.Po
+ -rm -f malloc/$(DEPDIR)/dynarray_at_failure.Po
-rm -f malloc/$(DEPDIR)/dynarray_emplace_enlarge.Po
-rm -f malloc/$(DEPDIR)/dynarray_finalize.Po
-rm -f malloc/$(DEPDIR)/dynarray_resize.Po
+ -rm -f malloc/$(DEPDIR)/dynarray_resize_clear.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/support/malloc/dynarray_at_failure.c b/support/malloc/dynarray_at_failure.c
new file mode 100644
index 00000000..4f840db7
--- /dev/null
+++ b/support/malloc/dynarray_at_failure.c
@@ -0,0 +1,39 @@
+/* Report an dynamic array index out of bounds condition.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
+#include <dynarray.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+__libc_dynarray_at_failure (size_t size, size_t index)
+{
+#ifdef _LIBC
+ char buf[200];
+ __snprintf (buf, sizeof (buf), "Fatal glibc error: "
+ "array index %zu not less than array length %zu\n",
+ index, size);
+#else
+ abort ();
+#endif
+}
+libc_hidden_def (__libc_dynarray_at_failure)
diff --git a/support/malloc/dynarray_resize_clear.c b/support/malloc/dynarray_resize_clear.c
new file mode 100644
index 00000000..9c43b00c
--- /dev/null
+++ b/support/malloc/dynarray_resize_clear.c
@@ -0,0 +1,39 @@
+/* Increase the size of a dynamic array and clear the new part.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
+#include <dynarray.h>
+#include <string.h>
+
+bool
+__libc_dynarray_resize_clear (struct dynarray_header *list, size_t size,
+ void *scratch, size_t element_size)
+{
+ size_t old_size = list->used;
+ if (!__libc_dynarray_resize (list, size, scratch, element_size))
+ return false;
+ /* __libc_dynarray_resize already checked for overflow. */
+ char *array = list->array;
+ memset (array + (old_size * element_size), 0,
+ (size - old_size) * element_size);
+ return true;
+}
+libc_hidden_def (__libc_dynarray_resize_clear)
diff --git a/test/ChangeLog b/test/ChangeLog
index f139b895..302cfc70 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,29 @@
+2021-05-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * argcasfile.ok: Add the leading space in the argument; see
+ pc/ChangeLog for explanation why.
+
+ General:
+ - Don't use egrep -q, not portable to Solaris 10.
+ - Use $(CMP) instead of cmp.
+
+ * iolint.awk: Change order so can use plain 'cat' instead of
+ 'exec cat'. Makes it available for MinGW.
+ * iolint.ok: Update after code changes.
+ * Makefile.am (iolint): Update shell recipe.
+
+2021-05-09 Eli Zaretskii <eliz@gnu.org>
+
+ * Makefile.am (EXPECTED_FAIL_MINGW): Update for the new tests.
+
+ * argcasfile.ok: Adjust for the leading space in the argument; see
+ pc/ChangeLog for explanation why.
+
+2021-05-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * iolint.awk: Use cksum instead of md5sum, for better portability.
+ * iolint.ok: Adjusted.
+
2021-05-05 Arnold D. Robbins <arnold@skeeve.com>
* CMakeLists.txt: Removed.
diff --git a/test/Makefile.am b/test/Makefile.am
index c0e37642..99fb3438 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1570,9 +1570,10 @@ EXPECTED_FAIL_DJGPP = \
# List of tests that fail on MinGW
EXPECTED_FAIL_MINGW = \
backbigs1 backsmalls1 clos1way6 devfd devfd1 devfd2 \
- errno exitval2 fork fork2 fts getfile getlnhd ignrcas3 inetdayt \
- inetecht mbfw1 mbprintf1 mbprintf4 mbstr1 mbstr2 pid pipeio2 \
- pty1 pty2 readdir rstest4 rstest5 status-close timeout
+ errno exitval2 fmttest fork fork2 fts functab5 \
+ getfile getlnhd hsprint ignrcas3 inetdayt inetecht inf-nan-torture \
+ mbfw1 mbprintf1 mbprintf4 mbstr1 mbstr2 \
+ pid pipeio2 pty1 pty2 readdir rstest4 rstest5 status-close timeout
# List of tests that fail on z/OS
EXPECTED_FAIL_ZOS = \
@@ -2279,9 +2280,9 @@ testext::
@echo $@
@$(AWK) ' /^(@load|BEGIN)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk
@$(AWK) -f ./testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \
- then cmp "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \
- else cmp "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; fi
+ @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \
+ then $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \
+ else $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; fi
getfile:
@echo $@
@@ -2419,9 +2420,9 @@ ignrcas3::
arrdbg:
@echo $@
@$(AWK) -v "okfile=./$@.ok" -v "mpfr_okfile=./$@-mpfr.ok" -f "$(srcdir)"/$@.awk | grep array_f >_$@ || echo EXIT CODE: $$? >> _$@
- @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \
- then cmp "."/$@-mpfr.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; \
- else cmp "."/$@.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; fi
+ @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \
+ then $(CMP) "."/$@-mpfr.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; \
+ else $(CMP) "."/$@.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; fi
sourcesplit:
@echo $@
@@ -2477,14 +2478,13 @@ typedregex4:
iolint:
@echo $@
@echo hello > 'echo hello'
- @touch 'exec cat' ; chmod 755 'exec cat'
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
- @-$(RM) -f cat 'echo hello' 'exec cat' f1 f2 md5sum
+ @-$(RM) -f cat 'echo hello' f1 f2 cksum
argcasfile:
@echo $@
- @$(AWK) -f "$(srcdir)"/$@.awk ARGC=1 /no/such/file < "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @$(AWK) -f "$(srcdir)"/$@.awk ARGC=1 ' /no/such/file' < "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
# Targets generated for other tests:
diff --git a/test/Makefile.in b/test/Makefile.in
index 967fbab8..4b113466 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1834,9 +1834,10 @@ EXPECTED_FAIL_DJGPP = \
# List of tests that fail on MinGW
EXPECTED_FAIL_MINGW = \
backbigs1 backsmalls1 clos1way6 devfd devfd1 devfd2 \
- errno exitval2 fork fork2 fts getfile getlnhd ignrcas3 inetdayt \
- inetecht mbfw1 mbprintf1 mbprintf4 mbstr1 mbstr2 pid pipeio2 \
- pty1 pty2 readdir rstest4 rstest5 status-close timeout
+ errno exitval2 fmttest fork fork2 fts functab5 \
+ getfile getlnhd hsprint ignrcas3 inetdayt inetecht inf-nan-torture \
+ mbfw1 mbprintf1 mbprintf4 mbstr1 mbstr2 \
+ pid pipeio2 pty1 pty2 readdir rstest4 rstest5 status-close timeout
# List of tests that fail on z/OS
@@ -2731,9 +2732,9 @@ testext::
@echo $@
@$(AWK) ' /^(@load|BEGIN)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk
@$(AWK) -f ./testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \
- then cmp "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \
- else cmp "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; fi
+ @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \
+ then $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \
+ else $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; fi
getfile:
@echo $@
@@ -2869,9 +2870,9 @@ ignrcas3::
arrdbg:
@echo $@
@$(AWK) -v "okfile=./$@.ok" -v "mpfr_okfile=./$@-mpfr.ok" -f "$(srcdir)"/$@.awk | grep array_f >_$@ || echo EXIT CODE: $$? >> _$@
- @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \
- then cmp "."/$@-mpfr.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; \
- else cmp "."/$@.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; fi
+ @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \
+ then $(CMP) "."/$@-mpfr.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; \
+ else $(CMP) "."/$@.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; fi
sourcesplit:
@echo $@
@@ -2924,14 +2925,13 @@ typedregex4:
iolint:
@echo $@
@echo hello > 'echo hello'
- @touch 'exec cat' ; chmod 755 'exec cat'
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
- @-$(RM) -f cat 'echo hello' 'exec cat' f1 f2 md5sum
+ @-$(RM) -f cat 'echo hello' f1 f2 cksum
argcasfile:
@echo $@
- @$(AWK) -f "$(srcdir)"/$@.awk ARGC=1 /no/such/file < "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @$(AWK) -f "$(srcdir)"/$@.awk ARGC=1 ' /no/such/file' < "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
diff --git a/test/argcasfile.ok b/test/argcasfile.ok
index 8b5d35b3..bdb69185 100644
--- a/test/argcasfile.ok
+++ b/test/argcasfile.ok
@@ -1,9 +1,9 @@
0 gawk
1 ARGC=1
-2 /no/such/file
+2 /no/such/file
0 gawk
1 ARGC=1
-2 /no/such/file
+2 /no/such/file
0 gawk
1 ARGC=1
-2 /no/such/file
+2 /no/such/file
diff --git a/test/iolint.awk b/test/iolint.awk
index 3f3bb22f..a866ed6d 100644
--- a/test/iolint.awk
+++ b/test/iolint.awk
@@ -38,10 +38,10 @@ BEGIN {
fflush()
# `%.*s' used for output file and output pipe"
- print "junk" > "md5sum"
- print "hello" | "md5sum"
- print close("md5sum")
- print close("md5sum")
+ print "junk" > "cksum" # cksum is more portable than md5sum
+ print "hello" | "cksum"
+ print close("cksum")
+ print close("cksum")
fflush()
# `%.*s' used for input pipe and output file
@@ -55,13 +55,11 @@ BEGIN {
# `%.*s' used for output file and two-way pipe
# `%.*s' used for output pipe and two-way pipe
# Not doing |& due to race condition and signals. sigh
- exec_cat = "exec cat"
- print "/bin/cat \"$@\"" > exec_cat
- print "hello" | exec_cat
- # print "hello" |& exec_cat
- print close(exec_cat)
- print close(exec_cat)
- # print close(exec_cat)
+ cat = "cat"
+ print "hello" | "cat"
+ print "/bin/cat \"$@\"" > "cat"
+ print close("cat")
+ print close("cat")
fflush()
# `%.*s' used for input pipe and output pipe
diff --git a/test/iolint.ok b/test/iolint.ok
index 70f1cd2b..0008b0aa 100644
--- a/test/iolint.ok
+++ b/test/iolint.ok
@@ -16,18 +16,18 @@ gawk: iolint.awk:35: warning: unnecessary mixing of `>' and `>>' for file `f2'
0
gawk: iolint.awk:37: warning: close: `f2' is not an open file, pipe or co-process
-1
-gawk: iolint.awk:42: warning: `md5sum' used for output file and output pipe
-b1946ac92492d2347c6235b4d2611184 -
+gawk: iolint.awk:42: warning: `cksum' used for output file and output pipe
+3015617425 6
0
0
gawk: iolint.awk:49: warning: `echo hello' used for input pipe and output file
0
0
-gawk: iolint.awk:60: warning: `exec cat' used for output file and output pipe
-hello
+gawk: iolint.awk:60: warning: `cat' used for output file and output pipe
0
+hello
0
-gawk: iolint.awk:69: warning: `echo hello' used for input pipe and output pipe
+gawk: iolint.awk:67: warning: `echo hello' used for input pipe and output pipe
hello
0
0