Well, I'm confused.
I've been trying to get the CPU speed from the Gestalt Manager, as it says in the title. I'm using CodeWarrior Pro 4 on an emulated Quadra 800 running Mac OS 8.1.
I have code similar to the following :
I get a gestalt error -5551, but it has to be available! This is from the same (emulated) machine :

If I replace 'Frq2' with something like 'proc', everything works as expected.
Note that 'Frq2' doesn't have an entry in the gestalt.h file that comes with CodeWarrior - does this mean that it is also missing from a library and that is causing my issue? Because I'm on an 040, I don't seem to have access to 'Freq', 'pclk' or anything else that might be helpful, but obviously Gestalt.Appl is managing it somehow
I've been trying to get the CPU speed from the Gestalt Manager, as it says in the title. I'm using CodeWarrior Pro 4 on an emulated Quadra 800 running Mac OS 8.1.
I have code similar to the following :
Code:
#include <stdio.h>
#include <Gestalt.h>
#include <Errors.h>
int main(void) {
long procSpd;
OSErr err;
err = Gestalt('Frq2', &procSpd);
if (err != noErr){
printf("Gestalt Error %d\n", err);
}else{
printf("Gestalt returned %d\n", procSpd);
}
return 0;
}
I get a gestalt error -5551, but it has to be available! This is from the same (emulated) machine :

If I replace 'Frq2' with something like 'proc', everything works as expected.
Note that 'Frq2' doesn't have an entry in the gestalt.h file that comes with CodeWarrior - does this mean that it is also missing from a library and that is causing my issue? Because I'm on an 040, I don't seem to have access to 'Freq', 'pclk' or anything else that might be helpful, but obviously Gestalt.Appl is managing it somehow


