|
1 /* |
|
2 * Copyright (c) 1997-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 * To get a strict ANSI C environment, define macro _STRICT_ANSI. This will |
|
16 * "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header |
|
17 * files aren't affected). |
|
18 * |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @file |
|
26 @publishedAll |
|
27 @released |
|
28 */ |
|
29 |
|
30 #ifndef _ANSIDECL_H_ |
|
31 #define _ANSIDECL_H_ |
|
32 |
|
33 /** |
|
34 Epoc32 STDLIB is an ANSI environment and expects an ANSI C compiler |
|
35 MSVC is however an environment which doesn't define __STDC__, so |
|
36 we fix it up in here... |
|
37 */ |
|
38 |
|
39 #ifndef __STDC__ |
|
40 #define __STDC__ 1 |
|
41 #endif |
|
42 |
|
43 #define _STRICT_ANSI |
|
44 |
|
45 /** |
|
46 From GCC 2.5 onwards it is possible to tell the compiler that functions |
|
47 don't return, which would stop some warnings while building STDLIB |
|
48 */ |
|
49 #if 0 |
|
50 #define _ATTRIBUTE(attrs) __attribute__ (attrs) |
|
51 #else |
|
52 #define _ATTRIBUTE(attrs) |
|
53 #endif |
|
54 |
|
55 #ifndef EXPORT_C |
|
56 /** |
|
57 It is needed to annotate the functions which will be exported from the ESTLIB DLL, |
|
58 but mustn't conflict with the definitions in <e32std.h> |
|
59 */ |
|
60 #ifdef __VC32__ |
|
61 #define IMPORT_C __declspec(dllexport) |
|
62 #define EXPORT_C __declspec(dllexport) |
|
63 #endif |
|
64 |
|
65 #ifdef __CW32__ |
|
66 #define IMPORT_C __declspec(dllexport) |
|
67 #define EXPORT_C __declspec(dllexport) |
|
68 #endif |
|
69 |
|
70 #ifdef __GCC32__ |
|
71 #define IMPORT_C |
|
72 #define EXPORT_C __declspec(dllexport) |
|
73 #endif |
|
74 |
|
75 #ifdef __GCCE__ |
|
76 #define IMPORT_C __declspec(dllimport) |
|
77 #define EXPORT_C __declspec(dllexport) |
|
78 #endif |
|
79 |
|
80 #endif /* EXPORT_C */ |
|
81 #endif /* _ANSIDECL_H_ */ |