#ifndef MAC_OS_X_VERSION_10_10
#define MAC_OS_X_VERSION_10_10 101000
+#ifndef MAC_OS_X_VERSION_10_11
+#define MAC_OS_X_VERSION_10_11 101100
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
+#include <objc/NSObjCRuntime.h>
+#include <Foundation/NSObjCRuntime.h>
+#ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h
+#error "NSINTEGER_DEFINED not defined"
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__
+#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)
+#if !__LP64__ && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
status = PMCreateSession(&printSession);
if (status != noErr) return 1;
--- src/fl_font_mac.cxx.orig
@@ -86,7 +86,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
+#if (! __LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
// fill our structure with a few default values
@@ -363,7 +363,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
+#if (! __LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
Fixed bBefore, bAfter, bAscent, bDescent;
@@ -441,7 +441,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
+#if (! __LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
@@ -509,7 +509,7 @@ static void fl_mac_draw(const char *str, int n, float x, float y, Fl_Graphics_Dr
+#if (! __LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
// 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) {