diff options
author | Mikko Koppanen <mkoppanen@php.net> | 2010-12-01 10:33:07 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-12-01 10:33:07 +0100 |
commit | 5bb0a339be31064900257e04e2ffd32e80911d63 (patch) | |
tree | 13799f448fe4e7ebb90d23251a9ae98228b35eb4 /include | |
parent | 17d7e6ede0f907461130302cf4bddcdf9e2737cf (diff) |
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 <mkoppanen@php.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/zmq.h | 14 | ||||
-rw-r--r-- | include/zmq_utils.h | 14 |
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 } |