On 15/11/2008, at 6:06 AM, Tom Fortmann wrote:

Is there a core foundation function for querying the Mac OS X operating system name and version information? The uname() API returns the Darwin kernel version information, but I need to find the OS X 10.x.x information.


This is the way you should do it:

SInt32 majorVersion,minorVersion,bugFixVersion;

Gestalt(gestaltSystemVersionMajor, &majorVersion);
Gestalt(gestaltSystemVersionMinor, &minorVersion);
Gestalt(gestaltSystemVersionBugFix, &bugFixVersion);

NSLog(@"Running on Mac OS X %d.%d. %d",majorVersion,minorVersion,bugFixVersion);

--
Rob Keniger



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to