HDF5  1.12.0
H5api_adpt.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*
15  * H5api_adpt.h
16  * Used for the HDF5 dll project
17  * Created by Patrick Lu on 1/12/99
18  */
19 #ifndef H5API_ADPT_H
20 #define H5API_ADPT_H
21 
22 
23 /* This will only be defined if HDF5 was built with CMake */
24 #ifdef H5_BUILT_AS_DYNAMIC_LIB
25 
26 #if defined(hdf5_shared_EXPORTS)
27  #if defined (_MSC_VER) /* MSVC Compiler Case */
28  #define H5_DLL __declspec(dllexport)
29  #define H5_DLLVAR extern __declspec(dllexport)
30  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
31  #define H5_DLL __attribute__ ((visibility("default")))
32  #define H5_DLLVAR extern __attribute__ ((visibility("default")))
33  #endif
34 #else
35  #if defined (_MSC_VER) /* MSVC Compiler Case */
36  #define H5_DLL __declspec(dllimport)
37  #define H5_DLLVAR __declspec(dllimport)
38  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
39  #define H5_DLL __attribute__ ((visibility("default")))
40  #define H5_DLLVAR extern __attribute__ ((visibility("default")))
41  #endif
42 #endif
43 
44 #ifndef H5_DLL
45  #define H5_DLL
46  #define H5_DLLVAR extern
47 #endif /* _HDF5DLL_ */
48 
49 #if defined(hdf5_test_shared_EXPORTS)
50  #if defined (_MSC_VER) /* MSVC Compiler Case */
51  #define H5TEST_DLL __declspec(dllexport)
52  #define H5TEST_DLLVAR extern __declspec(dllexport)
53  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
54  #define H5TEST_DLL __attribute__ ((visibility("default")))
55  #define H5TEST_DLLVAR extern __attribute__ ((visibility("default")))
56  #endif
57 #else
58  #if defined (_MSC_VER) /* MSVC Compiler Case */
59  #define H5TEST_DLL __declspec(dllimport)
60  #define H5TEST_DLLVAR __declspec(dllimport)
61  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
62  #define H5TEST_DLL __attribute__ ((visibility("default")))
63  #define H5TEST_DLLVAR extern __attribute__ ((visibility("default")))
64  #endif
65 #endif
66 
67 #ifndef H5TEST_DLL
68  #define H5TEST_DLL
69  #define H5TEST_DLLVAR extern
70 #endif /* H5TEST_DLL */
71 
72 #if defined(hdf5_tools_shared_EXPORTS)
73  #if defined (_MSC_VER) /* MSVC Compiler Case */
74  #define H5TOOLS_DLL __declspec(dllexport)
75  #define H5TOOLS_DLLVAR extern __declspec(dllexport)
76  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
77  #define H5TOOLS_DLL __attribute__ ((visibility("default")))
78  #define H5TOOLS_DLLVAR extern __attribute__ ((visibility("default")))
79  #endif
80 #else
81  #if defined (_MSC_VER) /* MSVC Compiler Case */
82  #define H5TOOLS_DLL __declspec(dllimport)
83  #define H5TOOLS_DLLVAR __declspec(dllimport)
84  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
85  #define H5TOOLS_DLL __attribute__ ((visibility("default")))
86  #define H5TOOLS_DLLVAR extern __attribute__ ((visibility("default")))
87  #endif
88 #endif
89 
90 #ifndef H5TOOLS_DLL
91  #define H5TOOLS_DLL
92  #define H5TOOLS_DLLVAR extern
93 #endif /* H5TOOLS_DLL */
94 
95 #if defined(hdf5_cpp_shared_EXPORTS)
96  #if defined (_MSC_VER) /* MSVC Compiler Case */
97  #define H5_DLLCPP __declspec(dllexport)
98  #define H5_DLLCPPVAR extern __declspec(dllexport)
99  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
100  #define H5_DLLCPP __attribute__ ((visibility("default")))
101  #define H5_DLLCPPVAR extern __attribute__ ((visibility("default")))
102  #endif
103 #else
104  #if defined (_MSC_VER) /* MSVC Compiler Case */
105  #define H5_DLLCPP __declspec(dllimport)
106  #define H5_DLLCPPVAR __declspec(dllimport)
107  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
108  #define H5_DLLCPP __attribute__ ((visibility("default")))
109  #define H5_DLLCPPVAR extern __attribute__ ((visibility("default")))
110  #endif
111 #endif
112 
113 #ifndef H5_DLLCPP
114  #define H5_DLLCPP
115  #define H5_DLLCPPVAR extern
116 #endif /* H5_DLLCPP */
117 
118 #if defined(hdf5_hl_shared_EXPORTS)
119  #if defined (_MSC_VER) /* MSVC Compiler Case */
120  #define H5_HLDLL __declspec(dllexport)
121  #define H5_HLDLLVAR extern __declspec(dllexport)
122  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
123  #define H5_HLDLL __attribute__ ((visibility("default")))
124  #define H5_HLDLLVAR extern __attribute__ ((visibility("default")))
125  #endif
126 #else
127  #if defined (_MSC_VER) /* MSVC Compiler Case */
128  #define H5_HLDLL __declspec(dllimport)
129  #define H5_HLDLLVAR __declspec(dllimport)
130  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
131  #define H5_HLDLL __attribute__ ((visibility("default")))
132  #define H5_HLDLLVAR extern __attribute__ ((visibility("default")))
133  #endif
134 #endif
135 
136 #ifndef H5_HLDLL
137  #define H5_HLDLL
138  #define H5_HLDLLVAR extern
139 #endif /* H5_HLDLL */
140 
141 #if defined(hdf5_hl_cpp_shared_EXPORTS)
142  #if defined (_MSC_VER) /* MSVC Compiler Case */
143  #define H5_HLCPPDLL __declspec(dllexport)
144  #define H5_HLCPPDLLVAR extern __declspec(dllexport)
145  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
146  #define H5_HLCPPDLL __attribute__ ((visibility("default")))
147  #define H5_HLCPPDLLVAR extern __attribute__ ((visibility("default")))
148  #endif
149 #else
150  #if defined (_MSC_VER) /* MSVC Compiler Case */
151  #define H5_HLCPPDLL __declspec(dllimport)
152  #define H5_HLCPPDLLVAR __declspec(dllimport)
153  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
154  #define H5_HLCPPDLL __attribute__ ((visibility("default")))
155  #define H5_HLCPPDLLVAR extern __attribute__ ((visibility("default")))
156  #endif
157 #endif
158 
159 #ifndef H5_HLCPPDLL
160  #define H5_HLCPPDLL
161  #define H5_HLCPPDLLVAR extern
162 #endif /* H5_HLCPPDLL */
163 
164 #if defined(hdf5_f90cstub_shared_EXPORTS)
165  #if defined (_MSC_VER) /* MSVC Compiler Case */
166  #define H5_FCDLL __declspec(dllexport)
167  #define H5_FCDLLVAR extern __declspec(dllexport)
168  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
169  #define H5_FCDLL __attribute__ ((visibility("default")))
170  #define H5_FCDLLVAR extern __attribute__ ((visibility("default")))
171  #endif
172 #else
173  #if defined (_MSC_VER) /* MSVC Compiler Case */
174  #define H5_FCDLL __declspec(dllimport)
175  #define H5_FCDLLVAR __declspec(dllimport)
176  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
177  #define H5_FCDLL __attribute__ ((visibility("default")))
178  #define H5_FCDLLVAR extern __attribute__ ((visibility("default")))
179  #endif
180 #endif
181 
182 #ifndef H5_FCDLL
183  #define H5_FCDLL
184  #define H5_FCDLLVAR extern
185 #endif /* H5_FCDLL */
186 
187 #if defined(hdf5_test_f90cstub_shared_EXPORTS)
188  #if defined (_MSC_VER) /* MSVC Compiler Case */
189  #define H5_FCTESTDLL __declspec(dllexport)
190  #define H5_FCTESTDLLVAR extern __declspec(dllexport)
191  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
192  #define H5_FCTESTDLL __attribute__ ((visibility("default")))
193  #define H5_FCTESTDLLVAR extern __attribute__ ((visibility("default")))
194  #endif
195 #else
196  #if defined (_MSC_VER) /* MSVC Compiler Case */
197  #define H5_FCTESTDLL __declspec(dllimport)
198  #define H5_FCTESTDLLVAR __declspec(dllimport)
199  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
200  #define H5_FCTESTDLL __attribute__ ((visibility("default")))
201  #define H5_FCTESTDLLVAR extern __attribute__ ((visibility("default")))
202  #endif
203 #endif
204 
205 #ifndef H5_FCTESTDLL
206  #define H5_FCTESTDLL
207  #define H5_FCTESTDLLVAR extern
208 #endif /* H5_FCTESTDLL */
209 
210 #if defined(hdf5_hl_f90cstub_shared_EXPORTS)
211  #if defined (_MSC_VER) /* MSVC Compiler Case */
212  #define HDF5_HL_F90CSTUBDLL __declspec(dllexport)
213  #define HDF5_HL_F90CSTUBDLLVAR extern __declspec(dllexport)
214  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
215  #define HDF5_HL_F90CSTUBDLL __attribute__ ((visibility("default")))
216  #define HDF5_HL_F90CSTUBDLLVAR extern __attribute__ ((visibility("default")))
217  #endif
218 #else
219  #if defined (_MSC_VER) /* MSVC Compiler Case */
220  #define HDF5_HL_F90CSTUBDLL __declspec(dllimport)
221  #define HDF5_HL_F90CSTUBDLLVAR __declspec(dllimport)
222  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
223  #define HDF5_HL_F90CSTUBDLL __attribute__ ((visibility("default")))
224  #define HDF5_HL_F90CSTUBDLLVAR extern __attribute__ ((visibility("default")))
225  #endif
226 #endif
227 
228 #ifndef HDF5_HL_F90CSTUBDLL
229  #define HDF5_HL_F90CSTUBDLL
230  #define HDF5_HL_F90CSTUBDLLVAR extern
231 #endif /* HDF5_HL_F90CSTUBDLL */
232 
233 #else
234  #define H5_DLL
235  #define H5_DLLVAR extern
236  #define H5TEST_DLL
237  #define H5TEST_DLLVAR extern
238  #define H5TOOLS_DLL
239  #define H5TOOLS_DLLVAR extern
240  #define H5_DLLCPP
241  #define H5_DLLCPPVAR extern
242  #define H5_HLDLL
243  #define H5_HLDLLVAR extern
244  #define H5_HLCPPDLL
245  #define H5_HLCPPDLLVAR extern
246  #define H5_FCDLL
247  #define H5_FCDLLVAR extern
248  #define H5_FCTESTDLL
249  #define H5_FCTESTDLLVAR extern
250  #define HDF5_HL_F90CSTUBDLL
251  #define HDF5_HL_F90CSTUBDLLVAR extern
252 #endif /* H5_BUILT_AS_DYNAMIC_LIB */
253 
254 #endif /* H5API_ADPT_H */