Re: Detecting CPU type
Re: Detecting CPU type
- Subject: Re: Detecting CPU type
- From: Alex Rosenberg <email@hidden>
- Date: Fri, 16 Sep 2005 09:41:07 -0700
That is what Gestalt's 'cput' and 'cpuf' selectors are for. There are
x86 variants in there already.
Alex
On Fri, 16 Sep 2005 8:33 am, John Stiles wrote:
When we did the 68K->PPC transition, Gestalt didn't lie about the CPU
model. I don't know why Gestalt would need to start lying now. That
seems bug-report worthy.
Rosyna wrote:
Everything lies! (under Rosetta).
You have to "call out" in order to find the info.
Or you can check the result of getenv("GL_RESOURCES"); Or you can see
if a specific file is opened by your application but these two methods
are bound to change.
Really wish there was a gestalt for the lies.
Ack, at 9/16/05, Heinrich Giesen said:
I would like to find out CPU Type (PPC or x86),
At runtime you can use a UNIX function:
#include <mach-o/arch.h>
NXArchInfo *info = NXGetLocalArchInfo();
printf( "name = %s\n", info->name );
printf( "description = %s\n", info->description );
. . . .
see UnixManual for arch in chapter 3:
/usr/share/man/man3/arch.3
_______________________________________________
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
+------------------------------------------------------------+
| Alexander M. Rosenberg <mailto:email@hidden> |
| Nobody cares what I say, so no disclaimer appears here. |
_______________________________________________
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