mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 10:33:52 +01:00
Problem: Sun Studio build errors
Solution: add compiler flags to support extensions like anonymous structs in unions, fix casting of const, and check for suncc rather than solaris
This commit is contained in:
parent
cdb54d248b
commit
7ba074fa28
@ -315,6 +315,12 @@ case "${host_os}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Sun Studio does not like anonymous structures in unions
|
||||
if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then
|
||||
CXXFLAGS="${CXXFLAGS} -features=extensions"
|
||||
CFLAGS="${CFLAGS} -features=extensions"
|
||||
fi
|
||||
|
||||
# Checks for libraries
|
||||
AC_CHECK_LIB([pthread], [pthread_create])
|
||||
AC_CHECK_LIB([rt], [clock_gettime])
|
||||
|
@ -266,7 +266,11 @@ struct atomic_value_t
|
||||
return (int) (ptrdiff_t) atomic_cas ((void **) &value, 0, 0
|
||||
#if defined ZMQ_ATOMIC_PTR_MUTEX
|
||||
,
|
||||
#if defined __SUNPRO_CC
|
||||
const_cast<mutex_t &> (sync)
|
||||
#else
|
||||
sync
|
||||
#endif
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
|
@ -40,7 +40,7 @@
|
||||
#define ZMQ_PUSH_OR_EMPLACE_BACK emplace_back
|
||||
#define ZMQ_MOVE(x) std::move (x)
|
||||
#else
|
||||
#if defined ZMQ_HAVE_SOLARIS
|
||||
#if defined __SUNPRO_CC
|
||||
template <typename K, typename V>
|
||||
std::pair<const K, V> make_pair_fix_const (const K &k, const V &v)
|
||||
{
|
||||
|
@ -387,7 +387,7 @@ int zmq::wsa_error_to_errno (int errcode)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBUNWIND
|
||||
#if defined(HAVE_LIBUNWIND) && !defined(__SUNPRO_CC)
|
||||
|
||||
#define UNW_LOCAL_ONLY
|
||||
#include <libunwind.h>
|
||||
|
Loading…
Reference in New Issue
Block a user