osx: Make OSX version checks more consistent

And especially also consider update versions, e.g. 10.5 with updates
will be 1051 or similar and thus bigger than MAC_OS_X_VERSION_10_5 but
still won't have the API we want to use.
This commit is contained in:
Sebastian Dröge 2013-12-31 10:10:05 +01:00
parent 3d163680f0
commit 5b1c0a4cfd
3 changed files with 5 additions and 5 deletions

View file

@ -34,7 +34,7 @@
#else #else
#include <CoreAudio/CoreAudio.h> #include <CoreAudio/CoreAudio.h>
#include <AudioToolbox/AudioToolbox.h> #include <AudioToolbox/AudioToolbox.h>
#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
#include <CoreServices/CoreServices.h> #include <CoreServices/CoreServices.h>
#define AudioComponentFindNext FindNextComponent #define AudioComponentFindNext FindNextComponent
#define AudioComponentInstanceNew OpenAComponent #define AudioComponentInstanceNew OpenAComponent

View file

@ -41,7 +41,7 @@
/* Debugging category */ /* Debugging category */
#include <gst/gstinfo.h> #include <gst/gstinfo.h>
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 #if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
#define kVK_ANSI_Keypad0 0x52 #define kVK_ANSI_Keypad0 0x52
#define kVK_ANSI_Keypad1 0x53 #define kVK_ANSI_Keypad1 0x53
#define kVK_ANSI_Keypad2 0x54 #define kVK_ANSI_Keypad2 0x54
@ -87,7 +87,7 @@
#define kVK_Shift 0x38 #define kVK_Shift 0x38
#define kVK_Tab 0x30 #define kVK_Tab 0x30
#define kVK_UpArrow 0x7e #define kVK_UpArrow 0x7e
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 */ #endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1050 */
static static
const gchar* gst_keycode_to_keyname(gint16 keycode) const gchar* gst_keycode_to_keyname(gint16 keycode)

View file

@ -106,7 +106,7 @@ struct _GstOSXVideoSinkClass {
GType gst_osx_video_sink_get_type(void); GType gst_osx_video_sink_get_type(void);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
@interface NSApplication(AppleMenu) @interface NSApplication(AppleMenu)
- (void)setAppleMenu:(NSMenu *)menu; - (void)setAppleMenu:(NSMenu *)menu;
@end @end
@ -122,7 +122,7 @@ GType gst_osx_video_sink_get_type(void);
@end @end
#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
@interface GstWindowDelegate : NSObject @interface GstWindowDelegate : NSObject
#else #else
@interface GstWindowDelegate : NSObject <NSWindowDelegate> @interface GstWindowDelegate : NSObject <NSWindowDelegate>