Tcl Source Code

Artifact [ae0ef93d92]
Login

Artifact ae0ef93d9281a083b3a03c22bb8b38f9303404c1a41a3d179185df7ad3d6c062:

Attachment "tcl8.6.13.patch" to ticket [3f6bb3bb46] added by kjnash 2022-11-15 21:41:47.
diff -Naur original/tests/httpd11.tcl patched/tests/httpd11.tcl
--- original/tests/httpd11.tcl	2022-10-30 14:28:50.000000000 +0000
+++ patched/tests/httpd11.tcl	2022-11-02 16:13:01.960501608 +0000
@@ -8,7 +8,7 @@
 # See the file "license.terms" for information on usage and redistribution
 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
-package require tcl
+package require Tcl
 
 proc ::tcl::dict::get? {dict key} {
     if {[dict exists $dict $key]} {
diff -Naur original/tests/http.test patched/tests/http.test
--- original/tests/http.test	2022-10-30 14:28:50.000000000 +0000
+++ patched/tests/http.test	2022-11-02 17:20:30.922303358 +0000
@@ -26,6 +26,18 @@
     puts stderr $errorInfo
 }
 
+# Substitute for Tcl 8.7 lpop when one argument.
+proc lpop {listVar} {
+    upvar 1 $listVar obj
+    set len [llength $obj]
+    if {$len == 0} {
+        return -code error "index \"end\" out of range"
+    }
+    set val [lindex $obj end]
+    set obj [lreplace $obj end end]
+    return $val
+}
+
 # Do not use [info hostname].
 # Name resolution is often a problem on OSX; not focus of HTTP package anyway.
 # Also a problem on other platforms for http-4.14 (test with bad port number).
diff -Naur original/unix/Makefile.in patched/unix/Makefile.in
--- original/unix/Makefile.in	2022-07-25 14:02:51.000000000 +0100
+++ patched/unix/Makefile.in	2022-11-02 15:48:04.898154972 +0000
@@ -925,7 +925,7 @@
 		$(INSTALL_DATA_DIR) "$$i"; \
 	    fi; \
 	    done;
-	@for i in opt0.4 http1.0 encoding; \
+	@for i in opt0.4 cookiejar0.2 http1.0 encoding; \
 	    do \
 	    if [ ! -d "$(SCRIPT_INSTALL_DIR)/$$i" ] ; then \
 		echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
@@ -950,9 +950,15 @@
 	    do \
 	    $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/http1.0"; \
 	    done
-	@echo "Installing package http 2.9.8 as a Tcl Module";
+	@echo "Installing package cookiejar 0.2 files to $(SCRIPT_INSTALL_DIR)/cookiejar0.2/"
+	@for i in $(TOP_DIR)/library/cookiejar/*.tcl \
+	          $(TOP_DIR)/library/cookiejar/*.gz; \
+	    do \
+	    $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/cookiejar0.2"; \
+	    done
+	@echo "Installing package http 2.10a4 as a Tcl Module";
 	@$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl \
-		"$(MODULE_INSTALL_DIR)/8.6/http-2.9.8.tm"
+		"$(MODULE_INSTALL_DIR)/8.6/http-2.10a4.tm"
 	@echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/"
 	@for i in $(TOP_DIR)/library/opt/*.tcl; do \
 	    $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/opt0.4"; \
@@ -2041,7 +2047,7 @@
 DISTNAME = tcl${VERSION}${PATCH_LEVEL}
 ZIPNAME	 = tcl${MAJOR_VERSION}${MINOR_VERSION}${PATCH_LEVEL}-src.zip
 DISTDIR	 = $(DISTROOT)/$(DISTNAME)
-BUILTIN_PACKAGE_LIST = http1.0 http opt msgcat reg dde tcltest platform
+BUILTIN_PACKAGE_LIST = cookiejar http1.0 http opt msgcat reg dde tcltest platform
 
 $(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in $(UNIX_DIR)/tcl.m4 \
 		$(UNIX_DIR)/aclocal.m4
@@ -2095,6 +2101,7 @@
 	    mkdir $(DISTDIR)/library/$$i;\
 	    cp -p $(TOP_DIR)/library/$$i/*.tcl $(DISTDIR)/library/$$i; \
 	done
+	cp -p $(TOP_DIR)/library/cookiejar/*.dat.gz $(DISTDIR)/library/cookiejar
 	@mkdir $(DISTDIR)/library/encoding
 	cp -p $(TOP_DIR)/library/encoding/*.enc $(DISTDIR)/library/encoding
 	@mkdir $(DISTDIR)/library/msgs
diff -Naur original/win/Makefile.in patched/win/Makefile.in
--- original/win/Makefile.in	2022-07-25 14:02:51.000000000 +0100
+++ patched/win/Makefile.in	2022-11-02 15:54:03.372905988 +0000
@@ -700,7 +700,7 @@
 		else true; \
 		fi; \
 	    done;
-	@for i in http1.0 opt0.4 encoding; \
+	@for i in http1.0 opt0.4 cookiejar0.2 encoding; \
 	    do \
 	    if [ ! -d "$(SCRIPT_INSTALL_DIR)/$$i" ] ; then \
 		echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
@@ -735,8 +735,13 @@
 	    do \
 	    $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \
 	    done;
-	@echo "Installing package http 2.9.8 as a Tcl Module";
-	@$(COPY) $(ROOT_DIR)/library/http/http.tcl "$(MODULE_INSTALL_DIR)/8.6/http-2.9.8.tm";
+	@echo "Installing package cookiejar 0.2"
+	@for j in $(ROOT_DIR)/library/cookiejar/*.tcl \
+	          $(ROOT_DIR)/library/cookiejar/*.gz; do \
+	    $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/cookiejar0.2"; \
+	    done;
+	@echo "Installing package http 2.10a4 as a Tcl Module";
+	@$(COPY) $(ROOT_DIR)/library/http/http.tcl "$(MODULE_INSTALL_DIR)/8.6/http-2.10a4.tm";
 	@echo "Installing library opt0.4 directory";
 	@for j in $(ROOT_DIR)/library/opt/*.tcl; \
 	    do \
diff -Naur original/win/makefile.vc patched/win/makefile.vc
--- original/win/makefile.vc	2022-06-06 16:58:41.000000000 +0100
+++ patched/win/makefile.vc	2022-11-02 16:05:05.572790050 +0000
@@ -155,6 +155,9 @@
 !if [echo PKG_OPT_VER = \>> versions.vc] \
    && [nmakehlp -V ..\library\opt\pkgIndex.tcl opt >> versions.vc]
 !endif
+!if [echo PKG_COOKIEJAR_VER = \>> versions.vc] \
+   && [nmakehlp -V ..\library\cookiejar\pkgIndex.tcl cookiejar >> versions.vc]
+!endif
 !if [echo PKG_TCLTEST_VER = \>> versions.vc] \
    && [nmakehlp -V ..\library\tcltest\pkgIndex.tcl tcltest >> versions.vc]
 !endif
@@ -907,6 +910,8 @@
 install-libraries: tclConfig tcl-nmake install-msgs install-tzdata
 	@if not exist "$(SCRIPT_INSTALL_DIR)" \
 		$(MKDIR) "$(SCRIPT_INSTALL_DIR)"
+	@if not exist "$(SCRIPT_INSTALL_DIR)\cookiejar0.2" \
+	    $(MKDIR) "$(SCRIPT_INSTALL_DIR)\cookiejar0.2"
 	@if not exist "$(SCRIPT_INSTALL_DIR)\opt0.4" \
 		$(MKDIR) "$(SCRIPT_INSTALL_DIR)\opt0.4"
 	@if not exist "$(MODULE_INSTALL_DIR)" \
@@ -950,6 +955,11 @@
 	@echo Installing package http 1.0 (obsolete)
 	@$(CPY) "$(ROOT)\library\http1.0\*.tcl" \
 	    "$(SCRIPT_INSTALL_DIR)\http1.0\"
+	@echo Installing package cookiejar $(PKG_COOKIEJAR_VER)
+	@$(CPY) "$(ROOT)\library\cookiejar\*.tcl" \
+	    "$(SCRIPT_INSTALL_DIR)\cookiejar0.2\"
+	@$(CPY) "$(ROOT)\library\cookiejar\*.gz" \
+	    "$(SCRIPT_INSTALL_DIR)\cookiejar0.2\"
 	@echo Installing package opt $(PKG_OPT_VER)
 	@$(CPY) "$(ROOT)\library\opt\*.tcl" \
 	    "$(SCRIPT_INSTALL_DIR)\opt0.4\"