Re: Detect Intel System?
Re: Detect Intel System?
- Subject: Re: Detect Intel System?
- From: François Revol <email@hidden>
- Date: Thu, 5 Aug 2010 23:59:01 +0200
Le 5 août 2010 à 23:51, Shantonu Sen a écrit :
> What does UNIX have to do with Mac OS X (No, really?)
I certainly don't claim OSX to be a UNIX, despite what Apple says, it doesn't fit my definition. :P
I should have said "the most portable way is", since it's also valid on Haiku which isn't a UNIX by ten foot...
> uname -m (or uname(3)) will return either "x86_64" or "i386" depending on OS version, kernel type, etc., and may even return "Power Macintosh" if run on an Intel system but under Rosetta.
Well, that's the purpose of emulation, it emulates...
One can also use $MACHTYPE in bash, which here is set to x86_64-apple-darwin10.0 whereas uname -m gives i386. This is because it's compiled into bash itself as a constant string AFAIK.
But it's probably even more fragile, and bash-specific.
François. _______________________________________________
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