[OpenAFS-port-darwin] gui Mount_AFS update

Nicholas Riley njriley@uiuc.edu
Thu, 4 Dec 2003 12:14:05 -0600


On Thu, Dec 04, 2003 at 01:04:33PM -0500, Jonathan Z. Simon wrote:
> Try the shell command 'uname -r', which gives the OS release number (in 
> this case for Darwin).
> > uname -r
> 6.8
> where Darwin 6 = Mac OS X 10.2, Darwin 7 = Mac OS X 10.3, etc.. The 
> number after the decimal is the minor version number and is the same 
> for both Darwin and Mac OS X. I'm running Mac OS X 10.2.8 which 
> therefore comes out as 6.8.

This isn't quite true; uname only changes if the kernel version
changes, so since 10.3.0 and 10.3.1 have the same kernel, uname -r is
still 7.0 under 10.3.1.

You can use the Gestalt function with gestaltSystemVersion, parse
sw_vers output, parse /System/Library/CoreServices/SystemVersion.plist,
and call the private CFCopySystemVersionDictionary (in decreasing
order of supported-ness; nothing other than Gestalt is guaranteed by
Apple to work in future Mac OS X versions).

Code to do the former is here:

<http://cocoa.mamasam.com/COCOADEV/2003/10/2/74607.php>

-- 
=Nicholas Riley <njriley@uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>