|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This is the preinclude file for SYMPORT |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedAll |
|
21 @released |
|
22 */ |
|
23 |
|
24 // compiler and STLport things first |
|
25 #define _STLP_THREADS |
|
26 #define _STLP_DESIGNATED_DLL |
|
27 |
|
28 // Pick up relevant macros under __GCC32__, since __GCC32__ is not a valid macro for TOOLS2 |
|
29 |
|
30 #define __NO_CLASS_CONSTS__ |
|
31 #define __NORETURN__ __attribute__ ((noreturn)) |
|
32 |
|
33 #ifdef __GCCV3__ |
|
34 #define __NORETURN_TERMINATOR() |
|
35 #else |
|
36 #define __NORETURN_TERMINATOR() abort() |
|
37 #endif |
|
38 |
|
39 #define IMPORT_C |
|
40 #define IMPORT_D |
|
41 #ifdef _WIN32 |
|
42 #define EXPORT_C __declspec(dllexport) |
|
43 #define EXPORT_D __declspec(dllexport) |
|
44 #else |
|
45 #define EXPORT_C |
|
46 #define EXPORT_D |
|
47 #endif |
|
48 |
|
49 #define NONSHARABLE_CLASS(x) class x |
|
50 #define NONSHARABLE_STRUCT(x) struct x |
|
51 |
|
52 #ifndef __TOOLS2__ |
|
53 #define __NO_THROW |
|
54 #else |
|
55 #include <new> |
|
56 #ifndef _WIN32 |
|
57 #include <exception> |
|
58 #endif |
|
59 #define __NO_THROW throw(std::bad_alloc) |
|
60 #endif |
|
61 |
|
62 typedef long long Int64; |
|
63 typedef unsigned long long Uint64; |
|
64 #define I64LIT(x) x##LL |
|
65 #define UI64LIT(x) x##ULL |
|
66 #define TEMPLATE_SPECIALIZATION template<> |
|
67 #define __TText_defined |
|
68 #ifdef __TOOLS2__ |
|
69 #ifndef _WIN32 |
|
70 #include <stddef.h> // Linux definition of wchar_t |
|
71 #endif |
|
72 #endif |
|
73 |
|
74 typedef wchar_t __TText; |
|
75 |
|
76 // Symbian things next /////////////////////////////////////////////////////// |
|
77 |
|
78 #ifdef __PRODUCT_INCLUDE__ |
|
79 #include __PRODUCT_INCLUDE__ |
|
80 #endif |
|
81 |
|
82 // Do not use inline new in e32cmn.h |
|
83 #define __PLACEMENT_NEW_INLINE |
|
84 #define __PLACEMENT_VEC_NEW_INLINE |
|
85 // avoid e32tools/filesystem/include/mingw.inl nonsense |
|
86 #ifdef _WIN32 |
|
87 #define _MINGW_INL |
|
88 #endif |
|
89 |
|
90 // Varargs |
|
91 typedef __builtin_va_list va_list; |
|
92 #define va_start(v, l) __builtin_va_start(v, l) |
|
93 #define va_arg(v, l) __builtin_va_arg(v, l) |
|
94 #define va_end(v) __builtin_va_end(v) |
|
95 #define VA_LIST va_list |
|
96 #define _VA_LIST_DEFINED //To deal with stdarg.h |
|
97 #define __VA_LIST_defined //To deal with e32def.h |
|
98 #define VA_START(ap,pn) va_start(ap, pn) |
|
99 #define VA_ARG(ap,type) va_arg(ap,type) |
|
100 #define VA_END(ap) va_end(ap) |
|
101 |
|
102 #ifdef __TOOLS2__ |
|
103 #ifndef _WIN32 |
|
104 #define asm(EXPR) __asm(".intel_syntax noprefix\n\t" EXPR) |
|
105 #else |
|
106 #define asm __asm |
|
107 #endif |
|
108 #endif |
|
109 |
|
110 |
|
111 // the end of the pre-include |
|
112 |