[CocoaApp isThisTiger]
Alastair Houghton
alastair at alastairs-place.net
Tue Oct 23 10:15:48 PDT 2007
On 23 Oct 2007, at 17:49, Rosyna wrote:
> The manual page for sw_vers doesn't document it, it merely lists it.
Which documents its presence. Maybe not its contents, but certainly
its presence.
> And note that it lists two files. Both files may not exist on most
> systems.
That's true. ServerVersion.plist only exists on Mac OS X Server.
SystemVersion.plist exists on both though.
> Also, sw_vers has this fun little bug that may cause it to output
> complete garbage on some system configurations.
Nice. My point still stands though. The presence of this file is
documented. In Tiger, the fact that you could use it is documented
(in the docs for Gestalt(), no less). It isn't something that Apple
can freely remove without side effects, because they have made its
existence public and have, at one point, actively advocated using
it. Plus Gestalt() doesn't help you in all cases where this file might.
So, sure, you should use Gestalt() if that's what you need. But
before stating categorically that Gestalt() is the One True Way, it's
worth realising that not everybody's needs are the same and sometimes
that means doing something different.
Kind regards,
Alastair.
--
http://alastairs-place.net
More information about the MacOSX-dev
mailing list