Date: Thu, 14 Jan 1999 09:24:02 -0800 (PST) From: giffunip@asme.org To: freebsd-gnats-submit@FreeBSD.ORG Subject: ports/9492: Fix for nawk Message-ID: <199901141724.JAA03381@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 9492 >Category: ports >Synopsis: Fix for nawk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 14 09:30:00 PST 1999 >Closed-Date: >Last-Modified: >Originator: Pedro F. Giffuni >Release: 2.2.7-R >Organization: U. Nacional de Colombia >Environment: >Description: While porting mawk, I found a FPE error in our nawk port that can be reproduced in mawk's tests >How-To-Repeat: >Fix: diff -rNu nawk.old/Makefile nawk/Makefile --- nawk.old/Makefile Wed Jan 13 17:41:35 1999 +++ nawk/Makefile Wed Jan 13 19:28:36 1999 @@ -1,5 +1,5 @@ # New ports collection makefile for: nawk -# Version required: 98.02.11 +# Version required: 98.10.20 # Date created: 29 April 1998 # Whom: Josh Gilliam <josh@quick.net> # diff -rNu nawk.old/patches/patch-aa nawk/patches/patch-aa --- nawk.old/patches/patch-aa Wed Jan 13 17:41:35 1999 +++ nawk/patches/patch-aa Wed Jan 13 19:11:45 1999 @@ -1,5 +1,5 @@ *** makefile.orig Tue Oct 20 08:48:03 1998 ---- makefile Sun Nov 1 16:32:49 1998 +--- makefile Wed Jan 13 19:10:37 1999 *************** *** 22,34 **** # THIS SOFTWARE. @@ -19,11 +19,11 @@ # THIS SOFTWARE. # ****************************************************************/ -! CFLAGS ?= ${CFLAGS} -! #CFLAGS = -O +! #CFLAGS = -g +! CFLAGS ?= -O ! #CC = gcc -Wall -g ! #CC = purify cc -! CC ?= ${CC} +! CC ?= cc ! #YACC = bison -y YACC = yacc diff -rNu nawk.old/patches/patch-ba nawk/patches/patch-ba --- nawk.old/patches/patch-ba Wed Jan 13 17:41:35 1999 +++ nawk/patches/patch-ba Wed Jan 13 17:55:58 1999 @@ -1,5 +1,5 @@ -*** b.c.orig Sun Nov 1 17:14:22 1998 ---- b.c Sun Nov 1 17:23:00 1998 +*** b.c.orig Mon Oct 19 18:42:53 1998 +--- b.c Wed Jan 13 17:46:54 1999 *************** *** 27,32 **** --- 27,35 ---- @@ -87,11 +87,11 @@ continue; } } -*** main.c.orig Sun Nov 1 17:24:32 1998 ---- main.c Sun Nov 1 17:28:40 1998 +*** main.c.orig Mon Oct 19 18:49:03 1998 +--- main.c Wed Jan 13 17:51:59 1999 *************** -*** 27,38 **** ---- 27,43 ---- +*** 27,32 **** +--- 27,33 ---- #define DEBUG #include <stdio.h> #include <ctype.h> @@ -99,18 +99,8 @@ #include <stdlib.h> #include <string.h> #include <signal.h> - #include "awk.h" - #include "ytab.h" - -+ #ifdef __FreeBSD__ -+ # include <floatingpoint.h> -+ #endif -+ - extern char **environ; - extern int nfields; - *************** -*** 55,66 **** +*** 55,61 **** char *fs = NULL, *marg; int temp; @@ -118,12 +108,7 @@ if (argc == 1) { fprintf(stderr, "Usage: %s [-f programfile | 'program'] [-Ffieldsep] [-v var=value] [files]\n", cmdname); exit(1); - } - signal(SIGFPE, fpecatch); - yyin = NULL; - symtab = makesymtab(NSYMTAB); - while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') { ---- 60,80 ---- +--- 56,67 ---- char *fs = NULL, *marg; int temp; @@ -136,12 +121,3 @@ if (argc == 1) { fprintf(stderr, "Usage: %s [-f programfile | 'program'] [-Ffieldsep] [-v var=value] [files]\n", cmdname); exit(1); - } - signal(SIGFPE, fpecatch); -+ #ifdef __FreeBSD__ -+ fpsetround(FP_RN); -+ fpsetmask(0L); -+ #endif - yyin = NULL; - symtab = makesymtab(NSYMTAB); - while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') { diff -rNu nawk.old/pkg/DESCR nawk/pkg/DESCR --- nawk.old/pkg/DESCR Wed Jan 13 17:41:35 1999 +++ nawk/pkg/DESCR Wed Jan 13 18:06:29 1999 @@ -1,9 +1,10 @@ +Awk scans input files for specified patterns and can perform an associated +action when a line of the file matches the pattern. + This is the version of awk described in "The AWK Programming Language", by Al Aho, Brian Kernighan, and Peter Weinberger (Addison-Wesley, 1988, ISBN 0-201-07981-X). - -Awk scans input files for specified patterns and can perform an associated -action when a line of the file matches the pattern. + http://cm.bell-labs.com/cm/cs/awkbook/index.html -- Josh Gilliam <josh@quick.net> >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901141724.JAA03381>