From: Daniel A. S. <st...@ic...> - 2001-09-14 05:12:25
|
[[ This message was both posted and mailed: see the "To," "Cc," and "Newsgroups" headers for details. ]] In article <3b9f5eb9$0$42882$8e9...@ne...>, Ryan Casey <sc...@ho...> wrote: > Below I have included the tcl_platforms that I am currently programming to. > (Actually, Linux too, but I don't have a test machine to get the info.) My > concern is with MacOS X. Is the platform=unix, os=Darwin canonical. IOW, > can I be sure this is how Tcl is always going to report it? yes that's pretty much guaranteed, as tcl on unices simply reports the result of uname() in tcl_platform(os) and that's VERY unlikely to change on OS X as a lot of things depend on this being 'Darwin'. > It makes my > platform-specific switching structures a little more complex and > unintuitive, considering I load Mac stuff two places (first if > platform=macintosh, then if platform=unix, os=Darwin). but that's a good thing, i.e. for a lot of code, tcl on darwin should not appear different from other unices, e.g. TclX works just fine essentially unchanged (minor changes required...) OTOH, if os==Darwin, you can assume that a lot of things that work on platform == macintosh will work as well, e.g. Tclapplescript (not just yet...), TclAE (done), hopefully the 'resource' command and other mac specific commands (beep) in the near future, as well as other carbonizable extensions (QuickTimeTcl comes to mind, maybe Snack?) so if you need to know, you can find out if you're running under OSX but most code running on other unices will not need/want to know and will still run just fine. in most cases you may actually want to be careful about assuming that os==Darwin is equivalent to platform==macintosh, esp. if you make assumptions about macintosh specific behaviour, for instance w.r.t paths (path separator is '/' not ':', no volumes etc) Things may change a bit on Tk, considering there will be two possibilities for Tk, Tk on Xwindows and TkAqua... not sure how this will be handled/reported yet; Jim? Cheers Daniel |