--- FL/mac.H.orig +++ FL/mac.H @@ -70,6 +70,22 @@ #ifndef MAC_OS_X_VERSION_10_10 #define MAC_OS_X_VERSION_10_10 101000 #endif +#ifndef MAC_OS_X_VERSION_10_11 +#define MAC_OS_X_VERSION_10_11 101100 +#endif + +#ifdef __OBJC__ +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10 +#include +#else +#include +#endif + +#ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h +#error "NSINTEGER_DEFINED not defined" +#endif + +#endif #ifdef __OBJC__ @class NSCursor; @@ -91,11 +107,7 @@ struct XPoint { int x, y; }; struct XRectangle {int x, y, width, height;}; #ifndef CGFLOAT_DEFINED //appears with 10.5 in CGBase.h -#if defined(__LP64__) && __LP64__ -typedef double CGFloat; -#else -typedef float CGFloat; -#endif +#error "CGFLOAT_DEFINED not defined" #endif // CGFLOAT_DEFINED extern CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h); --- src/Fl_Quartz_Printer.mm.orig +++ src/Fl_Quartz_Printer.mm @@ -87,7 +87,7 @@ int Fl_System_Printer::start_job (int pagecount, int *frompage, int *topage) else #endif { -#if !__LP64__ +#if !__LP64__ && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) Boolean accepted; status = PMCreateSession(&printSession); if (status != noErr) return 1; --- src/fl_font_mac.cxx.orig +++ src/fl_font_mac.cxx @@ -86,7 +86,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) { } else { #endif -#if ! __LP64__ +#if (! __LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) OSStatus err; // fill our structure with a few default values ascent = Size*3/4.; @@ -363,7 +363,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) { return retval; } else { #endif -#if ! __LP64__ +#if (! __LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) OSStatus err; Fixed bBefore, bAfter, bAscent, bDescent; ATSUTextLayout layout; @@ -441,7 +441,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) { } else { #endif -#if ! __LP64__ +#if (! __LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) OSStatus err; ATSUTextLayout layout; ByteCount iSize; @@ -509,7 +509,7 @@ static void fl_mac_draw(const char *str, int n, float x, float y, Fl_Graphics_Dr CFRelease(ctline); } else { #endif -#if ! __LP64__ +#if (! __LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) OSStatus err; // now collect our ATSU resources ATSUTextLayout layout = driver->font_descriptor()->layout; --- src/fl_set_fonts_mac.cxx.orig +++ src/fl_set_fonts_mac.cxx @@ -136,7 +136,7 @@ if(fl_mac_os_version >= Fl_X::CoreText_threshold) { } else { #endif -#if ! __LP64__ +#if (! __LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) ItemCount oFontCount, oCountAgain; ATSUFontID *oFontIDs; // How many fonts?