summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-16 09:25:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-16 09:25:44 (GMT)
commitbcd16235331e7d2fa09e221df7b04025c74f224d (patch)
treefad36ec7a151e44ca1c9ed3c63bceb587305f606
parent73788579a1e3012a67af4cde1658770906262455 (diff)
parent117c6b9d73019c6560d1fa7eb8a3e8d2584bc3ab (diff)
downloadtcl-bcd16235331e7d2fa09e221df7b04025c74f224d.zip
tcl-bcd16235331e7d2fa09e221df7b04025c74f224d.tar.gz
tcl-bcd16235331e7d2fa09e221df7b04025c74f224d.tar.bz2
Merge 8.7
-rw-r--r--.travis.yml43
-rw-r--r--compat/stdlib.h2
-rw-r--r--tests-perf/clock.perf.tcl10
-rw-r--r--tests-perf/test-performance.tcl21
-rw-r--r--tests/expr.test2
-rwxr-xr-xunix/configure19
-rw-r--r--unix/configure.ac4
-rw-r--r--unix/tcl.m47
-rw-r--r--unix/tclUnixInit.c2
-rw-r--r--win/tcl.dsp8
10 files changed, 56 insertions, 62 deletions
diff --git a/.travis.yml b/.travis.yml
index f00a2e8..a207d6b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -52,52 +52,52 @@ matrix:
- CFGOPT=--disable-shared
- BUILD_DIR=unix
# Older versions of GCC...
- - name: "Linux/GCC 4.9/Shared"
+ - name: "Linux/GCC 7/Shared"
os: linux
dist: xenial
- compiler: gcc-4.9
+ compiler: gcc-7
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-4.9
+ - g++-7
env:
- BUILD_DIR=unix
- - name: "Linux/GCC 5/Shared"
+ - name: "Linux/GCC 6/Shared"
os: linux
dist: xenial
- compiler: gcc-5
+ compiler: gcc-6
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-5
+ - g++-6
env:
- BUILD_DIR=unix
- - name: "Linux/GCC 6/Shared"
+ - name: "Linux/GCC 5/Shared"
os: linux
dist: xenial
- compiler: gcc-6
+ compiler: gcc-5
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-6
+ - g++-5
env:
- BUILD_DIR=unix
- - name: "Linux/GCC 7/Shared"
+ - name: "Linux/GCC 4.9/Shared"
os: linux
dist: xenial
- compiler: gcc-7
+ compiler: gcc-4.9
addons: &gcc7deps
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-7
+ - g++-4.9
env:
- BUILD_DIR=unix
- name: "Linux/GCC 7/Shared: UTF_MAX=6"
@@ -117,14 +117,14 @@ matrix:
- BUILD_DIR=unix
- CFGOPT=CFLAGS=-DTCL_UTF_MAX=3
# Testing on Mac, various styles
- - name: "macOS/Xcode 8/Shared/Unix-like"
+ - name: "macOS/Xcode 11/Shared/Unix-like"
os: osx
- osx_image: xcode8
+ osx_image: xcode11
env:
- BUILD_DIR=unix
- - name: "macOS/Xcode 8/Shared/Mac-like"
+ - name: "macOS/Xcode 11/Shared/Mac-like"
os: osx
- osx_image: xcode8
+ osx_image: xcode11
env:
- BUILD_DIR=macosx
install: []
@@ -132,6 +132,13 @@ matrix:
- make all
# The styles=develop avoids some weird problems on OSX
- make test styles=develop
+ - name: "macOS/Xcode 10/Shared/Mac-like"
+ os: osx
+ osx_image: xcode10.2
+ env:
+ - BUILD_DIR=macosx
+ install: []
+ script: *mactest
- name: "macOS/Xcode 9/Shared/Mac-like"
os: osx
osx_image: xcode9
@@ -139,9 +146,9 @@ matrix:
- BUILD_DIR=macosx
install: []
script: *mactest
- - name: "macOS/Xcode 10/Shared/Mac-like"
+ - name: "macOS/Xcode 8/Shared/Mac-like"
os: osx
- osx_image: xcode10.2
+ osx_image: xcode8
env:
- BUILD_DIR=macosx
install: []
diff --git a/compat/stdlib.h b/compat/stdlib.h
index 6900be3..bb0f133 100644
--- a/compat/stdlib.h
+++ b/compat/stdlib.h
@@ -5,7 +5,7 @@
* This file isn't complete in the ANSI-C sense; it only declares things
* that are needed by Tcl. This file is needed even on many systems with
* their own stdlib.h (e.g. SunOS) because not all stdlib.h files declare
- * all the procedures needed here (such as strtod).
+ * all the procedures needed here (such as strtol/strtoul).
*
* Copyright (c) 1991 The Regents of the University of California.
* Copyright (c) 1994-1998 Sun Microsystems, Inc.
diff --git a/tests-perf/clock.perf.tcl b/tests-perf/clock.perf.tcl
index f80746f..c0da0ab 100644
--- a/tests-perf/clock.perf.tcl
+++ b/tests-perf/clock.perf.tcl
@@ -122,7 +122,7 @@ proc test-format {{reptime 1000}} {
}
proc test-scan {{reptime 1000}} {
- _test_run $reptime {
+ _test_run -convert-result {clock format $_(r) -locale en} $reptime {
# Scan : date (in gmt)
{clock scan "25.11.2015" -format "%d.%m.%Y" -base 0 -gmt 1}
# Scan : date (system time zone, with base)
@@ -198,11 +198,11 @@ proc test-scan {{reptime 1000}} {
# {clock scan "25.11.2015" -format [string repeat "[incr i] %d.%m.%Y %d.%m.%Y" 10] -base 0 -gmt 1}
# # Scan : again:
# {clock scan "25.11.2015" -format [string repeat "[incr i -1] %d.%m.%Y %d.%m.%Y" 10] -base 0 -gmt 1}
- } {puts [clock format $_(r) -locale en]}
+ }
}
proc test-freescan {{reptime 1000}} {
- _test_run $reptime {
+ _test_run -convert-result {clock format $_(r) -locale en} $reptime {
# FreeScan : relative date
{clock scan "5 years 18 months 385 days" -base 0 -gmt 1}
# FreeScan : relative date with relative weekday
@@ -239,7 +239,7 @@ proc test-freescan {{reptime 1000}} {
{clock scan "19:18:30 MST" -base 148863600 -gmt 1
clock scan "19:18:30 EST" -base 148863600
}
- } {puts [clock format $_(r) -locale en]}
+ }
}
proc test-add {{reptime 1000}} {
@@ -282,7 +282,7 @@ proc test-add {{reptime 1000}} {
if {[catch {clock add 0 3 weekdays -gmt 1}]} {
regsub -all {\mweekdays\M} $tests "days" tests
}
- _test_run $reptime $tests {puts [clock format $_(r) -locale en]}
+ _test_run -convert-result {clock format $_(r) -locale en} $reptime $tests
}
proc test-convert {{reptime 1000}} {
diff --git a/tests-perf/test-performance.tcl b/tests-perf/test-performance.tcl
index 78189e6..a715c8a 100644
--- a/tests-perf/test-performance.tcl
+++ b/tests-perf/test-performance.tcl
@@ -127,15 +127,23 @@ proc _adjust_maxcount {reptime maxcount} {
proc _test_run {args} {
upvar _ _
# parse args:
- array set _ [set _opts {-no-result 0 -uplevel 0}]
+ array set _ {-no-result 0 -uplevel 0 -convert-result {}}
while {[llength $args] > 2} {
- if {[set o [lindex $args 0]] ni $_opts || $_($o)} {
+ if {![info exists _([set o [lindex $args 0]])]} {
break
}
- set _($o) 1
- set args [lrange $args 1 end]
+ if {[string is boolean -strict $_($o)]} {
+ set _($o) [expr {! $_($o)}]
+ set args [lrange $args 1 end]
+ } else {
+ if {[llength $args] <= 2} {
+ return -code error "value expected for option $o"
+ }
+ set _($o) [lindex $args 1]
+ set args [lrange $args 2 end]
+ }
}
- unset -nocomplain _opts o
+ unset -nocomplain o
if {[llength $args] < 2 || [llength $args] > 3} {
return -code error "wrong # args: should be \"[lindex [info level [info level]] 0] ?-no-result? reptime lst ?outcmd?\""
}
@@ -173,7 +181,8 @@ proc _test_run {args} {
# if output result (and not once):
if {!$_(-no-result)} {
set _(r) [if 1 $_(c)]
- if {$_(outcmd) ne {}} {{*}$_(outcmd) $_(r)}
+ if {$_(-convert-result) ne ""} { set _(r) [if 1 $_(-convert-result)] }
+ {*}$_(outcmd) $_(r)
if {[llength $_(ittime)] > 1} { # decrement max-count
lset _(ittime) 1 [expr {[lindex $_(ittime) 1] - 1}]
}
diff --git a/tests/expr.test b/tests/expr.test
index b9be22b..49ca63e 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -728,7 +728,7 @@ test expr-18.1 {expr and conversion of operands to numbers} {
catch {expr int($x)}
expr {$x}
} 11
-test expr-18.2 {whitespace strings should not be == 0 (buggy strtod)} {
+test expr-18.2 {whitespace strings should not be == 0 (buggy strtol/strtoul)} {
expr {" "}
} { }
diff --git a/unix/configure b/unix/configure
index a5afdfa..e83f47d 100755
--- a/unix/configure
+++ b/unix/configure
@@ -3333,8 +3333,8 @@ esac
#--------------------------------------------------------------------
# Supply substitutes for missing POSIX header files. Special notes:
-# - stdlib.h doesn't define strtol, strtoul, or
-# strtod insome versions of SunOS
+# - stdlib.h doesn't define strtol or strtoul in some versions
+# of SunOS
# - some versions of string.h don't declare procedures such
# as strstr
# Do this early, otherwise an autoconf bug throws errors on configure
@@ -3825,19 +3825,6 @@ else
fi
rm -f conftest*
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtod" >/dev/null 2>&1; then :
-
-else
- tcl_ok=0
-fi
-rm -f conftest*
-
if test $tcl_ok = 0; then
$as_echo "#define NO_STDLIB_H 1" >>confdefs.h
@@ -5660,7 +5647,7 @@ fi
fi
# The combo of gcc + glibc has a bug related to inlining of
- # functions like strtod(). The -fno-builtin flag should address
+ # functions like strtol()/strtoul(). The -fno-builtin flag should address
# this problem but it does not work. The -fno-inline flag is kind
# of overkill but it works. Disable inlining only when one of the
# files in compat/*.c is being linked in.
diff --git a/unix/configure.ac b/unix/configure.ac
index aa480d2..c41cf73 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -89,8 +89,8 @@ AC_C_INLINE
#--------------------------------------------------------------------
# Supply substitutes for missing POSIX header files. Special notes:
-# - stdlib.h doesn't define strtol, strtoul, or
-# strtod insome versions of SunOS
+# - stdlib.h doesn't define strtol or strtoul in some versions
+# of SunOS
# - some versions of string.h don't declare procedures such
# as strstr
# Do this early, otherwise an autoconf bug throws errors on configure
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 082b173..7b62044 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1311,7 +1311,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
])
# The combo of gcc + glibc has a bug related to inlining of
- # functions like strtod(). The -fno-builtin flag should address
+ # functions like strtol()/strtoul(). The -fno-builtin flag should address
# this problem but it does not work. The -fno-inline flag is kind
# of overkill but it works. Disable inlining only when one of the
# files in compat/*.c is being linked in.
@@ -1913,8 +1913,8 @@ dnl # preprocessing tests use only CPPFLAGS.
#
# Supply substitutes for missing POSIX header files. Special
# notes:
-# - stdlib.h doesn't define strtol, strtoul, or
-# strtod insome versions of SunOS
+# - stdlib.h doesn't define strtol or strtoul in some
+# versions of SunOS
# - some versions of string.h don't declare procedures such
# as strstr
#
@@ -1965,7 +1965,6 @@ closedir(d);
AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
- AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
if test $tcl_ok = 0; then
AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
fi
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 2e54e72..be507a6 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -411,7 +411,7 @@ TclpInitPlatform(void)
/*
* In case the initial locale is not "C", ensure that the numeric
* processing is done in "C" locale regardless. This is needed because Tcl
- * relies on routines like strtod, but should not have locale dependent
+ * relies on routines like strtol/strtoul, but should not have locale dependent
* behavior.
*/
diff --git a/win/tcl.dsp b/win/tcl.dsp
index 4d9277b..277bb4e 100644
--- a/win/tcl.dsp
+++ b/win/tcl.dsp
@@ -148,10 +148,6 @@ SOURCE=..\compat\dlfcn.h
# End Source File
# Begin Source File
-SOURCE=..\compat\fixstrtod.c
-# End Source File
-# Begin Source File
-
SOURCE=..\compat\gettod.c
# End Source File
# Begin Source File
@@ -188,10 +184,6 @@ SOURCE=..\compat\strstr.c
# End Source File
# Begin Source File
-SOURCE=..\compat\strtod.c
-# End Source File
-# Begin Source File
-
SOURCE=..\compat\strtol.c
# End Source File
# Begin Source File