From 48e066711f2f019314605b45c4b136118d9c1b45 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 30 Sep 2015 13:44:52 +0000 Subject: 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. --- library/platform/platform.tcl | 13 ++++++------- 1 file 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 -- cgit v0.12