Re: Detect Intel System?
Re: Detect Intel System?
- Subject: Re: Detect Intel System?
- From: Duane Murphy <email@hidden>
- Date: Sun, 08 Aug 2010 08:39:32 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Thank you for all of the interesting and useful answers to this question.
I'm favoring the sysctl answer at this point.
Thank you for all of your help,
...Duane
On Aug 8, 2010, at 2:16 AM, Stephane Sudre wrote:
> - 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.
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 10.0.2 (Build 13)
Charset: us-ascii
wsBVAwUBTF7Pvkrg9acQ4r2CAQjr+gf6Aq20Q9JqIvhxDCRX5HkLI4Y7SGmVgmsq
qiO0uQXFCGNuHTYALvqEP5yS7l1hc9NRclGu5df3Q4w2bXJ1/36AD4b0xyfU4IeX
FmGhvXhvp5wOjQPDZRysu/iFVt5mTis2M3w6jjTD3Ldd5zF4MAC5GkoOhYSp74cr
MzIbOSDelGdtavc9SiwSz0Y1xAG3eD9TtiSmUDTKn/LIeQFxDMhVyJjZ89ujAQvz
LUJcMOh3jG66PVEefQqINB+L4M361MAW2ITTF4pWHPgMBJ1y/4Rq8r6AFK4AvsYR
hlD4udMEikrCHmtXLGtDKyx4PP9Cu9z0MZzTH3Ui8O7erXdcS/bs4Q==
=hfyc
-----END PGP SIGNATURE-----
_______________________________________________
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