Re: "Re: G4 vs G3" (G3 isn't 604ev)
Re: "Re: G4 vs G3" (G3 isn't 604ev)
- Subject: Re: "Re: G4 vs G3" (G3 isn't 604ev)
- From: "Jean-Daniel Dupas" <email@hidden>
- Date: Wed, 11 Jun 2003 13:35:07 +0200
Your methode is OK, but a 604ev isn't a G3.
G3 is MPC750, so you need set G3 in the "case gestaltCPU750:" statement.
JD
>
Message: 11
>
From: Rolf <email@hidden>
>
To: Alexander Griekspoor <email@hidden>
>
Cc: email@hidden
>
Date: Wed, 11 Jun 2003 12:02:57 +0200
>
Subject: Re: G4 vs G3
>
>
Hi,
>
>
Try the following:
>
>
+(NSString *)processor {
>
SInt32 gestaltReturnValue;
>
NSString * result = @"";
>
if (!Gestalt(gestaltNativeCPUtype, &gestaltReturnValue)) {
>
switch (gestaltReturnValue) {
>
case gestaltCPU601 :
>
case gestaltCPU603 :
>
case gestaltCPU604 :
>
case gestaltCPU603e :
>
case gestaltCPU603ev :
>
case gestaltCPU750 :
>
case gestaltCPU604e :
>
case gestaltCPU604ev : { result = @"G3"; break; }
>
case gestaltCPUG4 :
>
case gestaltCPUG47450 : { result = @"G4"; break; }
>
default: {
>
if (gestaltReturnValue > gestaltCPUG47450) {
>
result = @"G4 or better";
>
} else {
>
result = [NSString stringWithFormat:@"Unknown"];
>
}
>
}
>
}
>
} else { // Failed
>
}
>
return result;
>
}
>
>
>
If you need to know th nr of Mhz and so forth send me a note.
>
>
/Rolf
>
>
>
>
11.06.2003 11:47:41, skrev Alexander Griekspoor <email@hidden>:
>
>
>Hi There!
>
>
>
>Does anyone know a simple call to find out which processor type (G3 or
>
>G4, PPC970 ;-) the user has?
>
>Ideally, I'm looking for something like MPProcessors() which returns
>
>the number of processors the machine has. Then one more small question.
>
>It might be to simple for words, but for someone new to the UNIX world,
>
>is there a simple way to browse to the header files like mach/mach.h
>
>and other c libraries?
>
>
>
>Many thanks in advance!
>
>Alexander Griekspoor
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.