[Openmcl-devel] Determining OSX version at runtime

dherring at tentpost.com dherring at tentpost.com
Fri Aug 27 04:35:32 UTC 2010

> What's the correct way to determine the OSX version at runtime?
> Specifically, how do I make the behavior change if it's 10.6 or later?

I suspect this is the wrong question to be asking.  Are you really wanting
to print "10.5" or "10.6"?  Or are you asking because feature X is not
available on older versions?  Or does feature Y exist but crash
frequently?  Is feature Y's fix readily detectable?

Feature-specific tests that probe for functionality often perform better
than hard coded lookup tables of known configurations (that don't handle
unusual configurations and aren't updated in the future)...

- Daniel

More information about the Openmcl-devel mailing list