Package: aolserver4 / 4.5.1-18.1

tcl8.6.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Index: trunk/include/ns.mak.in
===================================================================
--- trunk.orig/include/ns.mak.in	2014-04-29 12:12:02.000000000 +0200
+++ trunk/include/ns.mak.in	2014-04-29 12:12:28.000000000 +0200
@@ -89,8 +89,8 @@
 CFLAGS_OPTIMIZE = @TCL_CFLAGS_OPTIMIZE@
 CFLAGS_WARNING	= @TCL_CFLAGS_WARNING@
 CFLAGS_INCLUDE	= -I$(INCDIR) @TCL_INCLUDE_SPEC@
-CFLAGS_EXTRA	= @TCL_SHLIB_CFLAGS@ @TCL_EXTRA_CFLAGS@
-DEFS      	= -DNO_CONST @TCL_DEFS@ @DEFS@
+CFLAGS_EXTRA	= @TCL_SHLIB_CFLAGS@
+DEFS      	= -DNO_CONST -DUSE_INTERP_ERRORLINE -DUSE_INTERP_RESULT @TCL_DEFS@ @DEFS@
 CFLAGS		+= @CFLAGS_DEFAULT@ $(CFLAGS_WARNING) $(CFLAGS_EXTRA) $(CFLAGS_INCLUDE) @CPPFLAGS@ $(DEFS)
 ifndef SRCDIR
     UTILS	 = /usr/share/aolserver4
Index: trunk/nsd/init.tcl
===================================================================
--- trunk.orig/nsd/init.tcl	2014-04-29 12:12:02.000000000 +0200
+++ trunk/nsd/init.tcl	2014-04-29 12:12:02.000000000 +0200
@@ -326,9 +326,9 @@
     _ns_getnamespaces nslist
     foreach n $nslist {
         foreach {ns_script ns_import} [_ns_getscript $n] {
-            append script [list namespace eval $n $ns_script] \n
+            append script [list ::namespace eval $n $ns_script] \n
             if {$ns_import != ""} {
-                append import [list namespace eval $n $ns_import] \n
+                append import [list ::namespace eval $n $ns_import] \n
             }
         }
     }
@@ -427,7 +427,9 @@
 proc _ns_getnamespaces {listVar {top "::"}} {
     upvar $listVar list
     lappend list $top
-    foreach c [namespace children $top] {
+    foreach c [::namespace children $top] {
+	# skip built-in namespaces
+	if {$c in {::oo}} continue
         _ns_getnamespaces list $c
     }
 }
@@ -478,7 +480,7 @@
 #
 
 proc _ns_getscript n {
-    namespace eval $n {
+    ::namespace eval $n {
         ::set _script "" ; # script to initialize new interp
         ::set _import "" ; # script to import foreign commands
 
@@ -532,7 +534,7 @@
                       [::list proc $_proc $_args [::info body $_proc]] \n
             } else {
                 # procedure imported from other namespace
-                ::append _import [::list namespace import -force $_orig] \n
+                ::append _import [::list ::namespace import -force $_orig] \n
             }
         }
 
@@ -544,7 +546,7 @@
             ::set _orig [::namespace origin $_cmnd]
             ::if {[::info exists _prcs($_cmnd)] == 0 
                     && $_orig != [::namespace which -command $_cmnd]} {
-                ::append _import [::list namespace import -force $_orig] \n
+                ::append _import [::list ::namespace import -force $_orig] \n
             }
         }
 
@@ -555,7 +557,7 @@
 
         ::set _exp [::namespace export]
         if {[::llength $_exp]} {
-            ::append _script [::concat namespace export $_exp] \n
+            ::append _script [::concat ::namespace export $_exp] \n
         }
 
         ::return [::list $_script $_import]