charon-core  0.3.1
DllEx.h
Go to the documentation of this file.
1 /* This file is part of Charon.
2 
3  Charon is free software: you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as published by
5  the Free Software Foundation, either version 3 of the License, or
6  (at your option) any later version.
7 
8  Charon is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU Lesser General Public License for more details.
12 
13  You should have received a copy of the GNU Lesser General Public License
14  along with Charon. If not, see <http://www.gnu.org/licenses/>.
15 */
51 #ifndef _CHARON_DLL_EX_H_
52 #define _CHARON_DLL_EX_H_
53 
54 #ifdef _MSC_VER // MSVC
55  #define charon_core_PUBLIC
56  #ifdef charon_core_EXPORTS
57  #define charon_core_DLL_PUBLIC __declspec(dllexport)
58  #else
59  #define charon_core_DLL_PUBLIC __declspec(dllimport)
60  #endif
61  #ifdef charon_plugins_EXPORTS
62  #define charon_plugins_DLL_PUBLIC __declspec(dllexport)
63  #else
64  #define charon_plugins_DLL_PUBLIC __declspec(dllimport)
65  #endif
66  #ifdef charon_groups_EXPORTS
67  #define charon_groups_DLL_PUBLIC __declspec(dllexport)
68  #else
69  #define charon_groups_DLL_PUBLIC __declspec(dllimport)
70  #endif
71  #define charon_core_LOCAL
72  #define charon_DEPRECATED __declspec(deprecated)
73 #else // UNIX
74  #if __GNUC__ >= 4
75  #define charon_core_PUBLIC __attribute__ ((visibility ("default")))
76  #define charon_core_DLL_PUBLIC __attribute__ ((visibility ("default")))
77  #define charon_plugins_DLL_PUBLIC __attribute__ ((visibility ("default")))
78  #define charon_groups_DLL_PUBLIC __attribute__ ((visibility ("default")))
79  #define charon_core_LOCAL __attribute__ ((visibility ("hidden")))
80  #else
81  #define charon_core_PUBLIC
82  #define charon_core_DLL_PUBLIC
83  #define charon_plugins_DLL_PUBLIC
84  #define charon_groups_DLL_PUBLIC
85  #define charon_core_LOCAL
86  #endif
87  #define charon_DEPRECATED __attribute__((deprecated))
88 #endif
89 
90 #endif // _CHARON_DLL_EX_H_