summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-30 13:45:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-30 13:45:54 (GMT)
commitd9e578497f04f635c607c31a80305cccf3654126 (patch)
tree650b12bc6768f7d3e262c57237cbae37de27657f
parentc7881ffe33c3bd7f1caa3700d5e554da62a5b2db (diff)
parent48e066711f2f019314605b45c4b136118d9c1b45 (diff)
downloadtcl-d9e578497f04f635c607c31a80305cccf3654126.zip
tcl-d9e578497f04f635c607c31a80305cccf3654126.tar.gz
tcl-d9e578497f04f635c607c31a80305cccf3654126.tar.bz2
Mutch simpler solution to [219866c1e9]: In stead of filtering out version information from the string, make sure that ::platform::generic doesn't contain this version information in the first place.
-rw-r--r--library/platform/platform.tcl13
1 files changed, 6 insertions, 7 deletions
diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl
index 8dd91ee..c596e60 100644
--- a/library/platform/platform.tcl
+++ b/library/platform/platform.tcl
@@ -93,10 +93,13 @@ proc ::platform::generic {} {
}
}
- switch -- $plat {
+ switch -glob -- $plat {
+ cygwin* {
+ set plat cygwin
+ }
windows {
if {$tcl_platform(platform) == "unix"} {
- set plat cygwin_nt
+ set plat cygwin
} else {
set plat win32
}
@@ -104,7 +107,6 @@ proc ::platform::generic {} {
# Do not check wordSize, win32-x64 is an IL32P64 platform.
set cpu x86_64
}
- append plat -$tcl_platform(osVersion)
}
sunos {
set plat solaris
@@ -163,12 +165,9 @@ proc ::platform::identify {} {
global tcl_platform
set id [generic]
- regexp {^([^-]+)(-[0-9\.]+)?(-wow)?-([^-]+)$} $id -> plat ver wow cpu
+ regexp {^([^-]+)-([^-]+)$} $id -> plat ver wow cpu
switch -- $plat {
- cygwin_nt {
- return "${plat}-${cpu}"
- }
solaris {
regsub {^5} $tcl_platform(osVersion) 2 text
append plat $text