diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/console/ClassKey.cpp | 1 | ||||
-rw-r--r-- | cpp/src/qpid/framing/FieldTable.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/framing/Uuid.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp | 1 | ||||
-rw-r--r-- | cpp/src/qpid/sys/unordered_map.h | 2 | ||||
-rw-r--r-- | cpp/src/tests/FieldTable.cpp | 1 | ||||
-rw-r--r-- | cpp/src/tests/TimerTest.cpp | 2 |
9 files changed, 17 insertions, 4 deletions
diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index e7090b74a0..9791c391fe 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -281,7 +281,7 @@ endif (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) set (COMPILER_FLAGS "-library=stlport4 -mt") - set (WARNING_FLAGS "+w2") + set (WARNING_FLAGS "+w") endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) option(ENABLE_WARNINGS "Enable lots of compiler warnings (recommended)" ON) @@ -826,6 +826,12 @@ else (CMAKE_SYSTEM_NAME STREQUAL Windows) ) endif (CMAKE_SYSTEM_NAME STREQUAL SunOS) + if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) + # -lmalloc needed for mallinfo. + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lmalloc") + set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lmalloc") + endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) + set (qpidtypes_platform_SOURCES) set (qpidtypes_platform_LIBS uuid diff --git a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp index 2ea4dc0c61..aaebec0720 100644 --- a/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp +++ b/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp @@ -78,7 +78,7 @@ bool expired(const sys::AbsTime& start, double timeout) if (timeout == 0) return true; if (timeout == FOREVER) return false; sys::Duration used(start, sys::now()); - sys::Duration allowed(int64_t(timeout*sys::TIME_SEC)); + sys::Duration allowed((int64_t)(timeout*sys::TIME_SEC)); return allowed < used; } diff --git a/cpp/src/qpid/console/ClassKey.cpp b/cpp/src/qpid/console/ClassKey.cpp index 7a16113bae..d4b59fc413 100644 --- a/cpp/src/qpid/console/ClassKey.cpp +++ b/cpp/src/qpid/console/ClassKey.cpp @@ -21,6 +21,7 @@ #include "qpid/console/ClassKey.h" #include <string.h> +#include <iostream> #include <cstdio> using namespace std; diff --git a/cpp/src/qpid/framing/FieldTable.cpp b/cpp/src/qpid/framing/FieldTable.cpp index 0f7140b627..cd38db1ee8 100644 --- a/cpp/src/qpid/framing/FieldTable.cpp +++ b/cpp/src/qpid/framing/FieldTable.cpp @@ -196,7 +196,7 @@ void FieldTable::setFloat(const std::string& name, const float value){ flushRawCache(); } -void FieldTable::setDouble(const std::string& name, double value){ +void FieldTable::setDouble(const std::string& name, const double value){ realDecode(); values[name] = ValuePtr(new DoubleValue(value)); flushRawCache(); diff --git a/cpp/src/qpid/framing/Uuid.cpp b/cpp/src/qpid/framing/Uuid.cpp index e94e28ffee..e377c1172d 100644 --- a/cpp/src/qpid/framing/Uuid.cpp +++ b/cpp/src/qpid/framing/Uuid.cpp @@ -46,7 +46,7 @@ Uuid::Uuid(const uint8_t* data) { Uuid::Uuid(const std::string& s) { if (s.size() != UNPARSED_SIZE) throw IllegalArgumentException(QPID_MSG("Invalid UUID: " << s)); - if (uuid_parse(&s[0], c_array()) != 0) + if (uuid_parse(const_cast<char *>(&s[0]), c_array()) != 0) throw IllegalArgumentException(QPID_MSG("Invalid UUID: " << s)); } diff --git a/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp b/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp index 249b769051..29b91f3e7a 100644 --- a/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp +++ b/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp @@ -18,6 +18,7 @@ * under the License. * */ +#include <unistd.h> #include "qpid/sys/cyrus/CyrusSecurityLayer.h" #include <algorithm> #include "qpid/framing/reply_exceptions.h" diff --git a/cpp/src/qpid/sys/unordered_map.h b/cpp/src/qpid/sys/unordered_map.h index 5f7f9567c5..7ae71c3daa 100644 --- a/cpp/src/qpid/sys/unordered_map.h +++ b/cpp/src/qpid/sys/unordered_map.h @@ -23,6 +23,8 @@ #ifdef _MSC_VER # include <unordered_map> +#elif defined(__SUNPRO_CC) +# include <boost/tr1/unordered_map.hpp> #else # include <tr1/unordered_map> #endif /* _MSC_VER */ diff --git a/cpp/src/tests/FieldTable.cpp b/cpp/src/tests/FieldTable.cpp index 81372d87c5..8aeeb031b3 100644 --- a/cpp/src/tests/FieldTable.cpp +++ b/cpp/src/tests/FieldTable.cpp @@ -20,6 +20,7 @@ */ #include <iostream> #include <algorithm> +#include "qpid/sys/alloca.h" #include "qpid/framing/Array.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/FieldValue.h" diff --git a/cpp/src/tests/TimerTest.cpp b/cpp/src/tests/TimerTest.cpp index 6a0a196f4e..fc5004dcb0 100644 --- a/cpp/src/tests/TimerTest.cpp +++ b/cpp/src/tests/TimerTest.cpp @@ -81,6 +81,8 @@ class TestTask : public TimerTask uint64_t difference = _abs64(expected - actual); #elif defined(_WIN32) uint64_t difference = labs(expected - actual); +#elif defined(__SUNPRO_CC) + uint64_t difference = llabs(expected - actual); #else uint64_t difference = abs(expected - actual); #endif |