summaryrefslogtreecommitdiffstats
path: root/src/H5PLpublic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5PLpublic.h')
-rw-r--r--src/H5PLpublic.h40
1 files changed, 34 insertions, 6 deletions
diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h
index 6b17197..6a8a612 100644
--- a/src/H5PLpublic.h
+++ b/src/H5PLpublic.h
@@ -36,12 +36,40 @@ typedef enum H5PL_type_t {
} H5PL_type_t;
-/* plugins always export */
-#if defined (_MSC_VER) /* MSVC Compiler Case */
- #define H5PLUGIN_DLL __declspec(dllexport)
-#elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
- #define H5PLUGIN_DLL __attribute__ ((visibility("default")))
-#endif
+#ifdef H5_BUILT_AS_DYNAMIC_LIB
+
+ #if defined (hdf5_EXPORTS)
+ /* hdf5 library imports from plugin */
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5PLUGIN_DLL __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5PLUGIN_DLL __attribute__ ((visibility("default")))
+ #endif
+ #else
+ /* plugins always export */
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5PLUGIN_DLL __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5PLUGIN_DLL __attribute__ ((visibility("default")))
+ #endif
+ #endif
+
+#elif defined(H5_BUILT_AS_STATIC_LIB)
+ #define H5PLUGIN_DLL
+#else
+
+ #if defined(H5_HAVE_WIN32_API)
+ #if defined(_HDF5DLL_)
+ #pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+ #define H5PLUGIN_DLL __declspec(dllimport)
+ #elif defined(_HDF5USEDLL_)
+ #define H5PLUGIN_DLL __declspec(dllexport)
+ #endif /* _HDF5DLL_ */
+ #else /*H5_HAVE_WIN32_API*/
+ #define H5PLUGIN_DLL
+ #endif /*H5_HAVE_WIN32_API*/
+
+#endif /* H5_BUILT_AS_xxx_LIB */
#ifdef __cplusplus
extern "C" {