H5api_adpt.h 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  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://www.hdfgroup.org/licenses. *
  10. * If you do not have access to either file, you may request a copy from *
  11. * help@hdfgroup.org. *
  12. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  13. /*
  14. * H5api_adpt.h
  15. * Used for the HDF5 dll project
  16. * Created by Patrick Lu on 1/12/99
  17. */
  18. #ifndef H5API_ADPT_H
  19. #define H5API_ADPT_H
  20. /* This will only be defined if HDF5 was built with CMake */
  21. #ifdef H5_BUILT_AS_DYNAMIC_LIB
  22. #if defined(hdf5_shared_EXPORTS)
  23. #if defined(_MSC_VER) /* MSVC Compiler Case */
  24. #define H5_DLL __declspec(dllexport)
  25. #define H5_DLLVAR extern __declspec(dllexport)
  26. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  27. #define H5_DLL __attribute__((visibility("default")))
  28. #define H5_DLLVAR extern __attribute__((visibility("default")))
  29. #endif
  30. #else
  31. #if defined(_MSC_VER) /* MSVC Compiler Case */
  32. #define H5_DLL __declspec(dllimport)
  33. #define H5_DLLVAR __declspec(dllimport)
  34. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  35. #define H5_DLL __attribute__((visibility("default")))
  36. #define H5_DLLVAR extern __attribute__((visibility("default")))
  37. #endif
  38. #endif
  39. #ifndef H5_DLL
  40. #define H5_DLL
  41. #define H5_DLLVAR extern
  42. #endif /* _HDF5DLL_ */
  43. #if defined(hdf5_test_shared_EXPORTS)
  44. #if defined(_MSC_VER) /* MSVC Compiler Case */
  45. #define H5TEST_DLL __declspec(dllexport)
  46. #define H5TEST_DLLVAR extern __declspec(dllexport)
  47. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  48. #define H5TEST_DLL __attribute__((visibility("default")))
  49. #define H5TEST_DLLVAR extern __attribute__((visibility("default")))
  50. #endif
  51. #else
  52. #if defined(_MSC_VER) /* MSVC Compiler Case */
  53. #define H5TEST_DLL __declspec(dllimport)
  54. #define H5TEST_DLLVAR __declspec(dllimport)
  55. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  56. #define H5TEST_DLL __attribute__((visibility("default")))
  57. #define H5TEST_DLLVAR extern __attribute__((visibility("default")))
  58. #endif
  59. #endif
  60. #ifndef H5TEST_DLL
  61. #define H5TEST_DLL
  62. #define H5TEST_DLLVAR extern
  63. #endif /* H5TEST_DLL */
  64. #if defined(hdf5_tools_shared_EXPORTS)
  65. #if defined(_MSC_VER) /* MSVC Compiler Case */
  66. #define H5TOOLS_DLL __declspec(dllexport)
  67. #define H5TOOLS_DLLVAR extern __declspec(dllexport)
  68. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  69. #define H5TOOLS_DLL __attribute__((visibility("default")))
  70. #define H5TOOLS_DLLVAR extern __attribute__((visibility("default")))
  71. #endif
  72. #else
  73. #if defined(_MSC_VER) /* MSVC Compiler Case */
  74. #define H5TOOLS_DLL __declspec(dllimport)
  75. #define H5TOOLS_DLLVAR __declspec(dllimport)
  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. #endif
  81. #ifndef H5TOOLS_DLL
  82. #define H5TOOLS_DLL
  83. #define H5TOOLS_DLLVAR extern
  84. #endif /* H5TOOLS_DLL */
  85. #if defined(hdf5_cpp_shared_EXPORTS)
  86. #if defined(_MSC_VER) /* MSVC Compiler Case */
  87. #define H5_DLLCPP __declspec(dllexport)
  88. #define H5_DLLCPPVAR extern __declspec(dllexport)
  89. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  90. #define H5_DLLCPP __attribute__((visibility("default")))
  91. #define H5_DLLCPPVAR extern __attribute__((visibility("default")))
  92. #endif
  93. #else
  94. #if defined(_MSC_VER) /* MSVC Compiler Case */
  95. #define H5_DLLCPP __declspec(dllimport)
  96. #define H5_DLLCPPVAR __declspec(dllimport)
  97. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  98. #define H5_DLLCPP __attribute__((visibility("default")))
  99. #define H5_DLLCPPVAR extern __attribute__((visibility("default")))
  100. #endif
  101. #endif
  102. #ifndef H5_DLLCPP
  103. #define H5_DLLCPP
  104. #define H5_DLLCPPVAR extern
  105. #endif /* H5_DLLCPP */
  106. #if defined(hdf5_hl_shared_EXPORTS)
  107. #if defined(_MSC_VER) /* MSVC Compiler Case */
  108. #define H5_HLDLL __declspec(dllexport)
  109. #define H5_HLDLLVAR extern __declspec(dllexport)
  110. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  111. #define H5_HLDLL __attribute__((visibility("default")))
  112. #define H5_HLDLLVAR extern __attribute__((visibility("default")))
  113. #endif
  114. #else
  115. #if defined(_MSC_VER) /* MSVC Compiler Case */
  116. #define H5_HLDLL __declspec(dllimport)
  117. #define H5_HLDLLVAR __declspec(dllimport)
  118. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  119. #define H5_HLDLL __attribute__((visibility("default")))
  120. #define H5_HLDLLVAR extern __attribute__((visibility("default")))
  121. #endif
  122. #endif
  123. #ifndef H5_HLDLL
  124. #define H5_HLDLL
  125. #define H5_HLDLLVAR extern
  126. #endif /* H5_HLDLL */
  127. #if defined(hdf5_hl_cpp_shared_EXPORTS)
  128. #if defined(_MSC_VER) /* MSVC Compiler Case */
  129. #define H5_HLCPPDLL __declspec(dllexport)
  130. #define H5_HLCPPDLLVAR extern __declspec(dllexport)
  131. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  132. #define H5_HLCPPDLL __attribute__((visibility("default")))
  133. #define H5_HLCPPDLLVAR extern __attribute__((visibility("default")))
  134. #endif
  135. #else
  136. #if defined(_MSC_VER) /* MSVC Compiler Case */
  137. #define H5_HLCPPDLL __declspec(dllimport)
  138. #define H5_HLCPPDLLVAR __declspec(dllimport)
  139. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  140. #define H5_HLCPPDLL __attribute__((visibility("default")))
  141. #define H5_HLCPPDLLVAR extern __attribute__((visibility("default")))
  142. #endif
  143. #endif
  144. #ifndef H5_HLCPPDLL
  145. #define H5_HLCPPDLL
  146. #define H5_HLCPPDLLVAR extern
  147. #endif /* H5_HLCPPDLL */
  148. #if defined(hdf5_f90cstub_shared_EXPORTS)
  149. #if defined(_MSC_VER) /* MSVC Compiler Case */
  150. #define H5_FCDLL __declspec(dllexport)
  151. #define H5_FCDLLVAR extern __declspec(dllexport)
  152. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  153. #define H5_FCDLL __attribute__((visibility("default")))
  154. #define H5_FCDLLVAR extern __attribute__((visibility("default")))
  155. #endif
  156. #else
  157. #if defined(_MSC_VER) /* MSVC Compiler Case */
  158. #define H5_FCDLL __declspec(dllimport)
  159. #define H5_FCDLLVAR __declspec(dllimport)
  160. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  161. #define H5_FCDLL __attribute__((visibility("default")))
  162. #define H5_FCDLLVAR extern __attribute__((visibility("default")))
  163. #endif
  164. #endif
  165. #ifndef H5_FCDLL
  166. #define H5_FCDLL
  167. #define H5_FCDLLVAR extern
  168. #endif /* H5_FCDLL */
  169. #if defined(hdf5_test_f90cstub_shared_EXPORTS)
  170. #if defined(_MSC_VER) /* MSVC Compiler Case */
  171. #define H5_FCTESTDLL __declspec(dllexport)
  172. #define H5_FCTESTDLLVAR extern __declspec(dllexport)
  173. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  174. #define H5_FCTESTDLL __attribute__((visibility("default")))
  175. #define H5_FCTESTDLLVAR extern __attribute__((visibility("default")))
  176. #endif
  177. #else
  178. #if defined(_MSC_VER) /* MSVC Compiler Case */
  179. #define H5_FCTESTDLL __declspec(dllimport)
  180. #define H5_FCTESTDLLVAR __declspec(dllimport)
  181. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  182. #define H5_FCTESTDLL __attribute__((visibility("default")))
  183. #define H5_FCTESTDLLVAR extern __attribute__((visibility("default")))
  184. #endif
  185. #endif
  186. #ifndef H5_FCTESTDLL
  187. #define H5_FCTESTDLL
  188. #define H5_FCTESTDLLVAR extern
  189. #endif /* H5_FCTESTDLL */
  190. #if defined(hdf5_hl_f90cstub_shared_EXPORTS)
  191. #if defined(_MSC_VER) /* MSVC Compiler Case */
  192. #define HDF5_HL_F90CSTUBDLL __declspec(dllexport)
  193. #define HDF5_HL_F90CSTUBDLLVAR extern __declspec(dllexport)
  194. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  195. #define HDF5_HL_F90CSTUBDLL __attribute__((visibility("default")))
  196. #define HDF5_HL_F90CSTUBDLLVAR extern __attribute__((visibility("default")))
  197. #endif
  198. #else
  199. #if defined(_MSC_VER) /* MSVC Compiler Case */
  200. #define HDF5_HL_F90CSTUBDLL __declspec(dllimport)
  201. #define HDF5_HL_F90CSTUBDLLVAR __declspec(dllimport)
  202. #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
  203. #define HDF5_HL_F90CSTUBDLL __attribute__((visibility("default")))
  204. #define HDF5_HL_F90CSTUBDLLVAR extern __attribute__((visibility("default")))
  205. #endif
  206. #endif
  207. #ifndef HDF5_HL_F90CSTUBDLL
  208. #define HDF5_HL_F90CSTUBDLL
  209. #define HDF5_HL_F90CSTUBDLLVAR extern
  210. #endif /* HDF5_HL_F90CSTUBDLL */
  211. #else
  212. #define H5_DLL
  213. #define H5_DLLVAR extern
  214. #define H5TEST_DLL
  215. #define H5TEST_DLLVAR extern
  216. #define H5TOOLS_DLL
  217. #define H5TOOLS_DLLVAR extern
  218. #define H5_DLLCPP
  219. #define H5_DLLCPPVAR extern
  220. #define H5_HLDLL
  221. #define H5_HLDLLVAR extern
  222. #define H5_HLCPPDLL
  223. #define H5_HLCPPDLLVAR extern
  224. #define H5_FCDLL
  225. #define H5_FCDLLVAR extern
  226. #define H5_FCTESTDLL
  227. #define H5_FCTESTDLLVAR extern
  228. #define HDF5_HL_F90CSTUBDLL
  229. #define HDF5_HL_F90CSTUBDLLVAR extern
  230. #endif /* H5_BUILT_AS_DYNAMIC_LIB */
  231. #endif /* H5API_ADPT_H */