Re: determine CPU type at runtime
Re: determine CPU type at runtime
- Subject: Re: determine CPU type at runtime
- From: Chris Espinosa <email@hidden>
- Date: Mon, 25 Feb 2008 14:38:40 -0800
On Feb 25, 2008, at 1:48 PM, Paul Archibald wrote:
One of the apps I am working on has minor issues when running on an
Intel Mac, so I would like to be able to detect the cpu type at
runtime. I just need a method like:
bool ThisAppIsRunningOnAPowerPC()
Is this a job for Gestalt? It looks so complicated.
It's an API question, not a tools question, so it's not a job for
Xcode. (Though you got two tools-based replies that you might find
useful).
The droid you're looking for is sysctlbyname().
x-man-page://sysctlbyname
file:///usr/include/sys/sysctl.h
You're looking for CTL_HW, HW_MODEL.
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden