diff options
-rw-r--r-- | ChangeLog | 26 | ||||
-rw-r--r-- | doc/dict.n | 19 | ||||
-rw-r--r-- | generic/tcl.h | 2 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 2 | ||||
-rw-r--r-- | generic/tclFCmd.c | 5 | ||||
-rw-r--r-- | generic/tclTest.c | 5 | ||||
-rw-r--r-- | library/http/http.tcl | 2 | ||||
-rw-r--r-- | library/http/pkgIndex.tcl | 2 | ||||
-rw-r--r-- | unix/Makefile.in | 4 | ||||
-rw-r--r-- | win/Makefile.in | 4 | ||||
-rwxr-xr-x | win/configure | 70 | ||||
-rw-r--r-- | win/configure.in | 20 | ||||
-rw-r--r-- | win/tclWinPort.h | 10 |
13 files changed, 65 insertions, 106 deletions
@@ -1,3 +1,29 @@ +2012-01-21 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tcl.h: [Bug-3474726]: Eliminate detection of struct + * generic/tclWinPort.h: _stat32i64, just use _stati64 in combination + * generic/tclFCmd.c: with _USE_32BIT_TIME_T, which is the same then. + * generic/tclTest.c: Only keep _stat32i64 usage for cygwin, so it + * win/configure.in: will not conflict with cygwin's own struct stat. + * win/configure: + +2012-01-21 Don Porter <dgp@users.sourceforge.net> + + * generic/tclCmdMZ.c: [Bug 3475667] Prevent buffer read overflow. + Thanks to "sebres" for the report and fix. + +2012-01-17 Donal K. Fellows <dkf@users.sf.net> + + * doc/dict.n (dict with): [Bug 3474512]: Explain better what is going + on when a dictionary key and the dictionary variable collide. + +2012-01-17 Don Porter <dgp@users.sourceforge.net> + + * library/http/http.tcl: Bump to version 2.7.8 + * library/http/pkgIndex.tcl: + * unix/Makefile.in: + * win/Makefile.in: + 2012-01-13 Donal K. Fellows <dkf@users.sf.net> * library/http/http.tcl (http::Connect): [Bug 3472316]: Ensure that we @@ -227,6 +227,15 @@ exist after the command finishes (unless explicitly \fBunset\fR). Note that the mapping of values to variables does not use traces; changes to the \fIdictionaryVariable\fR's contents only happen when \fIbody\fR terminates. +.PP +If the \fIdictionaryVariable\fR contains a value that is not a dictionary at +the point when the \fIbody\fR terminates (which can easily happen if the name +is the same as any of the keys in dictionary) then an error occurs at that +point. This command is thus not recommended for use when the keys in the +dictionary are expected to clash with the \fIdictionaryVariable\fR name +itself. Where the contained key does map to a dictionary, the net effect is to +combine that inner dictionary into the outer dictionary; see the +\fBEXAMPLES\fR below for an illustration of this. .RE .SH "DICTIONARY VALUES" .PP @@ -364,6 +373,16 @@ sumDictionary myDict puts "dictionary is now \\"$myDict\\"" # prints: \fIdictionary is now "a {total 6} b {total 15}"\fR .CE +.PP +When \fBdict with\fR is used with a key that clashes with the name of the +dictionary variable: +.PP +.CS +set foo {foo {a b} bar 2 baz 3} +\fBdict with\fR foo {} +puts $foo +# prints: \fIa b foo {a b} bar 2 baz 3\fR +.CE .SH "SEE ALSO" append(n), array(n), foreach(n), incr(n), list(n), lappend(n), set(n) .SH KEYWORDS diff --git a/generic/tcl.h b/generic/tcl.h index e5e38a8..21cd0c4 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -360,7 +360,7 @@ typedef struct stati64 Tcl_StatBuf; # else /* __BORLANDC__ */ # if defined(_WIN64) typedef struct __stat64 Tcl_StatBuf; -# elif (defined(_MSC_VER) && (_MSC_VER < 1400)) +# elif (defined(_MSC_VER) && (_MSC_VER < 1400)) || defined(_USE_32BIT_TIME_T) typedef struct _stati64 Tcl_StatBuf; # else typedef struct _stat32i64 Tcl_StatBuf; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 60a9414..ab673d5 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -264,7 +264,7 @@ Tcl_RegexpObjCmd( * start of the string unless the previous character is a newline. */ - if ((offset == 0) || ((offset > 0) && + if ((offset == 0) || ((offset > 0) && (offset < stringLength) && (Tcl_GetUniChar(objPtr, offset-1) == (Tcl_UniChar)'\n'))) { eflags = 0; } else { diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 2b4977b..cc4f013 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -10,6 +10,11 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ +#ifndef _WIN64 +/* See [Bug 2935503]: file mtime sets wrong time */ +# define _USE_32BIT_TIME_T +#endif + #include "tclInt.h" /* diff --git a/generic/tclTest.c b/generic/tclTest.c index 98208af..cb0faad 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -15,6 +15,11 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ +#ifndef _WIN64 +/* See [Bug 2935503]: file mtime sets wrong time */ +# define _USE_32BIT_TIME_T +#endif + #define TCL_TEST #include "tclInt.h" diff --git a/library/http/http.tcl b/library/http/http.tcl index e7224a2..f8ea55f 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -11,7 +11,7 @@ package require Tcl 8.4 # Keep this in sync with pkgIndex.tcl and with the install directories in # Makefiles -package provide http 2.7.7 +package provide http 2.7.8 namespace eval http { # Allow resourcing to not clobber existing data diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 168d628..43b5571 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,4 +1,4 @@ # Tcl package index file, version 1.1 if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded http 2.7.7 [list tclPkgSetup $dir http 2.7.7 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +package ifneeded http 2.7.8 [list tclPkgSetup $dir http 2.7.8 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/unix/Makefile.in b/unix/Makefile.in index 77b3256..0b6a114 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -773,8 +773,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; - @echo "Installing package http 2.7.7 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.7.tm; + @echo "Installing package http 2.7.8 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.8.tm; @echo "Installing library opt0.4 directory"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index fce519c..b3df47f 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -637,8 +637,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.7.7 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.7.7.tm; + @echo "Installing package http 2.7.8 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.7.8.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ diff --git a/win/configure b/win/configure index 0e5e92f..07a9436 100755 --- a/win/configure +++ b/win/configure @@ -3550,76 +3550,6 @@ _ACEOF fi -# Check to see if struct _stat32i64 exists in mingw's sys/stat.h - -echo "$as_me:$LINENO: checking if struct _stat32i64 missing" >&5 -echo $ECHO_N "checking if struct _stat32i64 missing... $ECHO_C" >&6 -if test "${tcl_struct_stat32i64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include <sys/types.h> -#include <sys/stat.h> - -int -main () -{ - - struct _stat32i64 foo; - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_struct_stat32i64=no -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -tcl_struct_stat32i64=yes -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $tcl_struct_stat32i64" >&5 -echo "${ECHO_T}$tcl_struct_stat32i64" >&6 -if test "$tcl_struct_stat32i64" = "yes" ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NO_STRUCT_STAT32I64 1 -_ACEOF - -fi - - # See if declarations like FINDEX_INFO_LEVELS are # missing from winbase.h. This is known to be # a problem with VC++ 5.2. diff --git a/win/configure.in b/win/configure.in index 306dbac..1b8c25a 100644 --- a/win/configure.in +++ b/win/configure.in @@ -241,26 +241,6 @@ if test "$tcl_cv_cast_to_union" = "yes"; then [Defined when compiler supports casting to union type.]) fi -# Check to see if struct _stat32i64 exists in mingw's sys/stat.h - -AC_CACHE_CHECK(if struct _stat32i64 missing, - tcl_struct_stat32i64, -AC_TRY_COMPILE([ -#include <sys/types.h> -#include <sys/stat.h> -], -[ - struct _stat32i64 foo; -], - tcl_struct_stat32i64=no, - tcl_struct_stat32i64=yes) -) -if test "$tcl_struct_stat32i64" = "yes" ; then - AC_DEFINE(HAVE_NO_STRUCT_STAT32I64, 1, - [Defined when sys/stat.h is missing struct _stat32i64]) -fi - - # See if declarations like FINDEX_INFO_LEVELS are # missing from winbase.h. This is known to be # a problem with VC++ 5.2. diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 493b824..c5a726a 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -108,9 +108,9 @@ #define ENOTSUP -1030507 /* - * Not all mingw32 versions have this struct. + * cygwin does not have this struct. */ -#if !defined(__BORLANDC__) && !defined(_MSC_VER) && !defined(_WIN64) && defined(HAVE_NO_STRUCT_STAT32I64) +#ifdef __CYGWIN__ struct _stat32i64 { dev_t st_dev; ino_t st_ino; @@ -120,15 +120,9 @@ short st_gid; dev_t st_rdev; __int64 st_size; -#ifdef __CYGWIN__ struct {long tv_sec;} st_atim; struct {long tv_sec;} st_mtim; struct {long tv_sec;} st_ctim; -#else - long st_atime; - long st_mtime; - long st_ctime; -#endif }; #endif |