summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/zmq.h14
-rw-r--r--include/zmq_utils.h14
2 files changed, 14 insertions, 14 deletions
diff --git a/include/zmq.h b/include/zmq.h
index 7a63253..692f1c1 100644
--- a/include/zmq.h
+++ b/include/zmq.h
@@ -30,7 +30,7 @@ extern "C" {
#include "winsock2.h"
#endif
-/* Win32 needs special handling for DLL exports */
+/* Handle DSO symbol visibility */
#if defined _WIN32
# if defined DLL_EXPORT
# define ZMQ_EXPORT __declspec(dllexport)
@@ -38,9 +38,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
@@ -246,9 +249,6 @@ ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);
ZMQ_EXPORT int zmq_device (int device, void * insocket, void* outsocket);
#undef ZMQ_EXPORT
-#if defined __GNUC__ && __GNUC__ >= 4 && !defined _WIN32
-# pragma GCC visibility pop
-#endif
#ifdef __cplusplus
}
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
}