Subject: Tcl7.4 and Tk4.0
To: None <jackson@acis.com.au>
From: Bruce Albrecht <Bruce.Albrecht@seag.fingerhut.com>
List: netbsd-help
Date: 02/19/1996 13:25:24
Matt Jackson writes:
 > Hi,
 >    Has anyone managed to get a fully functioning set of Tcl7.4 and 
 > Tk4.0 running on NetBSD1.1 ??
 > 
 > I am using an Amiga 3000 running NetBSD1.1 with gcc2.7.2 and can 
 > get both packages to compile but I get errors running the test 
 > programs.
 > 
 > The Tk4.0 test programs give a large number of errors, none of 
 > which seem to be fatal. The Tcl7.4 test programs come up with the
 > following errors which cause problems later when trying to run the
 > TclX7.4a extensions.

I also did this about a month ago, and I decided that the errors with
TK were probably due to my X server, which is running an A2024.

The problems with TCL are because TCL assumes the wrong size for
a file.  It's a long for most systems, but a quad for NetBSD.  Here's
a patch:

diff tclUnixAZ.c /cdrom/tcl/tcl7.4p1
689c689
<       sprintf(interp->result, sizeof(statBuf.st_size)==8 ? "%qd" : "%ld", statBuf.st_size);
---
>       sprintf(interp->result, "%ld", statBuf.st_size);