aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/objc-obj-c++-shared/objc-test-suite-types.h
blob: 34981edfc774bc68ebb479d6c10d3d6086681bbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* Define test-suite types to minimize conditional test-case source.
   Copyright (C) 2011 Free Software Foundation, Inc.
   Contributed by Iain Sandoe 

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */

#ifndef _OBJC_TEST_SUITE_TYPES_H_
#define _OBJC_TEST_SUITE_TYPES_H_

#ifndef __NEXT_RUNTIME__

/* dummy const string class ref. */
typedef void * TNS_STRING_REF_T;

#else /* NeXT */

#include "next-abi.h"
#ifdef NEXT_OBJC_USE_NEW_INTERFACE
#include <objc/runtime.h>
#else
#include <objc/objc-runtime.h>
#endif

/* Force a definition of nil that is compatible with GNU runtime.  */
#undef  nil
#define nil ((id)0)

#ifndef NULL
#define NULL 0
#endif

/* Where there are equivalent interfaces between APIs we substitute
   a macro or typedef.  */

#ifdef __OBJC2__
/* Const String Class ref.  */
typedef Class TNS_STRING_REF_T;
#else
/* Const String Class ref.  */
/* We need objc_class - but we don't need endless reminders that it's deprecated.  */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
typedef struct objc_class TNS_STRING_REF_T;
#pragma GCC diagnostic pop
#endif

#endif  /*__NEXT_RUNTIME__ */
#endif /* _OBJC_TEST_SUITE_TYPES_H_ */