diff options
Diffstat (limited to 'pc')
-rw-r--r-- | pc/ChangeLog | 35 | ||||
-rw-r--r-- | pc/Makefile | 11 | ||||
-rw-r--r-- | pc/Makefile.tst | 360 | ||||
-rw-r--r-- | pc/config.h | 28 | ||||
-rw-r--r-- | pc/config.sed | 12 | ||||
-rw-r--r-- | pc/gawkmisc.pc | 58 | ||||
-rw-r--r-- | pc/popen.c | 2 |
7 files changed, 403 insertions, 103 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog index 1ff3bb1f..6300257c 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,8 +1,39 @@ +2017-01-21 Arnold D. Robbins <arnold@skeeve.com> + + * gawkmisc.pc: Fix a typo. + +2017-01-21 Eli Zaretskii <eliz@gnu.org> + + * Makefile.tst: Modify the locale values to valid ones on Windows. + + * gawkmisc.pc: Undef setlocale and include locale.h. + (lc_var, w32_setlocale): New functions. + + * Makefile (VAPTH): Set to allow Make to find sources in the + 'support' subdirectory. + (CFLAGS): Add "-I./support", as some headers are there. + (LIBOBJS): Add localeinfo$O. + (regex$O): Depend on regex_internal.c. + (localeinfo$O): New dependency. + + * config.sed (SIZEOF_UNSIGNED_INT, SIZEOF_UNSIGNED_LONG): Set to 4 + unconditioonally, as we no longer support 16-bit ports. The + previous definitions caused compilation errors, since config.h is + included by random.h before awk.h, where limits.h is included and + defines UINT_MAX etc. + * config.h: Regenerated. + + * Makefile.tst: Sync with test/Makefile.in. + 2016-11-04 Eli Zaretskii <eliz@gnu.org> * gawkmisc.pc (w32_maybe_set_errno) [__MINGW32__]: New function, to correct errno when it is not set to a useful value. +2016-10-23 Arnold D. Robbins <arnold@skeeve.com> + + * General: Remove trailing whitespace from all relevant files. + 2016-09-24 Eli Zaretskii <eliz@gnu.org> Fix compilation warnings on MinGW with the latest runtime. @@ -97,6 +128,10 @@ avoid warnings about 'usleep' in newer versions of mingw.org's MinGW runtime. +2016-01-28 Arnold D. Robbins <arnold@skeeve.com> + + * config.h: Updated to current. + 2015-05-29 Arnold D. Robbins <arnold@skeeve.com> * Makefile.tst (negtime): Sync with mainline. diff --git a/pc/Makefile b/pc/Makefile index 7bf8a7e1..921f320a 100644 --- a/pc/Makefile +++ b/pc/Makefile @@ -91,6 +91,9 @@ install = 1 # that $($X) can be expanded. DO_LNK = $($(LNK)) DO_BIND= $($(BIND)) +#------------------------------------------------------------------------ +# To allow Make find files in the support subdirectory. +VPATH = .;./support #======================================================================== # End of general configuration. Some platform-specific configuration # notes appear below. @@ -198,7 +201,7 @@ BIND = EMPTY PBIND = EMPTY EMPTY= -CFLAGS = $(CF) -DGAWK -I. -DHAVE_CONFIG_H -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) +CFLAGS = $(CF) -DGAWK -I. -I./support -DHAVE_CONFIG_H -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) # object files AWKOBJS1 = array$O builtin$O eval$O field$O floatcomp$O gawkmisc$O io$O main$O @@ -211,7 +214,7 @@ 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 +LIBOBJS= getopt$O getopt1$O dfa$O regex$O random$O localeinfo$O GAWKOBJS = $(ALLOBJS) $(LIBOBJS) @@ -260,10 +263,12 @@ getopt$O getopt1$O : getopt_int.h io$O: popen.h socket.h in.h -regex$O: regcomp.c regexec.c regex_internal.h +regex$O: regcomp.c regexec.c regex_internal.c regex_internal.h eval$O: interpret.h +localeinfo$O: localeinfo.h + # A bug in ndmake requires the following rule awkgram$O: awk.h awkgram.c $(CC) -c $(CFLAGS) awkgram.c diff --git a/pc/Makefile.tst b/pc/Makefile.tst index 3b724e5f..de4028e9 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -105,13 +105,13 @@ CP = cp #CP = : && command -c copy #CP = command.com /c copy -MV = cmd.exe /c ren -#MV = mv +#MV = cmd.exe /c ren +MV = mv -#MKDIR = mkdir +MKDIR = mkdir #MKDIR = gmkdir #MKDIR = : && command -c mkdir -MKDIR = command.com /c mkdir +#MKDIR = command.com /c mkdir # Set your unix-style date function here #DATE = date @@ -138,16 +138,16 @@ CLEANFILES = core core.* fmtspcl.ok # try to keep these sorted. each letter starts a new line BASIC_TESTS = \ - addcomma anchgsub argarray arrayind1 arrayparm arrayprm2 arrayprm3 \ + addcomma anchgsub anchor argarray arrayind1 arrayind2 arrayind3 arrayparm arrayprm2 arrayprm3 \ arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 aryprm9 arysubnm asgext awkpath \ back89 backgsub badassign1 badbuild \ callparam childin clobber closebad clsflnam compare compare2 concat1 concat2 \ - concat3 concat4 convfmt \ + concat3 concat4 concat5 convfmt \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ eofsplit exit2 exitval1 exitval2 exitval3 \ - fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ + fcall_exit fcall_exit2 fldchg fldchgnf fldterm fnamedat fnarray fnarray2 \ fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsnul1 fsrs fsspcoln \ fstabplus funsemnl funsmnam funstack \ getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \ @@ -164,15 +164,15 @@ BASIC_TESTS = \ opasnidx opasnslf \ paramasfunc1 paramasfunc2 \ paramdup paramres paramtyp paramuninitglobal parse1 parsefld parseme \ - pcntplus posix2008sub prdupval prec printf0 printf1 prmarscl prmreuse \ + pcntplus posix2008sub prdupval prec printf0 printf1 printfchar prmarscl prmreuse \ prt1eval prtoeval \ - rand range1 readbuf rebrackloc rebt8b1 redfilnm \ + rand randtest range1 readbuf rebrackloc rebt8b1 rebuild redfilnm \ regeq regexpbrack regexpbrack2 \ regexprange regrange reindops \ reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ rstest3 rstest4 rstest5 rswhite \ scalar sclforin sclifin sigpipe1 sortempty sortglos splitargv splitarr splitdef \ - splitvar splitwht strcat1 strnum1 strtod subamp subback subi18n \ + splitvar splitwht status-close strcat1 strnum1 strnum2 strtod subamp subback subi18n \ subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \ uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \ wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \ @@ -185,33 +185,39 @@ UNIX_TESTS = \ GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ backw badargs beginfile1 beginfile2 binmode1 charasbytes \ - colonwarn clos1way clos1way2 clos1way3 clos1way4 clos1way5 \ - crlf dbugeval delsub devfd devfd1 devfd2 dumpvars exit \ - fieldwdth fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \ + colonwarn clos1way clos1way2 clos1way3 clos1way4 clos1way5 clos1way6 \ + crlf dbugeval dbugeval2 dbugtypedre1 dbugtypedre2 delsub \ + devfd devfd1 devfd2 dumpvars errno exit \ + fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \ functab1 functab2 functab3 fwtest fwtest2 fwtest3 \ - genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ - icasefs icasers id igncdym igncfs ignrcas2 ignrcase \ + genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops gsubind \ + icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase \ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \ - include include2 indirectbuiltin indirectcall indirectcall2 \ - lint lintold lintwarn \ + include include2 indirectbuiltin indirectcall indirectcall2 intarray \ + lint lintexp lintindex lintint lintlength lintold lintset lintwarn \ mixed1 manyfiles match1 match2 match3 mbstr1 mbstr2 \ muldimposix \ nastyparm negtime next nondec nondec2 \ + nonfatal1 nonfatal2 nonfatal3 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \ - profile0 profile1 profile2 profile3 profile4 profile5 profile6 \ - profile7 profile8 pty1 \ + profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 \ + profile8 profile9 profile10 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ - rsstart2 rsstart3 rstest6 shadow sortfor sortfor2 sortu split_after_fpat \ + rsstart2 rsstart3 rstest6 shadow shadowbuiltin \ + sortfor sortfor2 sortu split_after_fpat \ splitarg4 strftime \ - strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ + strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 symtab10 \ + typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \ + timeout \ watchpoint1 +ARRAYDEBUG_TESTS = arrdbg EXTRA_TESTS = inftest regtest ignrcas3 INET_TESTS = inetdayu inetdayt inetechu inetecht MACHINE_TESTS = double1 double2 fmtspcl intformat MPFR_TESTS = mpfrnr mpfrnegzero mpfrmemok1 mpfrrem mpfrrnd mpfrieee \ - mpfrexprange mpfrsort mpfrsqrt mpfrbigint + mpfrexprange mpfrsort mpfrsqrt mpfrbigint mpfrstrtonum mpgforcenum LOCALE_CHARSET_TESTS = \ asort asorti backbigs1 backsmalls1 backsmalls2 \ @@ -219,13 +225,13 @@ LOCALE_CHARSET_TESTS = \ mbprintf1 mbprintf2 mbprintf3 mbprintf4 rebt8b2 rtlenmb sort1 sprintfc SHLIB_TESTS = \ - fnmatch filefuncs fork fork2 fts functab4 inplace1 inplace2 inplace3 \ + apiterm fnmatch filefuncs fork fork2 fts functab4 getfile inplace1 inplace2 inplace3 \ ordchr ordchr2 readdir readfile readfile2 revout revtwoway rwarray testext time # List of the tests which should be run with --lint option: NEED_LINT = \ - defref fmtspcl lintwarn noeffect nofmtch shadow \ + defref fmtspcl lintexp lintindex lintint lintlength lintwarn noeffect nofmtch shadow \ uninit2 uninit3 uninit4 uninit5 uninitialized @@ -257,7 +263,7 @@ check: msg \ printlang \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ - extend-msg-start gawk-extensions extend-msg-end \ + extend-msg-start gawk-extensions arraydebug-tests extend-msg-end \ machine-msg-start machine-tests machine-msg-end \ charset-tests-all \ shlib-msg-start shlib-tests shlib-msg-end \ @@ -271,15 +277,7 @@ unix-tests: $(UNIX_TESTS) gawk-extensions: $(GAWK_EXT_TESTS) charset-tests-all: - @if locale -a | grep -i 'en_US.UTF.*8' > /dev/null && \ - locale -a | grep -i 'ru_RU.UTF.*8' > /dev/null && \ - locale -a | grep -i 'ja_JP.UTF.*8' > /dev/null ; \ - then \ - $(MAKE) charset-msg-start charset-tests charset-msg-end; \ - else \ - echo %%%%%%%%%% Inadequate locale support: skipping charset tests. ; \ - echo %%%%%%%%%% At least en_US.UTF-8, ru_RU.UTF-8 and ja_JP.UTF-8 are needed. ; \ - fi + $(MAKE) charset-msg-start charset-tests charset-msg-end charset-tests: $(LOCALE_CHARSET_TESTS) @@ -295,13 +293,16 @@ machine-tests: $(MACHINE_TESTS) # in the next shlib-tests. mpfr-tests: @if $(AWK) --version | $(AWK) ' /MPFR/ { exit 1 }' ; then \ - echo MPFR tests not supported on this system ; \ + @echo MPFR tests not supported on this system ; \ else $(MAKE) $(MPFR_TESTS) ; \ fi +arraydebug-tests: + @echo gawk is not compiled to support the array debug tests + shlib-tests: @if $(AWK) --version | $(AWK) ' /API/ { exit 1 }' ; then \ - echo shlib tests not supported on this system ; \ + @echo shlib tests not supported on this system ; \ else $(MAKE) shlib-real-tests ; \ fi @@ -345,9 +346,7 @@ charset-msg-start: @echo "======== Starting tests that can vary based on character set or locale support ========" @echo "**************************************************************************" @echo "* Some or all of these tests may fail if you have inadequate or missing *" - @echo "* locale support. At least en_US.UTF-8, ru_RU.UTF-8 and ja_JP.UTF-8 are *" - @echo "* needed. However, if you see this message, the Makefile thinks you have *" - @echo "* what you need ... *" + @echo "* locale support... *" @echo "**************************************************************************" charset-msg-end: @@ -367,7 +366,7 @@ mpfr-msg-end: lc_num1: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -481,6 +480,12 @@ devfd:: @$(AWK) 1 /dev/fd/4 /dev/fd/5 4<"$(srcdir)"/devfd.in4 5<"$(srcdir)"/devfd.in5 >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +errno: + @echo $@ + @echo Expect errno to fail with MinGW due to error message differences + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fflush:: @echo $@ @"$(srcdir)"/fflush.sh >_$@ @@ -664,49 +669,49 @@ rsnulbig2:: wideidx:: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ wideidx2:: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ widesub:: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ widesub2:: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ widesub3:: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ widesub4:: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ignrcas2:: @echo $@ - @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + @GAWKLOCALE=ENU_USA.1252 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ subamp:: @echo $@ - @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + @GAWKLOCALE=ENU_USA.1252 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -749,7 +754,7 @@ rtlen01:: rtlenmb:: @echo $@ - @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + @GAWKLOCALE=ENU_USA.1252 ; export GAWKLOCALE ; \ "$(srcdir)"/rtlen.sh >_$@ || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -758,6 +763,16 @@ nondec2:: @$(AWK) --non-decimal-data -v a=0x1 -f "$(srcdir)"/$@.awk >_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +intarray:: + @echo $@ + @$(AWK) --non-decimal-data -f "$(srcdir)"/$@.awk >_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +forcenum:: + @echo $@ + @$(AWK) --non-decimal-data -f "$(srcdir)"/$@.awk >_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + nofile:: @echo $@ @$(AWK) '{}' no/such/file >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -773,12 +788,12 @@ binmode1:: subi18n:: @echo $@ - @GAWKLOCALE=en_US.UTF-8 ; $(AWK) -f "$(srcdir)"/$@.awk > _$@ + @GAWKLOCALE=ENU_USA.1252 ; $(AWK) -f "$(srcdir)"/$@.awk > _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ concat4:: @echo $@ - @GAWKLOCALE=en_US.UTF-8 ; $(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in > _$@ + @GAWKLOCALE=ENU_USA.1252 ; $(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in > _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ devfd1:: @@ -801,13 +816,13 @@ mixed1:: mtchi18n:: @echo $@ - @GAWKLOCALE=ru_RU.UTF-8 ; export GAWKLOCALE ; \ + @GAWKLOCALE=RUS_RUS.1251 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ reint2:: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) --re-interval -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -819,33 +834,33 @@ localenl:: mbprintf1:: @echo $@ @echo Expect mbprintf1 to fail with DJGPP and MinGW. - @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + @GAWKLOCALE=ENU_USA.1252 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ mbprintf2:: @echo $@ - @GAWKLOCALE=ja_JP.UTF-8 ; export GAWKLOCALE ; \ + @GAWKLOCALE=JPN_JPN.932 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ mbprintf3:: @echo $@ - @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + @GAWKLOCALE=ENU_USA.1252 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ mbprintf4:: @echo $@ @echo Expect mbprintf4 to fail with MinGW and DJGPP - @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + @GAWKLOCALE=ENU_USA.1252 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ mbfw1:: @echo $@ @echo Expect mbfw1 to fail with DJGPP and MinGW. - @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + @GAWKLOCALE=ENU_USA.1252 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -857,14 +872,14 @@ gsubtst6:: mbstr1:: @echo $@ @echo Expect mbstr1 to fail with MinGW. - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ mbstr2:: @echo $@ @echo Expect mbstr2 to fail with MinGW. - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -902,7 +917,7 @@ profile1: @$(AWK) --pretty-print=ap-$@.out -f "$(srcdir)"/xref.awk "$(srcdir)"/dtdgport.awk > _$@.out1 @$(AWK) -f ./ap-$@.out "$(srcdir)"/dtdgport.awk > _$@.out2 ; rm ap-$@.out @$(CMP) _$@.out1 _$@.out2 && rm _$@.out[12] || { echo EXIT CODE: $$? >>_$@ ; \ - cp "$(srcdir)"/dtdgport.awk > $@.ok ; } + cp "$(srcdir)"/dtdgport.awk $@.ok ; } profile2: @echo $@ @@ -918,13 +933,15 @@ profile3: profile4: @echo $@ + @echo Expect profile4 to fail with MinGW @GAWK_NO_PP_RUN=1 $(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ profile5: @echo $@ - @GAWK_NO_PP_RUN=1 $(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null + @echo Expect profile5 to abort with MinGW + @-GAWK_NO_PP_RUN=1 $(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out # @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @-$(TESTOUTCMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -943,10 +960,21 @@ profile7: profile8: @echo $@ + @echo Expect profile8 to fail with MinGW @$(AWK) --pretty=ap-$@.out -f "$(srcdir)"/$@.awk < /dev/null @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile9: + @echo $@ + @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +profile10: + @echo $@ + @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + posix2008sub: @echo $@ @$(AWK) --posix -f "$(srcdir)"/$@.awk > _$@ 2>&1 @@ -959,14 +987,13 @@ next: exit: @echo $@ - @echo Expect exit to fail with MinGW due to null vs nul difference @-AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 # @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @-$(TESTOUTCMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ rri1:: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -1010,6 +1037,16 @@ mpfrsqrt: @$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1 @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mpfrstrtonum: + @echo $@ + @$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1 + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mpgforcenum: + @echo $@ + @$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1 + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + mpfrrem: @echo $@ @$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1 @@ -1121,6 +1158,11 @@ testext:: @$(AWK) -f ./testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk +getfile: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -v TESTEXT_QUIET=1 -ltestext -f $@.awk < $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + readdir: @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 an NFS filesystem.; \ @@ -1157,7 +1199,7 @@ charasbytes: # @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ # AWKPATH="$(srcdir)" $(AWK) -b -f $@.awk "$(srcdir)"/$@.in | \ # od -c -t x1 | tr ' ' ' ' | sed -e 's/ */ /g' -e 's/ *$$//' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -b -v BINMODE=2 -f $@.awk "$(srcdir)"/$@.in | \ od -c -t x1 | tr ' ' ' ' | sed -e 's/ */ /g' -e 's/ *$$//' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -1200,27 +1242,32 @@ clos1way: dfamb1: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +randtest:: + @echo $@ + @GAWK="$(AWKPROG)" "$(srcdir)"/randtest.sh >_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + backbigs1: @echo $@ @echo Expect backbigs1 to fail with MinGW and DJGPP - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ backsmalls1: @echo $@ @echo Expect backsmalls1 to fail with MinGW and DJGPP - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ backsmalls2: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -1233,7 +1280,7 @@ dbugeval:: printhuge:: @echo $@ - @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -1262,6 +1309,21 @@ negtime:: @TZ=GMT AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @AWKPATH="$(srcdir)" $(AWK) -f checknegtime.awk "$(srcdir)"/$@.ok _$@ && rm -f _$@ +dbugtypedre1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -D -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +dbugtypedre2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -D -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +dbugeval2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -D -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + muldimposix:: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --posix >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1316,11 +1378,26 @@ anchgsub: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +anchor: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + arrayind1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +arrayind2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +arrayind3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + arrayparm: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1486,6 +1563,11 @@ concat3: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +concat5: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + convfmt: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1572,6 +1654,11 @@ fldchgnf: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +fldterm: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fnamedat: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2009,6 +2096,11 @@ printf1: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +printfchar: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + prmarscl: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2056,6 +2148,11 @@ rebt8b1: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +rebuild: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + regeq: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2193,6 +2290,12 @@ splitwht: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +status-close: + @echo $@ + @echo Expect status-close to fail with MinGW + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + strcat1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2203,6 +2306,11 @@ strnum1: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +strnum2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + strtod: @echo $@ @echo Expect strtod to fail with DJGPP. @@ -2360,6 +2468,12 @@ clos1way5: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +clos1way6: + @echo $@ + @echo Expect clos1way6 to fail with MinGW + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + crlf: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2476,6 +2590,11 @@ gnureops: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +gsubind: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + icasefs: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2502,6 +2621,11 @@ igncfs: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +ignrcas4: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + ignrcase: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2532,11 +2656,36 @@ lint: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +lintexp: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +lintindex: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +lintint: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +lintlength: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + lintold: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint-old < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +lintset: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + lintwarn: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2567,6 +2716,21 @@ nondec: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +nonfatal1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nonfatal2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nonfatal3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + patsplit: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2628,6 +2792,11 @@ shadow: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +shadowbuiltin: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + sortfor: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2658,6 +2827,11 @@ strtonum: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +strtonum1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + switch2: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2693,6 +2867,47 @@ symtab7: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +typedregex1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typedregex2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typedregex3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typeof1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typeof2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typeof3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typeof4: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +timeout: + @echo $@ + @echo Expect timeout to fail with MinGW + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + double1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2754,6 +2969,11 @@ sprintfc: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +apiterm: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fnmatch: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/pc/config.h b/pc/config.h index d584973a..3bed5bb9 100644 --- a/pc/config.h +++ b/pc/config.h @@ -201,6 +201,9 @@ /* Define to 1 if you have the `setsid' function. */ #undef HAVE_SETSID +/* Define to 1 if you have the `sigprocmask' function. */ +#undef HAVE_SIGPROCMASK + /* Define to 1 if you have the `snprintf' function. */ #ifdef __MINGW32__ #define HAVE_SNPRINTF 1 @@ -378,6 +381,9 @@ #define HAVE_USLEEP 1 #endif +/* Define to 1 if you have the `waitpid' function. */ +#undef HAVE_WAITPID + /* Define to 1 if you have the <wchar.h> header file. */ #ifdef __MINGW32__ #define HAVE_WCHAR_H 1 @@ -422,9 +428,6 @@ /* enable severe portability problems */ #undef I_DONT_KNOW_WHAT_IM_DOING -/* libc is broken for regex handling */ -#undef LIBC_IS_BORKED - /* disable lint checks */ #undef NO_LINT @@ -438,7 +441,7 @@ #define PACKAGE_NAME "GNU Awk" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU Awk 4.1.4" +#define PACKAGE_STRING "GNU Awk 4.1.60" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gawk" @@ -447,29 +450,16 @@ #define PACKAGE_URL "http://www.gnu.org/software/gawk/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.1.4" +#define PACKAGE_VERSION "4.1.60" /* Define to 1 if *printf supports %F format */ #undef PRINTF_HAS_F_FORMAT -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -#if defined(__DJGPP__) || defined(__MINGW32__) -#include <limits.h> -#endif - /* The size of `unsigned int', as computed by sizeof. */ -#if UINT_MAX == 65536 -#define SIZEOF_UNSIGNED_INT 2 -#elif UINT_MAX == 4294967295U #define SIZEOF_UNSIGNED_INT 4 -#endif /* The size of `unsigned long', as computed by sizeof. */ -#if ULONG_MAX == 4294967295UL #define SIZEOF_UNSIGNED_LONG 4 -#endif /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -512,7 +502,7 @@ /* Version number of package */ -#define VERSION "4.1.4" +#define VERSION "4.1.60" /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE diff --git a/pc/config.sed b/pc/config.sed index a95ee2ef..ae2200c6 100644 --- a/pc/config.sed +++ b/pc/config.sed @@ -247,16 +247,8 @@ s/^#undef RETSIGTYPE *$/#define RETSIGTYPE void/ #if defined(__DJGPP__) || defined(__MINGW32__)\ #include <limits.h>\ #endif -/^#undef SIZEOF_UNSIGNED_INT *$/c\ -#if UINT_MAX == 65536\ -#define SIZEOF_UNSIGNED_INT 2\ -#elif UINT_MAX == 4294967295U\ -#define SIZEOF_UNSIGNED_INT 4\ -#endif -/^#undef SIZEOF_UNSIGNED_LONG *$/c\ -#if ULONG_MAX == 4294967295UL\ -#define SIZEOF_UNSIGNED_LONG 4\ -#endif +s/^#undef SIZEOF_UNSIGNED_INT *$/#define SIZEOF_UNSIGNED_INT 4/ +s/^#undef SIZEOF_UNSIGNED_LONG *$/#define SIZEOF_UNSIGNED_LONG 4/ s/^#undef STDC_HEADERS *$/#define STDC_HEADERS 1/ s/^#undef TIME_WITH_SYS_TIME *$/#define TIME_WITH_SYS_TIME 1/ /^#undef inline *$/c\ diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index 817e8167..c6c92a46 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -619,6 +619,64 @@ wctob (wint_t wc) return EOF; } + +#undef setlocale +#include <locale.h> + +/* On Posix systems, 'setlocale' looks at LC_* variables in the + environment, and Gawk users might expect that on Windows as well. + The replacement implementation below does that, and also fixes a + few additional quirks with locales on Windows. */ +static const char * +lc_var (int category) +{ + static const char *loc_name[LC_MAX - LC_MIN + 1] = { + "LC_ALL", "LC_COLLATE", "LC_CTYPE", "LC_MONETARY", "LC_NUMERIC", "LC_TIME" + }; + + /* This function assumes LC_* categories are small numbers between 0 + and 5, as shown above, so if that changes at some point, complain + vociferously. */ + if (LC_ALL != 0 || LC_CTYPE != 2 || LC_TIME != 5) + abort (); + /* Ensured by the caller, so should never happen. */ + if (category < LC_MIN || category > LC_MAX) + return "????"; + return loc_name[category]; +} + +char * +w32_setlocale (int category, const char *value) +{ + const char *new_locale = value; + + if (LC_MIN <= category && category <= LC_MAX + && value && *value == '\0') + { + const char *lc_val = getenv ("LC_ALL"); + + if (!lc_val) + lc_val = getenv (lc_var (category)); + if (!lc_val) + lc_val = getenv ("LANG"); + if (lc_val) + new_locale = lc_val; + } + + /* If VALUE includes a codeset, i.e. a Windows codepage number, we + must also set the LC_CTYPE locale to the same value, because + LC_CTYPE is the only category which is documented to be able to + change the codepage. */ + if (category != LC_ALL && category != LC_CTYPE) + { + const char *p = strchr (new_locale, '.'); + + if (p && isdigit (p[1])) + setlocale (LC_CTYPE, new_locale); + } + return setlocale (category, new_locale); +} + /* * On MS-Windows with MinGW, execvp causes the shell and the re-exec'ed * dgawk to compete for the keyboard input. @@ -104,7 +104,7 @@ scriptify(const char *command) free(cmd); cmd = NULL; } - if (fp) fclose(fp); + if (fp) fclose(fp); return(cmd); } |