Orcus
env.hpp
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 */
7
8#ifndef __ORCUS_ENV_HPP__
9#define __ORCUS_ENV_HPP__
10
11// orcus
12
13#if defined _WIN32 || defined __CYGWIN__
14 #if defined __MINGW32__
15 #define ORCUS_DLLPUBLIC
16 #define ORCUS_DLLLOCAL
17 #elif defined __ORCUS_BUILDING_DLL
18 #ifdef __GNUC__
19 #define ORCUS_DLLPUBLIC __attribute__ ((dllexport))
20 #else
21 #define ORCUS_DLLPUBLIC __declspec(dllexport)
22 #endif
23 #elif defined __ORCUS_STATIC_LIB
24 #define ORCUS_DLLPUBLIC
25 #else
26 #ifdef __GNUC__
27 #define ORCUS_DLLPUBLIC __attribute__ ((dllimport))
28 #else
29 #define ORCUS_DLLPUBLIC __declspec(dllimport)
30 #endif
31 #endif
32 #define ORCUS_DLLLOCAL
33#else
34 #if __GNUC__ >= 4
35 #define ORCUS_DLLPUBLIC __attribute__ ((visibility ("default")))
36 #define ORCUS_DLLLOCAL __attribute__ ((visibility ("hidden")))
37 #else
38 #define ORCUS_DLLPUBLIC
39 #define ORCUS_DLLLOCAL
40 #endif
41#endif
42
43// orcus-parser
44
45#if defined _WIN32 || defined __CYGWIN__
46 #if defined __MINGW32__
47 #define ORCUS_PSR_DLLPUBLIC
48 #define ORCUS_PSR_DLLLOCAL
49 #elif defined __ORCUS_PSR_BUILDING_DLL
50 #ifdef __GNUC__
51 #define ORCUS_PSR_DLLPUBLIC __attribute__ ((dllexport))
52 #else
53 #define ORCUS_PSR_DLLPUBLIC __declspec(dllexport)
54 #endif
55 #elif defined __ORCUS_PSR_STATIC_LIB
56 #define ORCUS_PSR_DLLPUBLIC
57 #else
58 #ifdef __GNUC__
59 #define ORCUS_PSR_DLLPUBLIC __attribute__ ((dllimport))
60 #else
61 #define ORCUS_PSR_DLLPUBLIC __declspec(dllimport)
62 #endif
63 #endif
64 #define ORCUS_PSR_DLLLOCAL
65#else
66 #if __GNUC__ >= 4
67 #define ORCUS_PSR_DLLPUBLIC __attribute__ ((visibility ("default")))
68 #define ORCUS_PSR_DLLLOCAL __attribute__ ((visibility ("hidden")))
69 #else
70 #define ORCUS_PSR_DLLPUBLIC
71 #define ORCUS_PSR_DLLLOCAL
72 #endif
73#endif
74
75// orcus-spreadsheet-model
76
77#if defined _WIN32 || defined __CYGWIN__
78 #if defined __MINGW32__
79 #define ORCUS_SPM_DLLPUBLIC
80 #define ORCUS_SPM_DLLLOCAL
81 #elif defined __ORCUS_SPM_BUILDING_DLL
82 #ifdef __GNUC__
83 #define ORCUS_SPM_DLLPUBLIC __attribute__ ((dllexport))
84 #else
85 #define ORCUS_SPM_DLLPUBLIC __declspec(dllexport)
86 #endif
87 #elif defined __ORCUS_SPM_STATIC_LIB
88 #define ORCUS_SPM_DLLPUBLIC
89 #else
90 #ifdef __GNUC__
91 #define ORCUS_SPM_DLLPUBLIC __attribute__ ((dllimport))
92 #else
93 #define ORCUS_SPM_DLLPUBLIC __declspec(dllimport)
94 #endif
95 #endif
96 #define ORCUS_SPM_DLLLOCAL
97#else
98 #if __GNUC__ >= 4
99 #define ORCUS_SPM_DLLPUBLIC __attribute__ ((visibility ("default")))
100 #define ORCUS_SPM_DLLLOCAL __attribute__ ((visibility ("hidden")))
101 #else
102 #define ORCUS_SPM_DLLPUBLIC
103 #define ORCUS_SPM_DLLLOCAL
104 #endif
105#endif
106
107// orcus-mso
108
109#if defined _WIN32 || defined __CYGWIN__
110 #if defined __MINGW32__
111 #define ORCUS_MSO_DLLPUBLIC
112 #define ORCUS_MSO_DLLLOCAL
113 #elif defined __ORCUS_MSO_BUILDING_DLL
114 #ifdef __GNUC__
115 #define ORCUS_MSO_DLLPUBLIC __attribute__ ((dllexport))
116 #else
117 #define ORCUS_MSO_DLLPUBLIC __declspec(dllexport)
118 #endif
119 #elif defined __ORCUS_MSO_STATIC_LIB
120 #define ORCUS_MSO_DLLPUBLIC
121 #else
122 #ifdef __GNUC__
123 #define ORCUS_MSO_DLLPUBLIC __attribute__ ((dllimport))
124 #else
125 #define ORCUS_MSO_DLLPUBLIC __declspec(dllimport)
126 #endif
127 #endif
128 #define ORCUS_MSO_DLLLOCAL
129#else
130 #if __GNUC__ >= 4
131 #define ORCUS_MSO_DLLPUBLIC __attribute__ ((visibility ("default")))
132 #define ORCUS_MSO_DLLLOCAL __attribute__ ((visibility ("hidden")))
133 #else
134 #define ORCUS_MSO_DLLPUBLIC
135 #define ORCUS_MSO_DLLLOCAL
136 #endif
137#endif
138
139#endif
140
141/* vim:set shiftwidth=4 softtabstop=4 expandtab: */