diff options
author | planetmaker <planetmaker@openttd.org> | 2014-07-30 20:19:29 +0000 |
---|---|---|
committer | planetmaker <planetmaker@openttd.org> | 2014-07-30 20:19:29 +0000 |
commit | bcb9c64ac850cc7bb145641b707d334bb982a5b2 (patch) | |
tree | fa073efa7cc0362071841aa6c830189fc852ce72 /src/os | |
parent | 8fa42362e984b1dbfb911b78543afc512c9863ea (diff) | |
download | openttd-bcb9c64ac850cc7bb145641b707d334bb982a5b2.tar.xz |
(svn r26709) -Fix (r15892 and others) [FS#6069]: [OSX] Compilation fails with some lzo2 versions if we define __LP64__ as 0 instead of checking whether it is defined (kernigh2)
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/macosx/crashlog_osx.cpp | 2 | ||||
-rw-r--r-- | src/os/macosx/osx_stdafx.h | 16 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/os/macosx/crashlog_osx.cpp b/src/os/macosx/crashlog_osx.cpp index 05816c67e..ad258bbc9 100644 --- a/src/os/macosx/crashlog_osx.cpp +++ b/src/os/macosx/crashlog_osx.cpp @@ -33,7 +33,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" diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h index cd30f372e..35b3f434a 100644 --- a/src/os/macosx/osx_stdafx.h +++ b/src/os/macosx/osx_stdafx.h @@ -46,24 +46,14 @@ #define __STDC_LIMIT_MACROS #include <stdint.h> -/* 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 <sys/cdefs.h> -#include <unistd.h> - /* 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 <debug/debug.h> #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; |