MISR Toolkit  1.5.1
H4api_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 HDF. The full HDF copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the files COPYING and Copyright.html. COPYING can be found at the root *
9  * of the source code distribution tree; Copyright.html can be found at *
10  * http://hdfgroup.org/products/hdf4/doc/Copyright.html. If you do not have *
11  * access to either file, you may request a copy from help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /* $Id: hdfi.h 5435 2010-08-11 17:31:24Z byrn $ */
15 
16 #ifndef H4API_ADPT_H
17 #define H4API_ADPT_H
18 
19 #include "h4config.h"
20 
28 /* This will only be defined if HDF4 was built with CMake */
29 #if defined(H4_BUILT_AS_DYNAMIC_LIB)
30 
31 #if defined(xdr_EXPORTS)
32  #if defined (_MSC_VER) /* MSVC Compiler Case */
33  #define XDRLIBAPI extern __declspec(dllexport)
34  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
35  #define XDRLIBAPI extern __attribute__ ((visibility("default")))
36  #endif
37 #endif /* xdr_EXPORTS */
38 
39 #if defined(hdf_EXPORTS)
40  #if defined (_MSC_VER) /* MSVC Compiler Case */
41  #define HDFERRPUBLIC __declspec(dllimport)
42  #define HDFPUBLIC __declspec(dllexport)
43  #define HDFLIBAPI extern __declspec(dllexport)
44  #define HDFFCLIBAPI extern __declspec(dllimport)
45  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
46  #define HDFERRPUBLIC extern __attribute__ ((visibility("default")))
47  #define HDFPUBLIC __attribute__ ((visibility("default")))
48  #define HDFLIBAPI extern __attribute__ ((visibility("default")))
49  #define HDFFCLIBAPI extern __attribute__ ((visibility("default")))
50  #endif
51 #endif /* hdf_EXPORTS */
52 
53 #if defined(hdf_fcstub_EXPORTS)
54  #if defined (_MSC_VER) /* MSVC Compiler Case */
55  #define HDFPUBLIC __declspec(dllexport)
56  #define HDFLIBAPI extern __declspec(dllimport)
57  #define HDFFCLIBAPI extern __declspec(dllexport)
58  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
59  #define HDFPUBLIC __attribute__ ((visibility("default")))
60  #define HDFLIBAPI extern __attribute__ ((visibility("default")))
61  #define HDFFCLIBAPI extern __attribute__ ((visibility("default")))
62  #endif
63 #endif /* hdf_fcstub_EXPORTS */
64 
65 #if defined(mfhdf_EXPORTS)
66  #if defined (_MSC_VER) /* MSVC Compiler Case */
67  #define HDFERRPUBLIC extern __declspec(dllimport)
68  #define HDFPUBLIC __declspec(dllimport)
69  #define HDFLIBAPI extern __declspec(dllexport)
70  #define HDFFCLIBAPI extern __declspec(dllimport)
71  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
72  #define HDFERRPUBLIC extern __attribute__ ((visibility("default")))
73  #define HDFPUBLIC __attribute__ ((visibility("default")))
74  #define HDFLIBAPI extern __attribute__ ((visibility("default")))
75  #define HDFFCLIBAPI extern __attribute__ ((visibility("default")))
76  #endif
77 #endif /* mfhdf_EXPORTS */
78 
79 #if defined(mfhdf_fcstub_EXPORTS)
80  #if defined (_MSC_VER) /* MSVC Compiler Case */
81  #define HDFPUBLIC __declspec(dllimport)
82  #define HDFLIBAPI extern __declspec(dllimport)
83  #define HDFFCLIBAPI extern __declspec(dllexport)
84  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
85  #define HDFPUBLIC __attribute__ ((visibility("default")))
86  #define HDFLIBAPI extern __attribute__ ((visibility("default")))
87  #define HDFFCLIBAPI extern __attribute__ ((visibility("default")))
88  #endif
89 #endif /* mfhdf_fcstub_EXPORTS */
90 
91 #if defined(hdf_test_fcstub_EXPORTS)
92  #if defined (_MSC_VER) /* MSVC Compiler Case */
93  #define HDFFCLIBAPI extern __declspec(dllexport)
94  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
95  #define HDFFCLIBAPI extern __attribute__ ((visibility("default")))
96  #endif
97 #endif/* hdf_test_fcstub_EXPORTS */
98 
99 #if !defined(XDRLIBAPI)
100  #if defined (_MSC_VER) /* MSVC Compiler Case */
101  #define XDRLIBAPI extern __declspec(dllimport)
102  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
103  #define XDRLIBAPI extern __attribute__ ((visibility("default")))
104  #endif
105 #endif
106 #if !defined(HDFERRPUBLIC)
107  #if defined (_MSC_VER) /* MSVC Compiler Case */
108  #define HDFERRPUBLIC extern __declspec(dllimport)
109  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
110  #define HDFERRPUBLIC extern __attribute__ ((visibility("default")))
111  #endif
112 #endif
113 #if !defined(HDFPUBLIC)
114  #if defined (_MSC_VER) /* MSVC Compiler Case */
115  #define HDFPUBLIC __declspec(dllimport)
116  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
117  #define HDFPUBLIC __attribute__ ((visibility("default")))
118  #endif
119 #endif
120 #if !defined(HDFLIBAPI)
121  #if defined (_MSC_VER) /* MSVC Compiler Case */
122  #define HDFLIBAPI extern __declspec(dllimport)
123  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
124  #define HDFLIBAPI extern __attribute__ ((visibility("default")))
125  #endif
126 #endif
127 #if !defined(HDFFCLIBAPI)
128  #if defined (_MSC_VER) /* MSVC Compiler Case */
129  #define HDFFCLIBAPI extern __declspec(dllimport)
130  #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
131  #define HDFFCLIBAPI extern __attribute__ ((visibility("default")))
132  #endif
133 #endif
134 
135 #elif defined(H4_BUILT_AS_STATIC_LIB)
136  #define XDRLIBAPI extern
137  #define HDFERRPUBLIC extern
138  #define HDFPUBLIC
139  #define HDFLIBAPI extern
140  #define HDFFCLIBAPI extern
141 
142 #else
143 /* This is the original HDFGroup defined preprocessor code which should still work
144  * with the VS projects that are maintained by "The HDF Group"
145  * This will be removed after the next release.
146  */
147 
148 #ifdef _WIN32
149 
153 # if defined(_MT) && defined(_DLL) &&!defined(_HDFDLL_)
154 /* If the user really meant to use _HDFDLL_, but he forgot, just define it. */
155 # define _HDFDLL_
156 # endif
157 
158 # if !defined(_MT) && defined(_HDFDLL_)
159 # error To use the HDF libraries from a single-threaded project, you must use static HDF libraries
160 # error Undefine the macro "_HDFDLL_"
161 # endif
162 
163 # if defined(_HDFDLL_)
164 # pragma warning( disable: 4273 ) /* Disable the stupid dll linkage warnings */
165 
166 # if !defined(_HDFLIB_)
167 # define HDFPUBLIC __declspec(dllimport)
168 # else
169 # define HDFPUBLIC __declspec(dllexport)
170 # endif
171 
172 # if !defined(_MFHDFLIB_) && !defined(_HDFLIB_)
173 # define HDFLIBAPI __declspec(dllimport) extern
174 # else
175 # define HDFLIBAPI __declspec(dllexport) extern
176 # endif
177 
178 # if defined(_HDFLIB_C_STUB_EXPORTS) || defined(_MFHDFLIB_C_STUB_EXPORTS) || defined(_DLLLIBTEST_FCSTUB_EXPORTS)
179 # define HDFFCLIBAPI __declspec(dllexport) extern
180 # else
181 # define HDFFCLIBAPI __declspec(dllimport) extern
182 # endif
183 
184 # define XDRLIBAPI extern
185 
186 # else
187 # define XDRLIBAPI extern
188 # define HDFPUBLIC
189 # define HDFLIBAPI extern
190 # define HDFFCLIBAPI extern
191 # endif
192 #else /* !defined( _WIN32 ) */
193 # define XDRLIBAPI extern
194 # define HDFPUBLIC
195 # define HDFLIBAPI extern
196 # define HDFFCLIBAPI extern
197 #endif
198 
199 #endif /*H4_BUILT_AS_DYNAMIC_LIB */
200 
201 
202 #endif /* H4API_ADPT_H */

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52