Re: Right way to check system version?
Re: Right way to check system version?
- Subject: Re: Right way to check system version?
- From: "Finlay Dobbie" <email@hidden>
- Date: Fri, 19 May 2006 15:06:34 +0100
On 19/05/06, Steve Checkoway <email@hidden> wrote:
/* Get system version */
err = Gestalt( gestaltSystemVersion, &code );
if( err == noErr )
{
int major = ( (code >> 12) & 0xF ) * 10 + (code >> 8) & 0xF;
int minor = (code >> 4) & 0xF;
int revision = code & 0xF;
No need to extract the individual components, just have an comparison:
if (code >= 0x1030) // we're on panther or newer
-- Finlay
printf( "Mac OS X %d.%d.%d\n", major, minor, revision );
}
return 0;
}
- Steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden