2006-02-12 15:31:33 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
2008-05-06 17:11:33 +02:00
|
|
|
/** @file osx_stdafx.h OSX is different on some places. */
|
|
|
|
|
2006-02-12 15:31:33 +01:00
|
|
|
#ifndef MACOS_STDAFX_H
|
|
|
|
#define MACOS_STDAFX_H
|
|
|
|
|
2009-07-14 19:16:32 +02:00
|
|
|
#define __STDC_LIMIT_MACROS
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2009-04-01 04:58:38 +02:00
|
|
|
/* 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>
|
2009-04-27 02:39:15 +02:00
|
|
|
#include <unistd.h>
|
2009-04-01 04:58:38 +02:00
|
|
|
|
2009-03-29 21:55:08 +02:00
|
|
|
/* __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
|
|
|
|
|
2009-07-14 18:43:45 +02:00
|
|
|
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3
|
|
|
|
#include <AvailabilityMacros.h>
|
|
|
|
|
|
|
|
/* Name conflict */
|
|
|
|
#define Rect OTTDRect
|
|
|
|
#define Point OTTDPoint
|
|
|
|
#define WindowClass OTTDWindowClass
|
|
|
|
|
2006-02-12 15:31:33 +01:00
|
|
|
#include <CoreServices/CoreServices.h>
|
2009-03-29 21:55:08 +02:00
|
|
|
|
2009-07-14 18:43:45 +02:00
|
|
|
#undef Rect
|
|
|
|
#undef Point
|
|
|
|
#undef WindowClass
|
|
|
|
|
2009-03-15 01:32:18 +01:00
|
|
|
/* remove the variables that CoreServices defines, but we define ourselves too */
|
2006-02-12 15:31:33 +01:00
|
|
|
#undef bool
|
|
|
|
#undef false
|
|
|
|
#undef true
|
|
|
|
|
|
|
|
/* Name conflict */
|
2009-07-14 18:43:45 +02:00
|
|
|
#define GetTime OTTD_GetTime
|
2006-02-12 15:31:33 +01:00
|
|
|
|
|
|
|
#define SL_ERROR OSX_SL_ERROR
|
|
|
|
|
2009-03-29 21:55:08 +02:00
|
|
|
/* 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 */
|
|
|
|
|
2006-02-12 15:31:33 +01:00
|
|
|
#endif /* MACOS_STDAFX_H */
|