Subject: Re: tcl 7.4 and tk 4.0 test suite errors
To: Valtteri Vuorikoski <vuori@sci.fi>
From: Bernd Ernesti <netbsd@arresum.inka.de>
List: current-users
Date: 08/09/1995 01:33:26
On Tue Aug 8 20:01:08 1995, Valtteri Vuorikoski wrote:
>
> I compiled tcl 7.4p1 from ftp.cs.berkeley.edu on NetBSD/mac68k 1.0A, and the
> test suite complains about errors in stat output; it seems to always say that
> the size of the file is 0. I didn't see anything about this in any porting
> notes.
Thats an easy fix:
*** tcl7.4/tclUnixAZ.c-orig Thu Jun 29 23:22:40 1995
--- tcl7.4/tclUnixAZ.c Sat Jul 29 08:55:23 1995
***************
*** 686,692 ****
if (stat(fileName, &statBuf) == -1) {
goto badStat;
}
! sprintf(interp->result, "%ld", statBuf.st_size);
goto done;
} else if ((c == 's') && (strncmp(argv[1], "stat", length) == 0)
&& (length >= 2)) {
--- 686,692 ----
if (stat(fileName, &statBuf) == -1) {
goto badStat;
}
! sprintf(interp->result, "%ld", (int)statBuf.st_size);
goto done;
} else if ((c == 's') && (strncmp(argv[1], "stat", length) == 0)
&& (length >= 2)) {
***************
*** 813,819 ****
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", statPtr->st_size);
if (Tcl_SetVar2(interp, varName, "size", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
--- 813,819 ----
== NULL) {
return TCL_ERROR;
}
! sprintf(string, "%ld", (int)statPtr->st_size);
if (Tcl_SetVar2(interp, varName, "size", string, TCL_LEAVE_ERR_MSG)
== NULL) {
return TCL_ERROR;
But for the tk4.0 ..... :(
Bernd