site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=tGZjJ8rOMytMBK8mWGqPwUn/DrKKYwHnNWAYmVjkXSY=; b=hzspWCrd6mlZpUL9BuCaOeOqY3Cf5SlzdUWJE3E065VFnGNcTg4oOF0+gNqJrTVvJD BbzGrawUbAfX7q1NCEdT3eAN1j3D0S0HmnRgbqP96khOJyKcO+YMWtUfdQ38yV1CgWWS v0B6xTQvkutKrMjyA9Dx4yJM+d2UyHBOvniq4= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=DTh57QSCNnQagdd1pF0Ef0QaCh2MoJHYs8rAOD7ayBN9K9w3ktAvFGL/Fsbw5YstIs wDPfoxLTcX0HkztscsgEvD3x3Qp0/1ME7HFU0TuTlGrMlGHlH0J5mDLQLBNeoN3DUkMb EVX4TRUeY5rCLxlgs67rE2ShWhEB6TMMZAwQM= - 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 <tsiegel@mac-access.net> 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com