diff options
author | rubidium <rubidium@openttd.org> | 2009-03-29 19:55:08 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-29 19:55:08 +0000 |
commit | 8293be426cc8e4c6b228f906d00838d02f6edd0a (patch) | |
tree | 416d2b6997d90c7f46c4891e99e681d33b3de66a /src/os/macosx/osx_stdafx.h | |
parent | c2ced41c044946dbc3dbfe0471816fc9d63401f1 (diff) | |
download | openttd-8293be426cc8e4c6b228f906d00838d02f6edd0a.tar.xz |
(svn r15892) -Codechange: [OSX] some type fixes so OpenTTD likes more of the 3.1.x Xcodes.
Diffstat (limited to 'src/os/macosx/osx_stdafx.h')
-rw-r--r-- | src/os/macosx/osx_stdafx.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h index e8589b61f..8faa26e5c 100644 --- a/src/os/macosx/osx_stdafx.h +++ b/src/os/macosx/osx_stdafx.h @@ -5,7 +5,18 @@ #ifndef MACOS_STDAFX_H #define MACOS_STDAFX_H +/* __LP64__ only exists in 10.5 and higher */ +#if defined(__APPLE__) && !defined(__LP64__) +# define __LP64__ 0 +#endif + +/* Check for mismatching 'architectures' */ +#if (__LP64__ && !defined(_SQ64)) || (!__LP64__ && defined(_SQ64)) +# error "Compiling 64 bits without _SQ64 set! (or vice versa)" +#endif + #include <CoreServices/CoreServices.h> + /* remove the variables that CoreServices defines, but we define ourselves too */ #undef bool #undef false @@ -16,4 +27,15 @@ #define SL_ERROR OSX_SL_ERROR +/* NSInteger and NSUInteger are part of 10.5 and higher. */ +#ifndef NSInteger +#if __LP64__ +typedef long NSInteger; +typedef unsigned long NSUInteger; +#else +typedef int NSInteger; +typedef unsigned int NSUInteger; +#endif /* __LP64__ */ +#endif /* NSInteger */ + #endif /* MACOS_STDAFX_H */ |