diff --git a/src/xspice/icm/dlmain.c b/src/xspice/icm/dlmain.c index 496f86020..bdd044f9f 100644 --- a/src/xspice/icm/dlmain.c +++ b/src/xspice/icm/dlmain.c @@ -41,10 +41,23 @@ struct coreInfo_t *coreitf; // Functions that return pointers to structures. ////////////////////////////////////////////////////////////////////////////// -#if defined (__MINGW32__) || defined (__CYGWIN__) || defined (_MSC_VER) +//#if defined (__MINGW32__) || defined (__CYGWIN__) || defined (_MSC_VER) +//#define CM_EXPORT __declspec(dllexport) +//#else +//#define CM_EXPORT +//#endif + +#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__CYGWIN__) #define CM_EXPORT __declspec(dllexport) #else -#define CM_EXPORT + /* use with gcc flag -fvisibility=hidden */ + #if __GNUC__ >= 4 + #define CM_EXPORT __attribute__ ((visibility ("default"))) + #define CM_EXPORT_LOCAL __attribute__ ((visibility ("hidden"))) + #else + #define CM_EXPORT + #define CM_EXPORT_LOCAL + #endif #endif extern CM_EXPORT void *CMdevs(void);