The Gestalt() function located in CarbonCore/OSUtils.h
has been deprecated as of OS X 10.8 Mountain Lion.
I often use this function to test the version of the OS X operating system at runtime (see the toy example below).
What other API could be used to check the OS X operating system version at runtime in a Cocoa application?
int main() {
SInt32 versMaj, versMin, versBugFix;
Gestalt(gestaltSystemVersionMajor, &versMaj);
Gestalt(gestaltSystemVersionMinor, &versMin);
Gestalt(gestaltSystemVersionBugFix, &versBugFix);
printf("OS X Version: %d.%d.%d\n", versMaj, versMin, versBugFix);
}