fix conditional macros used to set include file names for Mavericks+later vs. earlier OS X.

Apple's doc suggests using numerical values (e.g. 1090) rather than MAC_OS_X_VERSION_10_N because the symbol
may not be defined on earlier versions, causing the macro to work in odd ways. This is indeed what was
happening, so MAC_OS_X_VERSION_10_9 has been replaced with 1090 to allow building on earlier OS X systems.
This commit is contained in:
Paul Davis 2014-09-03 09:34:39 -04:00
parent 0160a96ee0
commit a791cc5bf3
2 changed files with 5 additions and 4 deletions

View file

@ -25,7 +25,7 @@
/* an awful hack to stop Carbon #defines from messing with other code /* an awful hack to stop Carbon #defines from messing with other code
*/ */
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#include "MacTypes.h" #include "MacTypes.h"
#else #else
#include "/System/Library/Frameworks/CoreServices.framework/Headers/../Frameworks/CarbonCore.framework/Headers/MacTypes.h" #include "/System/Library/Frameworks/CoreServices.framework/Headers/../Frameworks/CarbonCore.framework/Headers/MacTypes.h"
@ -36,6 +36,7 @@
#undef Yes #undef Yes
#undef No #undef No
#undef nil #undef nil
#endif #endif
#endif #endif

View file

@ -65,10 +65,10 @@
// Include the regular ConditionalMacros.h too, since it has useful stuff that // Include the regular ConditionalMacros.h too, since it has useful stuff that
// TargetConditionals.h lacks for some reason. // TargetConditionals.h lacks for some reason.
#if CoreAudio_Use_Framework_Includes && !(MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9) #if CoreAudio_Use_Framework_Includes && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)
#include <CoreServices/../Frameworks/CarbonCore.framework/Headers/ConditionalMacros.h> #include "ConditionalMa243cros.h"
#else #else
#include "ConditionalMacros.h" #include <CoreServices/../Frameworks/CarbonCore.framework/Headers/ConditionalMacros.h>
#endif #endif
#endif #endif