From 5bb0a339be31064900257e04e2ffd32e80911d63 Mon Sep 17 00:00:00 2001 From: Mikko Koppanen Date: Wed, 1 Dec 2010 10:33:07 +0100 Subject: Prefix variables with "ac_zmq_" - Added a macro for checking clang compiler - Moved basic compiler checks to a macro - Added a macro for checking if compiler supports a flag - Added --enable-debug flag - Added a macro for running normal autoconf check with compiler flags - Added a macro for checking for verbose flag for different compilers (-Wall) - Added a macro for turning on strict standards compliance - Added a macro for turning warnings to errors - Added a macro for checking if compiler supports given pragma - Most of the flags now go through checks if the compilers supports them rather than enumerating different compilers - Added DSO symbol visibility for sun compiler - Enabled verbose mode for sun compiler - Fixed build for ICC 12.x by adding -wd279 to size_t checks - Removed pkg-config checks as those don't seem to be used anywhere Signed-off-by: Mikko Koppanen --- include/zmq.h | 14 +++++++------- include/zmq_utils.h | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'include') 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 } -- cgit v1.2.3