OSDN Git Service

2010-03-25 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc-obj-c++-shared / next-abi.h
1
2 #ifndef _OBJC_NEXT_ABI_H_
3 #define _OBJC_NEXT_ABI_H_
4 /* Produce a define that allows us to figure out what facilities are
5    available for this gcc and OS combination.
6 */
7
8 /* By default we do nothing - therefore ifdef NEXT_OBJC_USE_NEW_INTERFACE
9  * is reliable for detecting 
10  *  (a) versions of the compiler that are transitional to the new next ABI
11  *  (b) versions of the target that require the new ABI.
12  *
13  * This applies for versions of OSX >= 10.5 (darwin9).
14  *
15  * A compiler capable of producing ObjC V2 ABI should define __OBJC2__
16 */
17
18 #undef NEXT_OBJC_ABI_VERSION
19 #undef NEXT_OBJC_USE_NEW_INTERFACE
20
21 #ifdef __NEXT_RUNTIME__
22 #  if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 || __OBJC2__)
23     /* We have to use an updated interface for 32bit NeXT to avoid
24      * 'deprecated' warnings. 
25      * For 64bit NeXT the ABI is different (and the interfaces 'deprecated'
26      * for 32bit have been removed).
27     */
28 #    define NEXT_OBJC_USE_NEW_INTERFACE 1
29 #    if __OBJC2__ || __LP64__
30        /* We have OBJC v2 ABI compiler, 
31           (or, at least, the available NeXT runtime requires one) */
32 #      define NEXT_OBJC_ABI_VERSION 2
33 #    else
34        /* We leave it open to define ABI 1 if and when we implement those 
35         * extensions.
36        */
37 #      define NEXT_OBJC_ABI_VERSION 0
38 #    endif
39 #  endif
40 #endif
41
42 #endif /* _OBJC_NEXT_ABI_H_ */