diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-29 07:46:08 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-29 07:46:08 (GMT) |
commit | 829e5981d2002fc5814baf55f4cb349527eb8428 (patch) | |
tree | ce3b78686ca3ac08adab793e67774571079e53de /library/platform | |
parent | bb34bee7731d54d1cb667229f88947fdcf5e4bb1 (diff) | |
parent | 27989920c531d0e374960fc9708734e170936bb9 (diff) | |
download | tcl-829e5981d2002fc5814baf55f4cb349527eb8428.zip tcl-829e5981d2002fc5814baf55f4cb349527eb8428.tar.gz tcl-829e5981d2002fc5814baf55f4cb349527eb8428.tar.bz2 |
Fix [219866c1e9]: platform::identify: regexp doesn't match platform -> platform 1.0.14
Diffstat (limited to 'library/platform')
-rw-r--r-- | library/platform/pkgIndex.tcl | 2 | ||||
-rw-r--r-- | library/platform/platform.tcl | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 5250163..5970a3f 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.13 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.14 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 1bce7b5..6843210 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -95,7 +95,11 @@ proc ::platform::generic {} { switch -- $plat { windows { - set plat win32 + if {$tcl_platform(platform) == "unix"} { + set plat cygwin_nt + } else { + set plat win32 + } if {$cpu eq "amd64"} { # Do not check wordSize, win32-x64 is an IL32P64 platform. set cpu x86_64 @@ -158,9 +162,12 @@ proc ::platform::identify {} { global tcl_platform set id [generic] - regexp {^([^-]+)-([^-]+)$} $id -> plat cpu + regexp {^([^-]+)(-[0-9\.]+)?(-wow)?-([^-]+)$} $id -> plat ver wow cpu switch -- $plat { + cygwin_nt { + return "${plat}-${cpu}" + } solaris { regsub {^5} $tcl_platform(osVersion) 2 text append plat $text @@ -371,7 +378,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.13 +package provide platform 1.0.14 # ### ### ### ######### ######### ######### ## Demo application |