diff options
author | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2014-06-24 13:18:33 +0200 |
---|---|---|
committer | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2014-06-24 13:18:33 +0200 |
commit | f1245d04a9f076773c60499b468f44ed9c91b59b (patch) | |
tree | 2b49234400150bfaac7ebf8c017562300edc7471 /pc | |
parent | ee9707cc44eea3ca64cb71666ac3e8ed26a3bb7f (diff) | |
parent | 78ded8ee8f11a321c96417e7d02dac2f5723a221 (diff) | |
download | egawk-f1245d04a9f076773c60499b468f44ed9c91b59b.tar.gz egawk-f1245d04a9f076773c60499b468f44ed9c91b59b.tar.bz2 egawk-f1245d04a9f076773c60499b468f44ed9c91b59b.zip |
Merge remote-tracking branch 'origin/master' into cmake
Diffstat (limited to 'pc')
-rw-r--r-- | pc/ChangeLog | 47 | ||||
-rw-r--r-- | pc/Makefile | 11 | ||||
-rw-r--r-- | pc/Makefile.tst | 80 | ||||
-rw-r--r-- | pc/config.h | 12 | ||||
-rw-r--r-- | pc/popen.c | 23 |
5 files changed, 121 insertions, 52 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog index eb5636e9..a66edae9 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,50 @@ +2014-04-17 Scott Deifik <scottd.mail@sbcglobal.net> + + * Makefile.tst: Add readfile2 test. + +2014-04-08 Arnold D. Robbins <arnold@skeeve.com> + + * 4.1.1: Release tar ball made. + +2014-02-03 Scott Deifik <scottd.mail@sbcglobal.net> + + * Makefile.tst: Include original test/Makefile.in lines as + comments. + +2014-01-28 Eli Zaretskii <eliz@gnu.org> + + * Makefile.tst (strftime): Pass the value of 'date' command + through the DATECMD variable. + (readdir): Adapt to changes in test/readdir0.awk. + +2014-01-20 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.tst (mbprintf4, backbigs1, backsmalls1): Add warning + that the tests are expected to fail with DJGPP. + +2014-01-24 Scott Deifik <scottd.mail@sbcglobal.net> + + * Makefile.tst: Sync with mainline. + +2014-01-20 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.tst (split_after_fpat, mpfrnegzero): Added, to + sync with main test Makefile. + +2014-01-15 Eli Zaretskii <eliz@gnu.org> + + * Makefile.tst (mbprintf4, profile5, backbigs1, backsmalls1): + Announce expected failures. + (fts): Fail gracefully, to avoid bailing out of the test suite too + early. + + * popen.c (os_system): Use spawnl, and quote the command line, to + be consistent with what gawk_popen does. + (os_popen) [__MINGW32__]: Don't scriptify the command, to be + consistent with gawk_popen. + (os_pclose) [__MINGW32__]: Update to match os_open: no need to + unlink the script file. + 2013-12-10 Scott Deifik <scottd.mail@sbcglobal.net> * gawkmisc.c (init_sockets): Move into the right part of the diff --git a/pc/Makefile b/pc/Makefile index 9d98cb1c..d1c08069 100644 --- a/pc/Makefile +++ b/pc/Makefile @@ -6,6 +6,17 @@ # Tested with GNU make on Windows, OS/2 and DOS. +# Copyright (C) 1989-2014 Free Software Foundation, Inc. + +# This Makefile is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + default: @echo "Enter $(MAK) target " @echo " where 'target' is chosen from " diff --git a/pc/Makefile.tst b/pc/Makefile.tst index 6a2216a0..610704e4 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -1,6 +1,6 @@ # Makefile for GNU Awk test suite. # -# Copyright (C) 1988-2013 the Free Software Foundation, Inc. +# Copyright (C) 1988-2014 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -141,8 +141,7 @@ BASIC_TESTS = \ arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 arysubnm asgext awkpath \ - back89 backgsub \ - badassign1 \ + back89 backgsub badassign1 \ childin clobber closebad clsflnam compare compare2 concat1 concat2 \ concat3 concat4 convfmt \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ @@ -194,14 +193,16 @@ GAWK_EXT_TESTS = \ patsplit posix printfbad1 printfbad2 printfbad3 procinfs \ profile1 profile2 profile3 profile4 profile5 pty1 \ rebuf regx8bit reginttrad reint reint2 rsstart1 \ - rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ + rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \ + splitarg4 strftime \ strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 EXTRA_TESTS = inftest regtest INET_TESTS = inetdayu inetdayt inetechu inetecht MACHINE_TESTS = double1 double2 fmtspcl intformat -MPFR_TESTS = mpfrnr mpfrrnd mpfrieee mpfrexprange mpfrsort mpfrbigint +MPFR_TESTS = mpfrnr mpfrnegzero mpfrrnd mpfrieee mpfrexprange \ + mpfrsort mpfrbigint LOCALE_CHARSET_TESTS = \ asort asorti backbigs1 backsmalls1 backsmalls2 \ fmttest fnarydel fnparydl jarebug lc_num1 mbfw1 \ @@ -209,7 +210,7 @@ LOCALE_CHARSET_TESTS = \ SHLIB_TESTS = \ fnmatch filefuncs fork fork2 fts functab4 inplace1 inplace2 inplace3 \ - ordchr ordchr2 readdir readfile revout revtwoway rwarray testext time + ordchr ordchr2 readdir readfile readfile2 revout revtwoway rwarray testext time # List of the tests which should be run with --lint option: NEED_LINT = \ @@ -410,7 +411,7 @@ getline2:: awkpath:: @echo $@ - @AWKPATH=""$(srcdir)"$(PATH_SEPARATOR)"$(srcdir)"/lib" $(AWK) -f awkpath.awk >_$@ + @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ argtest:: @@ -429,15 +430,13 @@ nonl:: @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ strftime:: - @echo This test could fail on slow machines or on a minute boundary, - @echo so if it does, double check the actual results: @echo $@ # @GAWKLOCALE=C; export GAWKLOCALE; \ # TZ=GMT0; export TZ; \ -# (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f "$(srcdir)"/strftime.awk +# $(AWK) -v OUTPUT=_$@ -f "$(srcdir)"/strftime.awk @GAWKLOCALE=C; export GAWKLOCALE; \ TZ=GMT0; export TZ; \ - (LC_ALL=C $(DATE)) | $(AWK) -v OUTPUT=_$@ -f "$(srcdir)"/strftime.awk + $(AWK) -v OUTPUT=_$@ -v DATECMD="$(DATE)" -f "$(srcdir)"/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @@ -494,7 +493,7 @@ nors:: @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ fmtspcl.ok: fmtspcl.tok - @$(AWK) -v "sd="$(srcdir)"" 'BEGIN {pnan = sprintf("%g",sqrt(-1)); nnan = sprintf("%g",-sqrt(-1)); pinf = sprintf("%g",-log(0)); ninf = sprintf("%g",log(0))} {sub(/positive_nan/,pnan); sub(/negative_nan/,nnan); sub(/positive_infinity/,pinf); sub(/negative_infinity/,ninf); sub(/fmtspcl/,(sd"/fmtspcl")); print}' < "$(srcdir)"/fmtspcl.tok > $@ 2>/dev/null + @$(AWK) -v "sd=$(srcdir)" 'BEGIN {pnan = sprintf("%g",sqrt(-1)); nnan = sprintf("%g",-sqrt(-1)); pinf = sprintf("%g",-log(0)); ninf = sprintf("%g",log(0))} {sub(/positive_nan/,pnan); sub(/negative_nan/,nnan); sub(/positive_infinity/,pinf); sub(/negative_infinity/,ninf); sub(/fmtspcl/,(sd"/fmtspcl")); print}' < "$(srcdir)"/fmtspcl.tok > $@ 2>/dev/null fmtspcl: fmtspcl.ok @echo $@ @@ -660,7 +659,7 @@ widesub4:: ignrcas2:: @echo $@ - @GAWKLOCALE=en_US ; export GAWKLOCALE ; \ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -797,6 +796,7 @@ mbprintf3:: mbprintf4:: @echo $@ + @echo Expect mbprintf4 to fail with MinGW and DJGPP @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -870,6 +870,7 @@ profile4: profile5: @echo $@ + @echo Expect profile5 to fail with MinGW due to 3 digits in %e output @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 _$@ @@ -911,6 +912,11 @@ mpfrrnd: @$(AWK) -M -vPREC=53 -f "$(srcdir)"/$@.awk > _$@ 2>&1 @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mpfrnegzero: + @echo $@ + @$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1 + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + mpfrnr: @echo $@ @$(AWK) -M -vPREC=113 -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in > _$@ @@ -929,7 +935,7 @@ mpfrbigint: jarebug:: @echo $@ @echo Expect jarebug to fail with DJGPP and MinGW. - @"$(srcdir)"/$@.sh "$(AWKPROG)" ""$(srcdir)"/$@.awk" ""$(srcdir)"/$@.in" "_$@" + @"$(srcdir)"/$@.sh "$(AWKPROG)" "$(srcdir)"/$@.awk "$(srcdir)"/$@.in "_$@" @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ordchr2:: @@ -943,6 +949,11 @@ readfile:: @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok +readfile2:: + @echo $@ + @$(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.awk "$(srcdir)"/readdir.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + include2:: @echo $@ @AWKPATH="$(srcdir)" $(AWK) --include inclib 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1017,8 +1028,8 @@ inplace3:: testext:: @echo $@ -# @$(AWK) '/^(@load|BEGIN)/,/^}/' $(top_srcdir)/extension/testext.c > testext.awk - @$(AWK) ' /^(@load|BEGIN)/,/^}/' $(top_srcdir)/extension/testext.c > testext.awk +# @$(AWK) '/^(@load|BEGIN)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk + @$(AWK) ' /^(@load|BEGIN)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk @$(AWK) -f testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk @@ -1029,19 +1040,28 @@ readdir: fi @echo $@ @echo This test may fail on MinGW if $(LS) does not report full Windows file index as the inode - @$(AWK) -f "$(srcdir)"/readdir.awk $(top_srcdir) > _$@ -# @ls -afli $(top_srcdir) | sed 1d | $(AWK) -f "$(srcdir)"/readdir0.awk -v extout=_$@ $(top_srcdir) > $@.ok - @$(LS) -afli $(top_srcdir) | sed 1d | $(AWK) -f "$(srcdir)"/readdir0.awk -v extout=_$@ $(top_srcdir) > $@.ok - @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ + @$(AWK) -f "$(srcdir)"/readdir.awk "$(top_srcdir)" > _$@ +# @ls -afi "$(top_srcdir)" > _dirlist + @$(LS) -afi "$(top_srcdir)" > _dirlist +# @ls -lna "$(top_srcdir)" | sed 1d > _longlist + @$(LS) -lna "$(top_srcdir)" | sed 1d > _longlist + @$(AWK) -f "$(srcdir)"/readdir0.awk -v extout=_$@ \ + -v dirlist=_dirlist -v longlist=_longlist > $@.ok + @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ _dirlist _longlist fts: - @if [ "`uname`" = IRIX ]; then \ + @case `uname` in \ + IRIX) \ echo This test may fail on IRIX systems when run on an NFS filesystem.; \ - echo If it does, try rerunning on an xfs filesystem. ; \ - fi + echo If it does, try rerunning on an xfs filesystem. ;; \ + CYGWIN*) \ + echo This test may fail on CYGWIN systems when run on an NFS filesystem.; \ + echo If it does, try rerunning on an ntfs filesystem. ;; \ + esac @echo $@ @echo Expect $@ to fail with MinGW because function 'fts' is not defined. - @$(AWK) -f "$(srcdir)"/fts.awk +# @$(AWK) -f "$(srcdir)"/fts.awk + @$(AWK) -f "$(srcdir)"/fts.awk || echo EXIT CODE: $$? >>_$@ @-$(CMP) $@.ok _$@ && rm -f $@.ok _$@ charasbytes: @@ -1098,12 +1118,14 @@ dfamb1: backbigs1: @echo $@ + @echo Expect backbigs1 to fail with MinGW and DJGPP @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ 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; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -1113,7 +1135,6 @@ backsmalls2: @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -2308,6 +2329,11 @@ sortu: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +split_after_fpat: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + splitarg4: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2471,8 +2497,8 @@ time: # Targets generated for other tests: $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests - files=`cd ""$(srcdir)"" && echo *.awk *.in`; \ - $(AWK) -f "$(srcdir)"/Gentests ""$(srcdir)"/Makefile.am" $$files > "$(srcdir)"/Maketests + files=`cd "$(srcdir)" && echo *.awk *.in`; \ + $(AWK) -f "$(srcdir)"/Gentests "$(srcdir)"/Makefile.am $$files > "$(srcdir)"/Maketests clean: rm -fr _* core core.* fmtspcl.ok junk strftime.ok test1 test2 \ diff --git a/pc/config.h b/pc/config.h index a07228c9..c5d78a96 100644 --- a/pc/config.h +++ b/pc/config.h @@ -49,9 +49,6 @@ #define HAVE_DECL_TZNAME 1 #endif -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - /* Define to 1 if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 @@ -372,9 +369,6 @@ #define HAVE_USLEEP 1 #endif -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - /* Define to 1 if you have the <wchar.h> header file. */ #ifdef __MINGW32__ #define HAVE_WCHAR_H 1 @@ -429,7 +423,7 @@ #define PACKAGE_NAME "GNU Awk" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU Awk 4.1.0a" +#define PACKAGE_STRING "GNU Awk 4.1.60" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gawk" @@ -438,7 +432,7 @@ #define PACKAGE_URL "http://www.gnu.org/software/gawk/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.1.0a" +#define PACKAGE_VERSION "4.1.60" /* Define to 1 if *printf supports %F format */ #undef PRINTF_HAS_F_FORMAT @@ -500,7 +494,7 @@ /* Version number of package */ -#define VERSION "4.1.0a" +#define VERSION "4.1.60" /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE @@ -13,7 +13,6 @@ #define _NFILE 40 #endif -static char template[] = "piXXXXXX"; static struct { char *command; char *name; @@ -34,6 +33,7 @@ static struct { #define WIN32_LEAN_AND_MEAN #include <windows.h> +#if 0 static int unixshell(char *p) { @@ -119,20 +119,16 @@ unlink_and_free(char *cmd) s = cmd; unlink(s); free(cmd); } +#endif int os_system(const char *cmd) { - char *s; - int i; - char *cmd1; + char *cmdexe = getenv("ComSpec"); + char *cmd1 = quote_cmd(cmd); + int i = spawnl(P_WAIT, cmdexe, "cmd.exe", "/c", cmd1, NULL); - if ((cmd1 = scriptify(cmd)) == NULL) return(1); - if (s = getenv("SHELL")) - i = spawnlp(P_WAIT, s, s, cmd1 + strlen(s), NULL); - else - i = system(cmd1); - unlink_and_free(cmd1); + free(cmd1); return(i); } @@ -209,19 +205,15 @@ os_popen(const char *command, const char *mode ) char *name; int cur; char curmode[4]; -#if defined(__MINGW32__) - char *cmd; -#endif if (*mode != 'r' && *mode != 'w') return NULL; strncpy(curmode, mode, 3); curmode[3] = '\0'; #if defined(__MINGW32__) - current = popen(cmd = scriptify(command), mode); + current = popen(command, mode); cur = fileno(current); strcpy(pipes[cur].pmode, curmode); - pipes[cur].command = cmd; return(current); #endif @@ -268,7 +260,6 @@ os_pclose( FILE * current) #if defined(__MINGW32__) rval = pclose(current); *pipes[cur].pmode = '\0'; - unlink_and_free(pipes[cur].command); return rval; #endif |