Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2012-11-06 19:19:49 +0400
committerJens Verwiebe <info@jensverwiebe.de>2012-11-06 19:19:49 +0400
commitacc8c654fc83373b3ef98247cd3c2a1e1d23a168 (patch)
treeb5f6b7aedc067f4dee6aec8d4164e8b19a408a21
parent41bfb62b0fd72ebd0f3031a261711a00d5e8221b (diff)
OSX: substitute all MAC_OS_X_VERSION defines with MAC_OS_X_VERSION_MIN_REQUIRED macros, to get more reliable version (api) covering
-rw-r--r--extern/glew/src/glew.c4
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm2
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm12
-rw-r--r--intern/itasc/kdl/chain.hpp2
-rw-r--r--intern/itasc/kdl/tree.hpp4
-rw-r--r--source/blender/quicktime/quicktime_export.h2
6 files changed, 13 insertions, 13 deletions
diff --git a/extern/glew/src/glew.c b/extern/glew/src/glew.c
index 5d886ce7807..833d3999268 100644
--- a/extern/glew/src/glew.c
+++ b/extern/glew/src/glew.c
@@ -93,7 +93,7 @@ void* dlGetProcAddress (const GLubyte* name)
#include <string.h>
#include <AvailabilityMacros.h>
-#ifdef MAC_OS_X_VERSION_10_3
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
#include <dlfcn.h>
@@ -142,7 +142,7 @@ void* NSGLGetProcAddress (const GLubyte *name)
return NULL;
#endif
}
-#endif /* MAC_OS_X_VERSION_10_3 */
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED */
#endif /* __APPLE__ */
/*
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 27720a01a3f..86edbb95e30 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -423,7 +423,7 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction)
#pragma mark defines for 10.6 api not documented in 10.5
-#ifndef MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
enum {
/* The following event types are available on some hardware on 10.5.2 and later */
NSEventTypeGesture = 29,
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 23eefe17959..01705fe8f7b 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -28,7 +28,7 @@
#include <Cocoa/Cocoa.h>
-#ifndef MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
//Use of the SetSystemUIMode function (64bit compatible)
#include <Carbon/Carbon.h>
#endif
@@ -58,7 +58,7 @@ extern "C" {
extern void wm_draw_update(bContext *C);
};*/
@interface CocoaWindowDelegate : NSObject
-#ifdef MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
<NSWindowDelegate>
#endif
{
@@ -115,12 +115,12 @@ extern "C" {
- (void)windowDidResize:(NSNotification *)notification
{
-#ifdef MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
//if (![[notification object] inLiveResize]) {
//Send event only once, at end of resize operation (when user has released mouse button)
#endif
systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow);
-#ifdef MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
//}
#endif
/* Live resize ugly patch. Needed because live resize runs in a modal loop, not letting main loop run
@@ -913,7 +913,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
* doesn't know view/window difference. */
m_fullScreen = true;
-#ifdef MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
//10.6 provides Cocoa functions to autoshow menu bar, and to change a window style
//Hide menu & dock if needed
if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]]) {
@@ -972,7 +972,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
m_fullScreen = false;
//Exit fullscreen
-#ifdef MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
//Show again menu & dock if needed
if ([[m_window screen] isEqual:[NSScreen mainScreen]]) {
[NSApp setPresentationOptions:NSApplicationPresentationDefault];
diff --git a/intern/itasc/kdl/chain.hpp b/intern/itasc/kdl/chain.hpp
index 773f472cc5c..bc9061e232f 100644
--- a/intern/itasc/kdl/chain.hpp
+++ b/intern/itasc/kdl/chain.hpp
@@ -35,7 +35,7 @@ namespace KDL {
*/
class Chain {
private:
-#if !defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_5)
+#if !defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
// Eigen allocator is needed for alignment of Eigen data types
std::vector<Segment, Eigen::aligned_allocator<Segment> > segments;
#else
diff --git a/intern/itasc/kdl/tree.hpp b/intern/itasc/kdl/tree.hpp
index 08c1aadc6de..afa56c820d9 100644
--- a/intern/itasc/kdl/tree.hpp
+++ b/intern/itasc/kdl/tree.hpp
@@ -27,7 +27,7 @@
#include <string>
#include <map>
-#if !defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_5)
+#if !defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
#include <Eigen/Core>
#endif
@@ -35,7 +35,7 @@ namespace KDL
{
//Forward declaration
class TreeElement;
-#if !defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_5)
+#if !defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
// Eigen allocator is needed for alignment of Eigen data types
typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<std::string, TreeElement> > > SegmentMap;
#else
diff --git a/source/blender/quicktime/quicktime_export.h b/source/blender/quicktime/quicktime_export.h
index cef4cb8c2a6..a93f49207e6 100644
--- a/source/blender/quicktime/quicktime_export.h
+++ b/source/blender/quicktime/quicktime_export.h
@@ -87,7 +87,7 @@ void makeqtstring(struct RenderData *rd, char *string); //for playanim.c
-#if (defined(USE_QTKIT) && defined(MAC_OS_X_VERSION_10_6) && __LP64__)
+#if (defined(USE_QTKIT) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 && __LP64__)
//Include the quicktime codec types constants that are missing in QTKitDefines.h in 10.6 / 64bit
enum {
kRawCodecType = 'raw ',