site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com 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 (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
participants (1)
-
François Revol