summaryrefslogtreecommitdiff
path: root/include/zmq_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/zmq_utils.h')
-rw-r--r--include/zmq_utils.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/zmq_utils.h b/include/zmq_utils.h
index 6d42bf9..4a0d119 100644
--- a/include/zmq_utils.h
+++ b/include/zmq_utils.h
@@ -24,7 +24,7 @@
extern "C" {
#endif
-/* Win32 needs special handling for DLL exports */
+/* Handle DSO symbol visibility */
#if defined _WIN32
# if defined DLL_EXPORT
# define ZMQ_EXPORT __declspec(dllexport)
@@ -32,9 +32,12 @@ extern "C" {
# define ZMQ_EXPORT __declspec(dllimport)
# endif
#else
-# define ZMQ_EXPORT
-# if defined __GNUC__ && __GNUC__ >= 4
-# pragma GCC visibility push(default)
+# if defined __SUNPRO_C || defined __SUNPRO_CC
+# define ZMQ_EXPORT __global
+# elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER
+# define ZMQ_EXPORT __attribute__ ((visibility("default")))
+# else
+# define ZMQ_EXPORT
# endif
#endif
@@ -52,9 +55,6 @@ ZMQ_EXPORT unsigned long zmq_stopwatch_stop (void *watch_);
ZMQ_EXPORT void zmq_sleep (int seconds_);
#undef ZMQ_EXPORT
-#if defined __GNUC__ && __GNUC__ >= 4 && !defined _WIN32
-# pragma GCC visibility pop
-#endif
#ifdef __cplusplus
}