1 /* Define test-suite types to minimize conditional test-case source.
2    Copyright (C) 2011 Free Software Foundation, Inc.
3    Contributed by Iain Sandoe
4 
5 This file is part of GCC.
6 
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11 
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3.  If not see
19 <http://www.gnu.org/licenses/>.  */
20 
21 #ifndef _OBJC_TEST_SUITE_TYPES_H_
22 #define _OBJC_TEST_SUITE_TYPES_H_
23 
24 #ifndef __NEXT_RUNTIME__
25 
26 /* dummy const string class ref. */
27 typedef void * TNS_STRING_REF_T;
28 
29 #else /* NeXT */
30 
31 #include "next-abi.h"
32 #ifdef NEXT_OBJC_USE_NEW_INTERFACE
33 #include <objc/runtime.h>
34 #else
35 #include <objc/objc-runtime.h>
36 #endif
37 
38 /* Force a definition of nil that is compatible with GNU runtime.  */
39 #undef  nil
40 #define nil ((id)0)
41 
42 #ifndef NULL
43 #define NULL 0
44 #endif
45 
46 /* Where there are equivalent interfaces between APIs we substitute
47    a macro or typedef.  */
48 
49 #ifdef __OBJC2__
50 /* Const String Class ref.  */
51 typedef Class TNS_STRING_REF_T;
52 #else
53 /* Const String Class ref.  */
54 /* We need objc_class - but we don't need endless reminders that it's deprecated.  */
55 #pragma GCC diagnostic push
56 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
57 typedef struct objc_class TNS_STRING_REF_T;
58 #pragma GCC diagnostic pop
59 #endif
60 
61 #endif  /*__NEXT_RUNTIME__ */
62 #endif /* _OBJC_TEST_SUITE_TYPES_H_ */
63