Tcl 7.5p1/Tk 4.1p1 Release Announcement August 2, 1996 John Ousterhout Sun Microsystems, Inc. john.ousterhout@eng.sun.com We have just released the first set of patches for Tcl 7.5 and Tk 4.1. There are no feature changes in these patches, just lots of bug fixes. The only behavioral change in these patches is that you now have to use a --enable-gcc option when configuring Tk if you want to compile with gcc (in previous releases Tk tried to pick up this information from Tcl's configuration information, but it didn't do it very well). The patches are available as files tcl7.5p1.patch.Z and tk4.1p1.patch.Z in the usual FTP directories, such as /pub/tcl on ftp.smli.com. In addition, there are complete source releases that correspond to this patch level: they are in files with the usual names, such as tcl7.5p1.tar.Z and tk4.1p1.tar.Z. You may find it easier to grab the full releases than the patches, though it may take longer to retrieve them over the network. If you don't already have Tcl 7.5 and Tk 4.1 installed then you should definitely skip directly to the full p1 source releases. Note: if you retrieve one of the full source releases, such as tcl7.5p1.tar.Z, it will unpack to a directory named tcl7.5, not tcl7.5p1. As with patch releases for previous versions of Tcl and Tk, these patches don't change any of the version numbers, directory names, or file names. Only the patch level (e.g. the Tcl variable tcl_patchLevel) has changed. There is a catalog of all patches for the Tcl 7.5 and Tk 4.1 releases in the following URL: http://www.sunlabs.com/research/tcl/4.1.html. You can always check out this Web page to get information on the patches that are currently available and how to apply them. Be sure to apply patches in order (for example, "p1" patches must be applied before "p2" patches). Here is a complete list of all of the problems fixed in the patches, excerpted from the Tcl and Tk "changes" files. Tcl 7.5p1: ---------- 5/1/96 (bug fix) "file tail ~" did not correctly return the tail portion of the user's home directory. (SS) 5/1/96 (bug fix) Fixed bug in TclGetEnv where it didn't lookup environment variables correctly: could confuse "H" and "HOME", for example. (JO) 5/1/96 (bug fix) Changed to install tclConfig.sh under "make install-binaries", not "make install-libraries". (JO) 5/2/96 (bug fix) Changed pkg_mkIndex not to attempt to "load" a file unless it has the standard shared library extension. On SunOS, attempts to load Tcl scripts cause the whole application to be aborted (there's no way to get the error back into Tcl). (JO) 5/7/96 (bug fix) Moved initScript in tclUnixInit.c to writable memory to avoid potential core dumps. (JO) 5/7/96 (bug fix) Auto_reset procedure was removing procedure from init.tcl, such as pkg_mkIndex. (JO) 5/7/96 (bug fix) Fixed cast on socket address resolution code that would cause a failure to connect on Dec Alphas. (JL) 5/7/96 (bug fix) Added "time", "subst" and "fileevent" commands to set of commands available in a safe interpreter. (JL) 5/13/96 (bug fix) Preventing OS level handles for stdin, stdout and stderr from being implicitly closed when the last reference to the standard channel containing that handle is discarded when an interpreter is deleted. Explicitly closing standard channels by using "close" still works. (JL) 5/21/96 (bug fix) Do not create channels for stdin, stdout and stderr on Unix if the devices are closed. This prevents a duplicate channel name panic later on when the fd is used to open a channel and the channel is registered in an interpreter. (JL) 5/23/96 (bug fix) Fixed bug that prevented the use of standard channels in interpreters created after the last interpreter was destroyed. In the sequence interp = Tcl_CreateInterp(); Tcl_DeleteInterp(interp); interp = Tcl_CreateInterp(); channels for stdio would not be available in the second interpreter. (JL) 5/23/96 (bug fix) Fixed bug that allowed Tcl_MakeFileChannel to create new channels with Tcl_Files in them that are already used by another channel. This would cause core dumps when the Tcl_Files were being freed twice. (JL) 5/23/96 (bug fix) Fixed a logical timing bug that caused a standard channel to be removed from the standard channel table too early when the channel was being closed. If the channel was being flushed asynchronously, it could get recreated before being actually destroyed, and the recreated channel would contain the same Tcl_File as the one being closed, leading to dangling pointers and core dumps. (JL) 5/27/96 (bug fix) Fixed a bug in Tcl_GetChannelOption which caused it to always return a list of one element, a list of the settings, for -translation and -eofchar options. Now correctly returns the value described by the documentation (Mark Diekhans found this, thanks!). (JL) 5/30/96 (bug fix) Fixed a couple of syntax errors in io.test. (JL) 5/30/96 (bug fix) If a fileevent scripts gets an error, delete it before causing a background error. This is to allow the error handler to reinstall the fileevent and to prevent infinite loops if the event loop is reentered in the error handler. (JL) 5/31/96 (bug fix) Channels now will get properly flushed on exit. (JL) 6/5/96 (bug fix) Changed Tcl_Ckalloc, Tcl_Ckfree, and Tcl_Ckrealloc to Tcl_Alloc, Tcl_Free, and Tcl_Realloc. Added documentation for these routines now that they are officially supported. Extension writers should use these routines instead of free() and malloc(). (SS) 6/10/96 (bug fix) Changes the Tcl close command so that it no longer waits on nonblocking pipes for the piped processes to exit; instead it reaps them in the background. (JL) 6/11/96 (bug fix) Increased the length of the listen queue for server sockets on Unix from 5 to 100. Some OSes will disregard this and reset it to 5, but we should try to get as long a queue as we can, for performance reasons. (JL) 6/11/96 (bug fix) Fixed windows sockets bug that caused a cascade of events if the fileevent script read less than was available. Now reading less than is available does not cause a flood of Tcl events. (JL, SS) 6/11/96 (bug fix) Fixed bug in background flushing on closed channels that would prevent the last buffer from getting flushed. (JL) 6/13/96 (bug fix) Fixed bug in Windows sockets that caused a core dump if a DLL linked with tcl.dll and referred to e.g. ntohs() without opening a Tcl socket. The problem was that the indirection table was not being initialized. (JL) 6/13/96 (bug fix) Fixed OS level resource leak that would occur when a Tcl channel was still registered in some interpreter when the process exits. Previously the channel was not being closed and the OS level handles were not being released; the output was being flushed but the device was not being closed. Now the device is properly closed. This was only a problem on Win3.1 and MacOS. (JL, SS) 6/28/96 (bug fix) Fixed bug where transient errors were leaving an error code around, so that it would erroneously get reported later. This bug was exercised intermittently by closing a channel to a file on a very loaded NFS server, or to a socket whose other end blocked. (JL, BW) 7/3/96 (bug fix) Fileevents declared in an interpreter are now deleted when the channel is closed in that interpreter. Before this fix, the fileevent would hang around until the channel is completely closed, and would cause errors if events happened before the channel was closed. This could happen in two cases: first if the channel is shared between several interpreters, and second if an async flush is in progress that prevents the channel from being closed until the flush finishes. (JL) 7/10/96 (bug fix) Fixed bugs in both "lrange" and "lreplace" commands where too much white space was being removed. For example, the command lreplace {\}\ hello} end end was returning "\}\", losing the significant space in the first list element and corrupting the list. (JO) 7/20/96 (bug fix) The procedure pkg_mkIndex didn't work properly for extensions that depend on Tk, because it didn't load Tk into the child interpreter before loading the extension. Now it loads Tk if Tk is present in the parent. (JO) 7/23/96 (bug fix) Added compat version of strftime to fix crashes resulting from bad implementations under Windows. (SS) 7/23/96 (bug fix) Standard implementations of gmtime() and localtime() under Windows did not handle dates before 1970, so they were replaced with a revised implementation. (SS) 7/23/96 (bug fix) Tcl would crash on exit under Borland 5.0 because the global environ pointer was left pointing to freed memory. (SS) 7/29/96 (bug fix) Fixed memory leak in Tcl_LoadCmd that could occur if a package's AppInit procedure called Tcl_StaticPackage to register static packages. (JO) 8/1/96 (bug fix) Fixed a series of bugs in Windows sockets so that async writebehind in the presence of read event handlers now works, and so that async writebehind also works on sockets for which a read event handler was declared and whose channels were then closed before the async write finished. The bug was reported by John Loverso and Steven Wahl, independently, test case supplied by John Loverso. (JL) Tk 4.1p1: --------- 5/1/96 (buf fix) "option readfile" did not handle files with CRLF line termination. (SS) 5/1/96 (bug fix) Changed to install tkConfig.sh under "make install-binaries", not "make install-libraries". (JO) 5/7/96 (bug fix) Moved initScript in tkUnixInit.c to writable memory to avoid potential core dumps. (JO) 5/7/96 (bug fix) Changed tk_dialog back so that the dialog box is a transient window again. This is needed to make sure that the dialog box doesn't get obscured. Also changed it to return -1 if the dialog window is deleted before the user presses a button. (JO) 5/16/96 (bug fix) Fixed bug that caused core-dumps if a text widget with -setgrid 1 was deleted by removing its command. (JO) 5/22/96 (bug fix) Listboxes weren't properly ignoring double clicks on button 1. (JO) 6/12/96 (bug fix) Focus was automatically placed on new toplevels. This caused the titlebar to flash during menubar traversal. (SS) 6/12/96 (bug fix) Iconification of a window with a specified geometry by using the minimize button would leave the window in an inconsistent state. When the window was deiconified using "wm deiconify", the window would continue to display as an icon with the deiconified geometry. (SS) 6/12/96 (bug fix) Fixed a resource leak where the text widget was not freeing all of the TkRegions it created. This fix affects all platforms, but is particularly important for Win32s. (SS) 6/21/96 (configuration change) Added --enable-gcc switch to configure script to make Tk just like Tcl. Now Tk will not use gcc unless you request it explicitly. (JO) 7/18/96 (bug fix) Changed "configure" script to add an extra -R switch (or whatever is appropriate to the platform) if the X library is in a nonstandard place. This guarantees that the shared library can be found at runtime without having to set the LD_LIBRARY_PATH variable. (JO) 7/19/96 (bug fix) Fixed bug in tkImgGIF.c that cause core dumps if a GIF file contained multiple images. (JO) 7/20/96 (bug fix) Deadlock could occur if a recursive series of send operations involved multiple displays. (JO) 7/23/96 (bug fix) Fixed a resource leak where deallocated XIDs were taking up memory on Windows and Macintosh platforms. (SS) 7/30/96 (bug fix) A core dump could occur if a handler for a window tried to create a child in the half-dead window. Fixed by making the window's name disappear from the name table once it starts to be deleted. (JO)