http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51906
--- Comment #39 from Iain Sandoe <iains at gcc dot gnu.org> 2012-02-03 08:22:56 UTC --- (In reply to comment #37) > (In reply to comment #36) > You would probably have to use Availability.h and something like... This is not required, (and likely undesirable). Use the " __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__" macro - which is provided by GCC and clang for all versions that produce OSX code (I would imagine that any compiler would need to implement it - since the system headers depend on it heavily). thus: #if defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \ && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070) \ /* && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < fixed-version) */ ... code for buggy Lion ... #else ... the rest #endif