|
1 /* |
|
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * e32\compsupp\rvct2_0\rvct2_0.h |
|
16 * This is the preinclude file for the rvct 2.0 compiler |
|
17 * It contains all the compiler specific definitions required by the SOS source |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 #if defined(__PRODUCT_INCLUDE__) |
|
24 #include __PRODUCT_INCLUDE__ |
|
25 #endif |
|
26 |
|
27 |
|
28 // stuff from e32def.h |
|
29 /** |
|
30 @publishedAll |
|
31 @released |
|
32 */ |
|
33 #define __NO_CLASS_CONSTS__ |
|
34 |
|
35 /** |
|
36 @publishedAll |
|
37 @released |
|
38 */ |
|
39 #define __NORETURN__ |
|
40 |
|
41 /** |
|
42 @publishedAll |
|
43 @released |
|
44 */ |
|
45 #define __NORETURN_TERMINATOR() |
|
46 |
|
47 /** |
|
48 @publishedAll |
|
49 @released |
|
50 */ |
|
51 #define IMPORT_C __declspec(dllimport) |
|
52 |
|
53 /** |
|
54 @publishedAll |
|
55 @released |
|
56 */ |
|
57 #define EXPORT_C __declspec(dllexport) |
|
58 |
|
59 /** |
|
60 @publishedAll |
|
61 @released |
|
62 */ |
|
63 #define IMPORT_VT __declspec(dllimport) |
|
64 |
|
65 /** |
|
66 @publishedAll |
|
67 @released |
|
68 */ |
|
69 #define __NO_THROW throw () |
|
70 |
|
71 /** |
|
72 @publishedAll |
|
73 @released |
|
74 */ |
|
75 #define __THROW(t) throw (t) |
|
76 |
|
77 /** |
|
78 @publishedAll |
|
79 @released |
|
80 */ |
|
81 #define TEMPLATE_SPECIALIZATION template<> |
|
82 |
|
83 #ifndef __int64 |
|
84 /** |
|
85 @internalComponent |
|
86 */ |
|
87 #define __int64 long long |
|
88 #endif |
|
89 |
|
90 /** |
|
91 @internalComponent |
|
92 */ |
|
93 #define __VALUE_IN_REGS__ __value_in_regs |
|
94 |
|
95 /** |
|
96 @publishedAll |
|
97 @released |
|
98 */ |
|
99 #define I64LIT(x) x##LL |
|
100 |
|
101 /** |
|
102 @publishedAll |
|
103 @released |
|
104 */ |
|
105 #define UI64LIT(x) x##ULL |
|
106 |
|
107 // __TText from e32cmn.h also e32des16.h |
|
108 #ifdef __cplusplus |
|
109 /** |
|
110 @internalComponent |
|
111 */ |
|
112 typedef wchar_t __TText; // Only ISO C++ has wchar_t as a primitive type |
|
113 |
|
114 /** |
|
115 @internalComponent |
|
116 */ |
|
117 #define __wchar_t_defined |
|
118 #else |
|
119 /** |
|
120 @internalComponent |
|
121 */ |
|
122 typedef unsigned short __TText; |
|
123 #endif |
|
124 |
|
125 /** |
|
126 @internalComponent |
|
127 */ |
|
128 #define __TText_defined |
|
129 |
|
130 // __NAKED__ from cpudefs.h |
|
131 /** |
|
132 @publishedAll |
|
133 @released |
|
134 */ |
|
135 #define __NAKED__ __asm |
|
136 |
|
137 /** |
|
138 @internalComponent |
|
139 */ |
|
140 #define ____ONLY_USE_NAKED_IN_CIA____ __asm |
|
141 |
|
142 // Int64 and Uint64 from nkern\nklib.h |
|
143 /** |
|
144 @publishedAll |
|
145 @released |
|
146 */ |
|
147 typedef long long Int64; |
|
148 |
|
149 /** |
|
150 @publishedAll |
|
151 @released |
|
152 */ |
|
153 typedef unsigned long long Uint64; |
|
154 |
|
155 // Here are RVCT 2.0's definitions for stdarg.h |
|
156 // These should be used by e.g. stdlib |
|
157 |
|
158 // see if we're using the BETA B compiler |
|
159 #if (__ARMCC_VERSION == 200022) |
|
160 #define RVCTBETA |
|
161 #endif |
|
162 |
|
163 #ifdef __cplusplus |
|
164 namespace std { |
|
165 extern "C" { |
|
166 #endif /* __cplusplus */ |
|
167 |
|
168 #ifdef RVCTBETA |
|
169 /** |
|
170 @internalComponent |
|
171 */ |
|
172 typedef int *va_list[1]; |
|
173 #else |
|
174 /** |
|
175 @internalComponent |
|
176 */ |
|
177 typedef struct __va_list { void *__ap; } va_list; |
|
178 #endif |
|
179 |
|
180 #ifdef __cplusplus |
|
181 } /* extern "C" */ |
|
182 } /* namespace std */ |
|
183 |
|
184 using ::std::va_list; |
|
185 #endif |
|
186 |
|
187 /** |
|
188 @internalComponent |
|
189 */ |
|
190 #define va_start(ap, parmN) __va_start(ap, parmN) |
|
191 |
|
192 /** |
|
193 @internalComponent |
|
194 */ |
|
195 #define va_arg(ap, type) __va_arg(ap, type) |
|
196 |
|
197 /** |
|
198 @internalComponent |
|
199 */ |
|
200 #define va_end(ap) ((void)0) |
|
201 |
|
202 // These are for Symbian OS C++ code |
|
203 /** |
|
204 @publishedAll |
|
205 @released |
|
206 */ |
|
207 #define VA_START(ap,pn) va_start(ap, pn) |
|
208 |
|
209 /** |
|
210 @publishedAll |
|
211 @released |
|
212 */ |
|
213 #define VA_ARG(ap,type) va_arg(ap,type) |
|
214 |
|
215 /** |
|
216 @publishedAll |
|
217 @released |
|
218 */ |
|
219 #define VA_END(ap) va_end(ap) |
|
220 |
|
221 /** |
|
222 @publishedAll |
|
223 @released |
|
224 */ |
|
225 #define VA_LIST va_list |
|
226 |
|
227 /** |
|
228 @internalComponent |
|
229 */ |
|
230 #define __VA_LIST_defined |
|
231 // This should prevent /stdlib/linc/stdarg.h from doing damage. |
|
232 #define _STDARG_H |
|
233 |
|
234 // now deal with stdarg_e.h |
|
235 /** |
|
236 @internalComponent |
|
237 */ |
|
238 typedef va_list __e32_va_list; |
|
239 |
|
240 /** |
|
241 @internalComponent |
|
242 */ |
|
243 #define _STDARG_E_H |
|
244 |
|
245 // This is an EABI compliant compiler |
|
246 #ifndef __EABI__ |
|
247 /** |
|
248 @publishedAll |
|
249 @released |
|
250 */ |
|
251 #define __EABI__ |
|
252 #endif |
|
253 |
|
254 // these are hopefully temporary |
|
255 |
|
256 // defining this means we don't get __NAKED__ ctors |
|
257 #ifndef __EABI_CTORS__ |
|
258 /** |
|
259 @publishedAll |
|
260 @released |
|
261 */ |
|
262 #define __EABI_CTORS__ |
|
263 #endif |
|
264 |
|
265 //#define __EARLY_DEBUG__ |
|
266 |