Re: How do you get the OS X version number in C or C++?

2008-11-20 Thread Sean McBride
On 11/15/08 12:40 AM, Michael Ash said: + (BOOL)MacOSTigerOrLower { UInt32 version; return (Gestalt(gestaltSystemVersion,(SInt32 *) version) == noErr) (version 0x01050 ); } Gestalt() is a good approach, but never use gestaltSystemVersion. See Gestalt.h for why. I don't think you

How do you get the OS X version number in C or C++?

2008-11-14 Thread Tom Fortmann
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. Tom Fortmann Xcape Solutions

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread chaitanya pandit
+ (BOOL)MacOSTigerOrLower { UInt32 version; return (Gestalt(gestaltSystemVersion,(SInt32 *) version) == noErr) (version 0x01050 ); } On 15-Nov-08, at 1:36 AM, Tom Fortmann wrote: Is there a core foundation function for querying the Mac OS X operating system name and version

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Randall Meadows
On Nov 14, 2008, at 1:06 PM, 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. If nothing else,

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Sean McBride
On 11/15/08 1:48 AM, chaitanya pandit said: + (BOOL)MacOSTigerOrLower { UInt32 version; return (Gestalt(gestaltSystemVersion,(SInt32 *) version) == noErr) (version 0x01050 ); } Gestalt() is a good approach, but never use gestaltSystemVersion. See Gestalt.h for why. --

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Jesper Storm Bache
gestaltSystemVersion is not the best way to do it (and it caused problems in 10.4.10 and up). As the documentation in Gestalt.h states: ... A better way to get version information on Mac OS X would be to use the new gestaltSystemVersionMajor, gestaltSystemVersionMinor, and

RE: How do you get the OS X version number in C or C++?

2008-11-14 Thread Tom Fortmann
Subject: Re: How do you get the OS X version number in C or C++? On 11/15/08 1:48 AM, chaitanya pandit said: + (BOOL)MacOSTigerOrLower { UInt32 version; return (Gestalt(gestaltSystemVersion,(SInt32 *) version) == noErr) (version 0x01050 ); } Gestalt() is a good approach, but never use

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Nick Zitzmann
On Nov 14, 2008, at 1:53 PM, Tom Fortmann wrote: What framework do I include in my Xcode project to pull in Gestalt? I've tries CoreServices, Carbon and Cocoa. It's in the CoreServices umbrella framework, but just linking to the Cocoa or Carbon frameworks and importing their master

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Sean McBride
On 11/14/08 2:53 PM, Tom Fortmann said: What framework do I include in my Xcode project to pull in Gestalt? I've tries CoreServices, Carbon and Cocoa. In Xcode, option-double-click the word Gestalt (or any API), this will open the docs for that API. Scroll to the very top, you'll see:

RE: How do you get the OS X version number in C or C++?

2008-11-14 Thread Tom Fortmann
-dev@lists.apple.com Subject: Re: How do you get the OS X version number in C or C++? On 11/14/08 2:53 PM, Tom Fortmann said: What framework do I include in my Xcode project to pull in Gestalt? I've tries CoreServices, Carbon and Cocoa. In Xcode, option-double-click the word Gestalt (or any API

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Michael Ash
On Fri, Nov 14, 2008 at 3:27 PM, Sean McBride [EMAIL PROTECTED] wrote: On 11/15/08 1:48 AM, chaitanya pandit said: + (BOOL)MacOSTigerOrLower { UInt32 version; return (Gestalt(gestaltSystemVersion,(SInt32 *) version) == noErr) (version 0x01050 ); } Gestalt() is a good approach, but

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Rob Keniger
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