diff options
Diffstat (limited to 'pc')
-rw-r--r-- | pc/ChangeLog | 39 | ||||
-rw-r--r-- | pc/Makefile.tst | 68 | ||||
-rw-r--r-- | pc/config.h | 12 | ||||
-rw-r--r-- | pc/popen.c | 23 |
4 files changed, 94 insertions, 48 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog index eb5636e9..404bcb68 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,42 @@ +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.tst b/pc/Makefile.tst index 6a2216a0..cab49423 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -194,14 +194,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 \ @@ -410,7 +412,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 +431,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 +494,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 +660,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 +797,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 +871,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 +913,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 +936,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:: @@ -1017,8 +1024,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 +1036,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 +1114,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 +1131,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 +2325,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 +2493,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..1d9be09b 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.0e" /* 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.0e" /* 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.0e" /* 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 |