summaryrefslogtreecommitdiffstats
path: root/library/platform
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2009-04-08 19:17:44 (GMT)
committerandreas_kupries <akupries@shaw.ca>2009-04-08 19:17:44 (GMT)
commit9bc6349d687303e2396272aa45de0d38a16e87f5 (patch)
tree9ecfe8c724b8a7039bd38ef169fdfe8dc1ab29f9 /library/platform
parentffc8f6440e2b529e2f41d8952fa7392213511ef6 (diff)
downloadtcl-9bc6349d687303e2396272aa45de0d38a16e87f5.zip
tcl-9bc6349d687303e2396272aa45de0d38a16e87f5.tar.gz
tcl-9bc6349d687303e2396272aa45de0d38a16e87f5.tar.bz2
* library/platform/platform.tcl: Extended the darwin sections to
* library/platform/pkgIndex.tcl: add a kernel version number to * unix/Makefile.in: the identifier for anything from Leopard (10.5) * win/Makefile.in: on up. Extended patterns for same. Extended cpu * doc/platform.n: recognition for 64bit Tcl running on a 32bit kernel on a 64bit processor (By Daniel Steffen). Bumped version to 1.0.4. Updated Makefiles.
Diffstat (limited to 'library/platform')
-rw-r--r--library/platform/pkgIndex.tcl2
-rw-r--r--library/platform/platform.tcl40
2 files changed, 40 insertions, 2 deletions
diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl
index 27d596f..a63f4aa 100644
--- a/library/platform/pkgIndex.tcl
+++ b/library/platform/pkgIndex.tcl
@@ -1,3 +1,3 @@
-package ifneeded platform 1.0.3 [list source [file join $dir platform.tcl]]
+package ifneeded platform 1.0.4 [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 143cdc5..b42c419 100644
--- a/library/platform/platform.tcl
+++ b/library/platform/platform.tcl
@@ -111,6 +111,13 @@ proc ::platform::generic {} {
}
darwin {
set plat macosx
+ # Correctly identify the cpu when running as a 64bit
+ # process on a machine with a 32bit kernel
+ if {$cpu eq "ix86"} {
+ if {$tcl_platform(wordSize) == 8} {
+ set cpu x86_64
+ }
+ }
}
aix {
set cpu powerpc
@@ -154,6 +161,14 @@ proc ::platform::identify {} {
append plat $text
return "${plat}-${cpu}"
}
+ macosx {
+ set major [lindex [split $tcl_platform(osVersion) .] 0]
+ if {$major > 8} {
+ incr major -4
+ append plat 10.$major
+ return "${plat}-${cpu}"
+ }
+ }
linux {
# Look for the libc*.so and determine its version
# (libc5/6, libc6 further glibc 2.X)
@@ -238,6 +253,29 @@ proc ::platform::patterns {id} {
}
}
}
+ macosx*-* {
+ # 10.5+
+ if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} {
+ if {$v ne ""} {
+ foreach {major minor} [split $v .] break
+
+ # Add 10.5 to 10.minor to patterns.
+ set res {}
+ for {set j $minor} {$j >= 5} {incr j -1} {
+ lappend res macosx${major}.${j}-${cpu}
+ lappend res macosx${major}.${j}-universal
+ }
+
+ # Add unversioned patterns for 10.3/10.4 builds.
+ lappend res macosx-${cpu}
+ lappend res macosx-universal
+ } else {
+ lappend res macosx-universal
+ }
+ } else {
+ lappend res macosx-universal
+ }
+ }
macosx-powerpc -
macosx-ix86 {
lappend res macosx-universal
@@ -251,7 +289,7 @@ proc ::platform::patterns {id} {
# ### ### ### ######### ######### #########
## Ready
-package provide platform 1.0.3
+package provide platform 1.0.4
# ### ### ### ######### ######### #########
## Demo application