Add missing defines to Tiger

CGFloat and NS[U]Integer were introduced in 10.5, make sure they are
defined when compiling for 10.4.
This commit is contained in:
Bjorn Winckler
2009-09-30 23:04:12 +02:00
parent b712dd06eb
commit ac4412ace2
5 changed files with 28 additions and 16 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
* See README.txt for an overview of the Vim source code.
*/
#import <Cocoa/Cocoa.h>
#import "MacVim.h"
#define MM_USE_ROW_CACHE 1
+1 -1
View File
@@ -8,7 +8,7 @@
* See README.txt for an overview of the Vim source code.
*/
#import <Cocoa/Cocoa.h>
#import "MacVim.h"
-12
View File
@@ -99,18 +99,6 @@
@interface NSWindow (NSLeopardOnly)
// Note: These functions are Leopard-only, use -[NSObject respondsToSelector:]
// before calling them to make sure everything works on Tiger too.
#ifndef CGFLOAT_DEFINED
// On Leopard, CGFloat is float on 32bit and double on 64bit. On Tiger,
// we can't use this anyways, so it's just here to keep the compiler happy.
// However, when we're compiling for Tiger and running on Leopard, we
// might need the correct typedef, so this piece is copied from ATSTypes.h
# ifdef __LP64__
typedef double CGFloat;
# else
typedef float CGFloat;
# endif
#endif
- (void)setAutorecalculatesContentBorderThickness:(BOOL)b forEdge:(NSRectEdge)e;
- (void)setContentBorderThickness:(CGFloat)b forEdge:(NSRectEdge)e;
@end
+14 -2
View File
@@ -31,7 +31,6 @@
#endif
//
// This is the protocol MMBackend implements.
//
@@ -298,7 +297,7 @@ extern NSString *VimPBoardType;
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
#ifndef NSINTEGER_DEFINED
// NSInteger was introduced in 10.5
# if __LP64__ || NS_BUILD_32_LIKE_64
typedef long NSInteger;
@@ -307,12 +306,25 @@ typedef unsigned long NSUInteger;
typedef int NSInteger;
typedef unsigned int NSUInteger;
# endif
# define NSINTEGER_DEFINED 1
#endif
#ifndef NSAppKitVersionNumber10_4 // Needed for pre-10.5 SDK
# define NSAppKitVersionNumber10_4 824
#endif
#ifndef CGFLOAT_DEFINED
// On Leopard, CGFloat is float on 32bit and double on 64bit. On Tiger,
// we can't use this anyways, so it's just here to keep the compiler happy.
// However, when we're compiling for Tiger and running on Leopard, we
// might need the correct typedef, so this piece is copied from ATSTypes.h
# ifdef __LP64__
typedef double CGFloat;
# else
typedef float CGFloat;
# endif
#endif
// Logging related functions and macros.
//
@@ -12,6 +12,18 @@
#import <Cocoa/Cocoa.h>
#ifndef NSINTEGER_DEFINED
// NSInteger was introduced in 10.5
# if __LP64__ || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
# else
typedef int NSInteger;
typedef unsigned int NSUInteger;
# endif
# define NSINTEGER_DEFINED 1
#endif
#define kPSMTabBarControlHeight 22
// internal cell border
#define MARGIN_X 6