diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-03-25 21:37:09 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-03-25 21:37:09 (GMT) |
commit | cfbbd9462707db9f7fde6b8f8adf8936d05cffe4 (patch) | |
tree | edd600449f0964c9d3488aa1b03323ff8041e711 /src | |
parent | b1c594d52df0c744792729f514a207823f462b77 (diff) | |
download | hdf5-cfbbd9462707db9f7fde6b8f8adf8936d05cffe4.zip hdf5-cfbbd9462707db9f7fde6b8f8adf8936d05cffe4.tar.gz hdf5-cfbbd9462707db9f7fde6b8f8adf8936d05cffe4.tar.bz2 |
[svn-r23453] FIX plugin DLL decoration
Diffstat (limited to 'src')
-rw-r--r-- | src/H5PLpublic.h | 40 |
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" { |