Check-in [94567b3779]
Overview
Comment:Fixed issue with newer versions of Tcl providing a zlib package (version 2.0)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:94567b3779af01db7bb1d245a03f83fa3e82f638
User & Date: rkeene on 2012-10-08 19:35:04
Other Links: manifest | tags
References
2012-10-08
19:35 Ticket [f929fddcfc] Tclkit generation problems status still Open with 1 other change artifact: 44ad0dbcfb user: rkeene
Context
2012-10-08
19:40
Updated to hide distclean output check-in: 7c0261e55c user: rkeene tags: trunk
19:35
Fixed issue with newer versions of Tcl providing a zlib package (version 2.0) check-in: 94567b3779 user: rkeene tags: trunk
19:12
Updated to not require running "./configure" for pre.sh check-in: 2ba5f90d1b user: rkeene tags: trunk
Changes

Modified tclvfs/patches/8.6/tclvfs-20080503-supportnativezlib.diff from [7076e29d82] to [cc9a9d6176].

     1         -diff -uNr tclvfs-20080503.orig/library/vfslib.tcl tclvfs-20080503-3rsk/library/vfslib.tcl
     2         ---- tclvfs-20080503.orig/library/vfslib.tcl	2011-07-16 15:31:29.000000000 +0200
     3         -+++ tclvfs-20080503-3rsk/library/vfslib.tcl	2011-07-16 15:32:28.000000000 +0200
     4         -@@ -5,6 +5,14 @@
            1  +diff -uNr tclvfs-20080503/library/vfslib.tcl tclvfs-20080503-supportnativezlib/library/vfslib.tcl
            2  +--- tclvfs-20080503/library/vfslib.tcl	2006-09-14 16:39:57.000000000 -0500
            3  ++++ tclvfs-20080503-supportnativezlib/library/vfslib.tcl	2012-10-08 14:30:50.930779011 -0500
            4  +@@ -5,6 +5,16 @@
     5      5    
     6      6    namespace eval ::vfs {
     7      7        variable zseq 0	;# used to generate temp zstream cmd names
     8      8   +    variable zlibPkg 0  ;# Use Tcl 8.6+ zlib command, or zlib package
     9      9   +}
    10     10   +
    11     11   +
    12     12   +# Work with the Tcl 8.6+ built-in zlib command or the zlib package, if available
    13     13   +catch {
    14         -+	package present zlib
    15         -+	set ::vfs::zlibPkg 1
           14  ++	set ::vfs::zlibVers [package present zlib]
           15  ++	if {$::vfs::zlibVers == "1.1"} {
           16  ++		set ::vfs::zlibPkg 1
           17  ++	}
    16     18    }
    17     19    
    18     20    # for backwards compatibility
    19         -@@ -94,8 +102,12 @@
           21  +@@ -94,8 +104,12 @@
    20     22    		}
    21     23    		# to seek back, rewind, i.e. start from scratch
    22     24    		if {$a1 < $pos} {
    23     25   -		    rename $zcmd ""
    24     26   -		    zlib $imode $zcmd
    25     27   +		    if {$::vfs::zlibPkg} {
    26     28   +    			rename $zcmd ""
................................................................................
    27     29   +    			zlib $imode $zcmd
    28     30   +		    } else {
    29     31   +			$zcmd reset
    30     32   +		    }
    31     33    		    seek $ifd 0
    32     34    		    set pos 0
    33     35    		}
    34         -@@ -110,19 +122,26 @@
           36  +@@ -110,19 +124,26 @@
    35     37    		return $pos
    36     38    	    }
    37     39    	    read {
    38     40   +                if {$::vfs::zlibPkg} {
    39     41   +                   set zputcmd fill
    40     42   +                   set zgetcmd drain
    41     43   +                } else {
................................................................................
    58     60   -		    set data [$zcmd drain $n]
    59     61   +                        $zcmd $zputcmd $data
    60     62   +                    }
    61     63   +		    set data [$zcmd $zgetcmd $n]
    62     64    		    #puts stderr " read [string length $data]"
    63     65    		    if {$data eq ""} break
    64     66    		    append r $data
    65         -@@ -141,8 +160,12 @@
           67  +@@ -141,8 +162,12 @@
    66     68        }
    67     69    
    68     70        proc vfs::zstream {mode ifd clen ilen} {
    69     71   -	set cname _zstream_[incr ::vfs::zseq]
    70     72   -	zlib s$mode $cname
    71     73   +        if {$::vfs::zlibPkg} {
    72     74   +            set cname _zstream_[incr ::vfs::zseq]