--- src/fontdetection.cpp.orig 2014-06-02 18:26:49.000000000 +0000 +++ src/fontdetection.cpp @@ -392,7 +392,7 @@ FT_Error GetFontByFaceName(const char *f } else #endif { -#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) && !__LP64__ +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) && !defined(__LP64__) /* This type was introduced with the 10.5 SDK. */ #if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) #define ATSFSSpec FSSpec --- src/os/macosx/crashlog_osx.cpp.orig 2014-06-02 18:26:21.000000000 +0000 +++ src/os/macosx/crashlog_osx.cpp @@ -31,7 +31,7 @@ #endif /* printf format specification for 32/64-bit addresses. */ -#if __LP64__ +#ifdef __LP64__ #define PRINTF_PTR "0x%016lx" #else #define PRINTF_PTR "0x%08lx" --- src/os/macosx/osx_stdafx.h.orig 2014-06-02 18:26:21.000000000 +0000 +++ src/os/macosx/osx_stdafx.h @@ -46,24 +46,14 @@ #define __STDC_LIMIT_MACROS #include -/* We need to include this first as that "depends" on the compiler's setting - * of __LP64__. So before we define __LP64__ so it can be used. */ -#include -#include - /* Some gcc versions include assert.h via this header. As this would interfere * with our own assert redefinition, include this header first. */ #if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) # include #endif -/* __LP64__ only exists in 10.5 and higher */ -#if defined(__APPLE__) && !defined(__LP64__) -# define __LP64__ 0 -#endif - /* Check for mismatching 'architectures' */ -#if !defined(STRGEN) && !defined(SETTINGSGEN) && ((__LP64__ && !defined(_SQ64)) || (!__LP64__ && defined(_SQ64))) +#if !defined(STRGEN) && !defined(SETTINGSGEN) && ((defined(__LP64__) && !defined(_SQ64)) || (!defined(__LP64__) && defined(_SQ64))) # error "Compiling 64 bits without _SQ64 set! (or vice versa)" #endif @@ -99,7 +89,7 @@ /* NSInteger and NSUInteger are part of 10.5 and higher. */ #ifndef NSInteger -#if __LP64__ +#ifdef __LP64__ typedef long NSInteger; typedef unsigned long NSUInteger; #else @@ -109,7 +99,7 @@ typedef unsigned int NSUInteger; #endif /* NSInteger */ #ifndef CGFLOAT_DEFINED -#if __LP64__ +#ifdef __LP64__ typedef double CGFloat; #else typedef float CGFloat; --- src/video/cocoa/fullscreen.mm.orig 2014-06-02 18:26:07.000000000 +0000 +++ src/video/cocoa/fullscreen.mm @@ -70,7 +70,7 @@ struct OTTD_QuartzGammaTable { - (void) setFrame:(NSRect)frame { /* The 64 bits libraries don't seem to know about _frame, so this hack won't work. */ -#if !__LP64__ +#ifndef __LP64__ _frame = frame; #endif }