[svn-r23453] FIX plugin DLL decoration

This commit is contained in:
Allen Byrne 2013-03-25 16:37:09 -05:00
parent b1c594d52d
commit cfbbd94627

View File

@ -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" {