Re: Detect Intel System?
Re: Detect Intel System?
- Subject: Re: Detect Intel System?
- From: Stephane Sudre <email@hidden>
- Date: Sun, 8 Aug 2010 11:16:19 +0200
- there can be other CPU with the same endianess.
- it would just be easier to check the sysctl for that
IMHO, if the code is supposed to run only on a shipped Mac OS X
system, the cputype sysctl is good enough. Sure, it does not exist on
old OS X releases but you can just assume that if it does not exist,
then you are running on a ppc system.
On Sunday, August 8, 2010, Travis Siegel <email@hidden> wrote:
> Wouldn't it be possible to simply create a sufficiently large number, then check the number to see if it's stored in big or little indian?
> Would that be enough to determine if it's i386 enough to execute?
> Alternatively, as mentioned before, you could simply include a small program that does something, such as return a value, and just execute it to see if it returns your specified value or not. If so, then presumably the hardware (or some emulation of such) can handle your i386 executable, and should be sufficient for your purposes.
> Another point of consideration is to see if you can get at the intel serial number. (remember those?)
> If the intel cpu has a serial number, then presumably it's an intel cpu (and the user hasn't disabled it in some way) and therefore your program will work properly.
> I suppose it's possible other cpus have similar (exactly the same?) method of retrieving serial numbers, but I've not explored this option, so this is only a guess that the intel retrieval method will be unique.
> Something to try though.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden