summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-12-10 18:34:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-12-10 18:34:37 (GMT)
commitb33993aaf9ec488a95bab79cd5dae16628ba0818 (patch)
treefe9e75c62b1d5a7ef2064caa0343164ecc9de3a0
parent2f178f93ab97418ebc734320d8c9e2b309906bba (diff)
parentf4ec29ceb25d347536aee82060c3402bc87a94e8 (diff)
downloadtcl-b33993aaf9ec488a95bab79cd5dae16628ba0818.zip
tcl-b33993aaf9ec488a95bab79cd5dae16628ba0818.tar.gz
tcl-b33993aaf9ec488a95bab79cd5dae16628ba0818.tar.bz2
merge 8.6
-rw-r--r--.github/workflows/linux-build.yml3
-rw-r--r--.github/workflows/mac-build.yml3
-rw-r--r--.travis.yml3
-rw-r--r--generic/tclFileName.c4
-rw-r--r--library/platform/platform.tcl34
-rw-r--r--tests/chanio.test2
-rw-r--r--tests/unixFCmd.test4
-rw-r--r--tests/unixFile.test2
-rw-r--r--win/rules.vc7
-rw-r--r--win/tclWinFile.c7
10 files changed, 42 insertions, 27 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml
index bf0a4cb..3d56638 100644
--- a/.github/workflows/linux-build.yml
+++ b/.github/workflows/linux-build.yml
@@ -20,7 +20,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
- run: touch tclStubInit.c tclOOStubInit.c
+ run: |
+ touch tclStubInit.c tclOOStubInit.c
working-directory: generic
- name: Configure ${{ matrix.cfgopt }}
run: |
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml
index 3302265..c1144ab 100644
--- a/.github/workflows/mac-build.yml
+++ b/.github/workflows/mac-build.yml
@@ -11,7 +11,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
- run: touch tclStubInit.c tclOOStubInit.c
+ run: |
+ touch tclStubInit.c tclOOStubInit.c
working-directory: generic
- name: Build
run: make all
diff --git a/.travis.yml b/.travis.yml
index d2e3ca9..eb1ec0c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -190,7 +190,6 @@ jobs:
- BUILD_DIR=win
- VCDIR="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"
before_install: &vcpreinst
- - rm -rf tests/safe-stock8*.test
- touch generic/tclStubInit.c generic/tclOOStubInit.c
- PATH="$PATH:$VCDIR"
- cd ${BUILD_DIR}
@@ -297,7 +296,6 @@ jobs:
- BUILD_DIR=win
- CFGOPT="--enable-64bit"
before_install: &makepreinst
- - rm -rf tests/safe-stock8*.test
- touch generic/tclStubInit.c generic/tclOOStubInit.c
- choco install -y make
- cd ${BUILD_DIR}
@@ -374,7 +372,6 @@ jobs:
script:
- make dist
before_install:
- - rm -rf tests/safe-stock8*.test
- touch generic/tclStubInit.c generic/tclOOStubInit.c
- cd ${BUILD_DIR}
install:
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 15f93f4..cfd76e6 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -242,7 +242,7 @@ ExtractWinRoot(
if (path[4] == '\0') {
abs = 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
abs = 5;
}
@@ -264,7 +264,7 @@ ExtractWinRoot(
if (path[4] == '\0') {
abs = 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
abs = 5;
}
}
diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl
index 87d720b..2e54a33 100644
--- a/library/platform/platform.tcl
+++ b/library/platform/platform.tcl
@@ -94,12 +94,6 @@ proc ::platform::generic {} {
}
switch -glob -- $plat {
- cygwin* {
- set plat cygwin
- }
- msys* {
- set plat msystem
- }
windows {
if {$tcl_platform(platform) == "unix"} {
set plat cygwin
@@ -152,6 +146,9 @@ proc ::platform::generic {} {
osf1 {
set plat tru64
}
+ default {
+ set plat [lindex [split $plat _-] 0]
+ }
}
return "${plat}-${cpu}"
@@ -178,11 +175,15 @@ proc ::platform::identify {} {
}
macosx {
set major [lindex [split $tcl_platform(osVersion) .] 0]
- if {$major > 8} {
+ if {$major > 19} {
+ incr major -20
+ append plat 11.$major
+ } else {
incr major -4
append plat 10.$major
return "${plat}-${cpu}"
}
+ return "${plat}-${cpu}"
}
linux {
# Look for the libc*.so and determine its version
@@ -333,7 +334,7 @@ proc ::platform::patterns {id} {
lappend res macosx-universal macosx-i386-x86_64
}
macosx*-* {
- # 10.5+
+ # 10.5+,11.0+
if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} {
switch -exact -- $cpu {
@@ -341,15 +342,28 @@ proc ::platform::patterns {id} {
lappend alt i386-x86_64
lappend alt universal
}
- x86_64 { lappend alt i386-x86_64 }
+ x86_64 {
+ lappend alt i386-x86_64
+ }
default { set alt {} }
}
if {$v ne ""} {
foreach {major minor} [split $v .] break
- # Add 10.5 to 10.minor to patterns.
set res {}
+ if {$major eq 11} {
+ # Add 11.0 to 11.minor to patterns.
+ for {set j $minor} {$j >= 0} {incr j -1} {
+ lappend res macosx${major}.${j}-${cpu}
+ foreach a $alt {
+ lappend res macosx${major}.${j}-$a
+ }
+ }
+ set major 10
+ set minor 15
+ }
+ # Add 10.5 to 10.minor to patterns.
for {set j $minor} {$j >= 5} {incr j -1} {
lappend res macosx${major}.${j}-${cpu}
foreach a $alt {
diff --git a/tests/chanio.test b/tests/chanio.test
index 5586015..28da530 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -5334,7 +5334,7 @@ test chan-io-40.1 {POSIX open access modes: RDWR} -setup {
test chan-io-40.2 {POSIX open access modes: CREAT} -setup {
file delete $path(test3)
} -constraints {unix} -body {
- set f [open $path(test3) {WRONLY CREAT} 0600]
+ set f [open $path(test3) {WRONLY CREAT} 0o600]
file stat $path(test3) stats
set x [format 0o%03o [expr {$stats(mode) & 0o777}]]
chan puts $f "line 1"
diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test
index 991e489..4b1687f 100644
--- a/tests/unixFCmd.test
+++ b/tests/unixFCmd.test
@@ -137,11 +137,11 @@ test unixFCmd-1.7 {TclpRenameFile: EXDEV} -setup {
cleanup
} -constraints {unix notRoot} -body {
file mkdir foo/bar
- file attr foo -perm 040555
+ file attr foo -perm 0o40555
file rename foo/bar /tmp
} -returnCodes error -cleanup {
catch {file delete /tmp/bar}
- catch {file attr foo -perm 040777}
+ catch {file attr foo -perm 0o40777}
catch {file delete -force foo}
} -match glob -result {*: permission denied}
test unixFCmd-1.8 {Checking EINTR Bug} {unix notRoot nonPortable} {
diff --git a/tests/unixFile.test b/tests/unixFile.test
index 492e5d0..3669cce 100644
--- a/tests/unixFile.test
+++ b/tests/unixFile.test
@@ -24,7 +24,7 @@ cd [temporaryDirectory]
catch {
set oldPath $env(PATH)
- file attributes [makeFile "" junk] -perm 0777
+ file attributes [makeFile "" junk] -perm 0o777
}
set absPath [file join [temporaryDirectory] junk]
diff --git a/win/rules.vc b/win/rules.vc
index a0084a4..76d93cd 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -667,9 +667,10 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg
# MSVCRT - 1 -> link to dynamic C runtime even when building static Tcl build
# 0 -> link to static C runtime for static Tcl build.
# Does not impact shared Tcl builds (STATIC_BUILD == 0)
+# Default: 1 for Tcl 8.7 and up, 0 otherwise.
# TCL_USE_STATIC_PACKAGES - 1 -> statically link the registry and dde extensions
-# in the Tcl shell. 0 -> keep them as shared libraries
-# Does not impact shared Tcl builds.
+# in the Tcl and Wish shell. 0 -> keep them as shared libraries. Does
+# not impact shared Tcl builds. Implied by STATIC_BUILD since Tcl 8.7.
# USE_THREAD_ALLOC - 1 -> Use a shared global free pool for allocation.
# 0 -> Use the non-thread allocator.
# UNCHECKED - 1 -> when doing a debug build with symbols, use the release
@@ -724,7 +725,7 @@ MSVCRT = 0
!if [nmakehlp -f $(OPTS) "msvcrt"]
!message *** Doing msvcrt
!else
-!if $(STATIC_BUILD)
+!if "$(TCL_MAJOR_VERSION)" == "8" && "$(TCL_MINOR_VERSION)" < "7" && $(STATIC_BUILD)
MSVCRT = 0
!endif
!endif
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 6cfeae1..2967cce 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1250,7 +1250,7 @@ WinIsReserved(
if (path[4] == '\0') {
return 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
return 4;
}
} else if ((path[2] == 'n' || path[2] == 'N') && path[3] == '\0') {
@@ -1271,7 +1271,7 @@ WinIsReserved(
if (path[4] == '\0') {
return 4;
- } else if (path [4] == ':' && path[5] == '\0') {
+ } else if (path[4] == ':' && path[5] == '\0') {
return 4;
}
}
@@ -3100,7 +3100,8 @@ TclNativeCreateNativeRep(
goto done;
}
MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, nativePathPtr,
- len + 1);
+ len + 2);
+ nativePathPtr[len] = 0;
/*
* If path starts with "//?/" or "\\?\" (extended path), translate any