Subject: Re: port-sparc64/11919: awk produces incorrect results
To: Simon Gerraty <firstname.lastname@example.org>
From: Greg A. Woods <email@example.com>
Date: 01/11/2001 02:28:11
[ On Monday, January 8, 2001 at 15:50:21 (-0800), Simon Gerraty wrote: ]
> Subject: port-sparc64/11919: awk produces incorrect results
> Building pkgsrc/misc/screen involves a couple of awk scripts to generate
> term.h, comm.h and osdef.h
> On NetBSD-1.5/sparc64 the results are bogus (eg):
> comm.h:122:#define RC_LASTMSG 9223372358977323007
> comm.h:204:#define RC_LAST 9223372702574706687
Does the real AWK produce the right results? What about mawk (which
will be used in preference if it happens to be installed)?
BWK mentions some 64-bit bug fixes in his April 5, 1999 entry in the
FIXES file. Perhaps similar bugs exist in the (now rather dated) GAWK
3.0.3 still used by NetBSD?
I've been using the real AWK as the only version on on several platforms
now for some time, though I've not yet tried this on any 64-bit arch.
In fact I build it static in /bin so that I can use it in /etc/rc.d stuff:
text data bss dec hex filename
122585 44032 3880 170497 29a01 obj.i386/awk
148128 44032 3624 195784 2fcc8 obj.sparc/awk
I had to re-do the way it builds using yacc (including renaming the
header file created by by yacc) to get it to work in the *BSD build
system, and write a new Makefile of course, but other than that it just
builds and works, and actuall it works very well and reasonably fast
too. I think it's long past the time when NetBSD should have switched
over to using the real AWK.
In case anyone needs a URL for the real AWK source (apparently last
updated Nov. 27, 2000, but the version number is given as 20001115):
Greg A. Woods
+1 416 218-0098 VE3TCP <firstname.lastname@example.org> <robohack!woods>
Planix, Inc. <email@example.com>; Secrets of the Weird <firstname.lastname@example.org>