Re: Gestalt
Re: Gestalt
- Subject: Re: Gestalt
- From: Sean McBride <email@hidden>
- Date: Wed, 21 Sep 2011 15:32:28 -0400
- Organization: Rogue Research Inc.
On Wed, 21 Sep 2011 13:26:32 -0600, koko said:
>Is Gestalt(gestaltSystemVersion, &MacVersion) the wat toget OSX versions
>today and moving forward?
No. Because it's BCD and breaks for values larger than 9. See Gestalt.h. Instead, use:
SInt32 major = 0;
(void)Gestalt (gestaltSystemVersionMajor, &major);
SInt32 minor = 0;
(void)Gestalt (gestaltSystemVersionMinor, &minor);
SInt32 fix = 0;
(void)Gestalt (gestaltSystemVersionBugFix, &fix);
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
References: | |
| >Gestalt (From: koko <email@hidden>) |