+ (void)executeCodeForOSVersion:(void (^)(SInt32 aMajor, SInt32 aMinor, SInt32 aBugFix))aCodeBlockName { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" SInt32 theMajor, theMinor, theBugFix; Gestalt(gestaltSystemVersionMajor, &theMajor); Gestalt(gestaltSystemVersionMinor, &theMinor); Gestalt(gestaltSystemVersionBugFix, &theBugFix); #pragma GCC diagnostic pop aCodeBlockName(theMajor, theMinor, theBugFix); }