qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shus...@apache.org
Subject svn commit: r1657338 - in /qpid/trunk/qpid/cpp: ./ src/ src/qpid/ src/qpid/amqp/ src/qpid/broker/ src/qpid/broker/amqp/ src/qpid/store/ src/qpid/sys/ src/qpid/sys/FreeBSD/ src/qpid/sys/posix/ src/qpid/types/ src/tests/
Date Wed, 04 Feb 2015 17:37:20 GMT
Author: shuston
Date: Wed Feb  4 17:37:19 2015
New Revision: 1657338

URL: http://svn.apache.org/r1657338
Log:
Apply patches for QPID-6312 to get Qpid building on AIX with XL C++ 13.1

Modified:
    qpid/trunk/qpid/cpp/CMakeLists.txt
    qpid/trunk/qpid/cpp/INSTALL
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/config.h.cmake
    qpid/trunk/qpid/cpp/src/qpid/InlineAllocator.h
    qpid/trunk/qpid/cpp/src/qpid/Options.cpp
    qpid/trunk/qpid/cpp/src/qpid/RangeSet.h
    qpid/trunk/qpid/cpp/src/qpid/RefCounted.h
    qpid/trunk/qpid/cpp/src/qpid/SessionId.h
    qpid/trunk/qpid/cpp/src/qpid/amqp/MapEncoder.h
    qpid/trunk/qpid/cpp/src/qpid/broker/QueueRegistry.h
    qpid/trunk/qpid/cpp/src/qpid/broker/TopicKeyNode.h
    qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Filter.h
    qpid/trunk/qpid/cpp/src/qpid/store/MessageStorePlugin.h
    qpid/trunk/qpid/cpp/src/qpid/sys/FreeBSD/uuid.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/Thread.h
    qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/posix/Thread.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/unordered_map.h
    qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp
    qpid/trunk/qpid/cpp/src/tests/TimerTest.cpp

Modified: qpid/trunk/qpid/cpp/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/CMakeLists.txt?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/CMakeLists.txt Wed Feb  4 17:37:19 2015
@@ -182,6 +182,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL SunPr
   set (HIDE_SYMBOL_FLAGS "")
 endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
 
+# XL is IBM XL C/C++
+if (CMAKE_CXX_COMPILER_ID MATCHES XL)
+  set (COMPILER_FLAGS "-qtls -qrtti")
+endif (CMAKE_CXX_COMPILER_ID MATCHES XL)
+
 if (CMAKE_SYSTEM_NAME STREQUAL Windows)
   # Allow MSVC user to select 'WinXP-SP3/Windows Server 2003' as build target version
   set (win32_winnt_default OFF)

Modified: qpid/trunk/qpid/cpp/INSTALL
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/INSTALL?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/INSTALL (original)
+++ qpid/trunk/qpid/cpp/INSTALL Wed Feb  4 17:37:19 2015
@@ -91,7 +91,7 @@ Or if you have only have a command line
 
 2.1 Building as C++11 (Experimental)
 ====================================
-Currently the Qpoid project uses C++ that conforms to the C++03 standard, as currently
+Currently the Qpid project uses C++ that conforms to the C++03 standard, as currently
 this is the C++ standard that is supported the most widely, so any new code must also
 compile as C++03. As an experiment (and to support a few extra platforms) the Qpid code
 will also now build as C++11.
@@ -141,6 +141,23 @@ If you want to use the ports version of
 Which will allow cmake to find libraries installed in /usr/local (which is where cyrus-sasl
gets
 installed by ports).
 
+2.4 Building on AIX
+===================
+Qpid has been tested on AIX 7.1 with XL C++ 13.1 and Boost 1.55.0. The
+thread-using variant of the compiler must be used but it isn't the default
+picked up by cmake. Thus, the compiler must be specified at cmake time.
+For example (assuming PATH includes the compiler binaries):
+
+ # CXX=xlC_r CC=cc_r cmake ..
+
+Warnings from Boost header files are expected and can be ignored.
+
+It is normal to see (lots of) multiply-defined symbol warnings when linking
+the shared libraries built as part of Qpid.
+
+The mktemp package must be installed separately in order to execute the
+Qpid test suite.
+
 3. Building a Repository Working Copy
 =====================================
 To get the source code from the subversion repository (trunk) do:

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Wed Feb  4 17:37:19 2015
@@ -42,6 +42,7 @@ include(CheckIncludeFiles)
 include(CheckIncludeFileCXX)
 include(CheckLibraryExists)
 include(CheckSymbolExists)
+include(CheckSizeTNativeType)
 
 find_package(PkgConfig)
 find_package(Ruby)
@@ -350,6 +351,8 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL Windo
   mark_as_advanced(QPID_POLLER)
 endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
 
+check_size_t_native_type (QPID_SIZE_T_NATIVE)
+
 option(BUILD_SASL "Build with Cyrus SASL support" ${SASL_FOUND})
 if (BUILD_SASL)
   if (NOT SASL_FOUND)
@@ -684,6 +687,12 @@ else (CMAKE_SYSTEM_NAME STREQUAL Windows
     )
   endif (CMAKE_SYSTEM_NAME STREQUAL SunOS)
 
+  if (CMAKE_SYSTEM_NAME STREQUAL AIX)
+    set (qpid_system_module
+      qpid/sys/aix/SystemInfo.cpp
+    )
+  endif (CMAKE_SYSTEM_NAME STREQUAL AIX)
+
   if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
     # -lmalloc needed for mallinfo.
     set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lmalloc")
@@ -1145,6 +1154,9 @@ set_target_properties (qpidbroker PROPER
                        VERSION ${qpidbroker_version}
                        SOVERSION ${qpidbroker_version_major}
                        COMPILE_DEFINITIONS _IN_QPID_BROKER)
+if (CMAKE_CXX_COMPILER_ID MATCHES XL)
+  set_target_properties (qpidbroker PROPERTIES LINK_FLAGS -Wl,-bbigtoc)
+endif (CMAKE_CXX_COMPILER_ID MATCHES XL)
 
 if (MSVC)
   set_target_properties (qpidbroker PROPERTIES COMPILE_FLAGS /wd4290)

Modified: qpid/trunk/qpid/cpp/src/config.h.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/config.h.cmake?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/config.h.cmake (original)
+++ qpid/trunk/qpid/cpp/src/config.h.cmake Wed Feb  4 17:37:19 2015
@@ -56,6 +56,7 @@
 #cmakedefine HAVE_SYS_SDT_H ${HAVE_SYS_SDT_H}
 #cmakedefine HAVE_LOG_AUTHPRIV
 #cmakedefine HAVE_LOG_FTP
+#cmakedefine QPID_SIZE_T_NATIVE
 #cmakedefine HAVE_PROTON_TRACER
 #cmakedefine USE_PROTON_TRANSPORT_CONDITION
 #cmakedefine HAVE_PROTON_EVENTS

Modified: qpid/trunk/qpid/cpp/src/qpid/InlineAllocator.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/InlineAllocator.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/InlineAllocator.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/InlineAllocator.h Wed Feb  4 17:37:19 2015
@@ -47,7 +47,7 @@ class InlineAllocator : public BaseAlloc
     InlineAllocator() : allocated(false) {}
     InlineAllocator(const InlineAllocator& x) : BaseAllocator(x), allocated(false) {}
 
-    pointer allocate(size_type n) {
+    pointer allocate(size_type n, std::allocator<void>::const_pointer = 0) {
         if (n <= Max && !allocated) {
             allocated=true;
             return reinterpret_cast<value_type*>(address());

Modified: qpid/trunk/qpid/cpp/src/qpid/Options.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/Options.cpp?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/Options.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/Options.cpp Wed Feb  4 17:37:19 2015
@@ -16,6 +16,7 @@
  *
  */
 
+#include "config.h"
 #include "qpid/Options.h"
 #include "qpid/OptionsTemplates.h"
 #include "qpid/Exception.h"
@@ -145,6 +146,9 @@ template QPID_COMMON_EXTERN po::value_se
 template QPID_COMMON_EXTERN po::value_semantic* create_value(uint16_t& val, const std::string&
arg);
 template QPID_COMMON_EXTERN po::value_semantic* create_value(uint32_t& val, const std::string&
arg);
 template QPID_COMMON_EXTERN po::value_semantic* create_value(uint64_t& val, const std::string&
arg);
+#ifdef QPID_SIZE_T_NATIVE
+template QPID_COMMON_EXTERN po::value_semantic* create_value(size_t& val, const std::string&
arg);
+#endif
 template QPID_COMMON_EXTERN po::value_semantic* create_value(double& val, const std::string&
arg);
 
 template QPID_COMMON_EXTERN po::value_semantic* create_value(string& val, const std::string&
arg);

Modified: qpid/trunk/qpid/cpp/src/qpid/RangeSet.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/RangeSet.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/RangeSet.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/RangeSet.h Wed Feb  4 17:37:19 2015
@@ -96,9 +96,9 @@ class Range {
  */
 template <class T>
 class RangeSet
-    : boost::additive1<RangeSet<T>,
-                       boost::additive2<RangeSet<T>, Range<T>,
-                                        boost::additive2<RangeSet<T>, T> >
>
+    : private boost::additive1<RangeSet<T>,
+                               boost::additive2<RangeSet<T>, Range<T>,
+                                                boost::additive2<RangeSet<T>, T>
> >
 {
     typedef InlineVector<Range<T>, 3> Ranges; // TODO aconway 2008-04-21: what's
the optimial inlined value?
 

Modified: qpid/trunk/qpid/cpp/src/qpid/RefCounted.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/RefCounted.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/RefCounted.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/RefCounted.h Wed Feb  4 17:37:19 2015
@@ -33,7 +33,7 @@ namespace qpid {
  * to the class that has mixed this in not the class itself (as that would sidestep
  * the reference counting)
  */
-class RefCounted : boost::noncopyable {
+class RefCounted : private boost::noncopyable {
     mutable boost::detail::atomic_count count;
 
 public:

Modified: qpid/trunk/qpid/cpp/src/qpid/SessionId.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/SessionId.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/SessionId.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/SessionId.h Wed Feb  4 17:37:19 2015
@@ -39,7 +39,7 @@ namespace qpid {
  * The name must be unique among sessions with the same authentication
  * principal.
  */
-class SessionId : boost::totally_ordered1<SessionId> {
+class SessionId : private boost::totally_ordered1<SessionId> {
     std::string userId;
     std::string name;
   public:

Modified: qpid/trunk/qpid/cpp/src/qpid/amqp/MapEncoder.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/amqp/MapEncoder.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/amqp/MapEncoder.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/amqp/MapEncoder.h Wed Feb  4 17:37:19 2015
@@ -31,7 +31,7 @@ struct Descriptor;
 /**
  * Encode map like data
  */
-class MapEncoder : public MapHandler, Encoder
+class MapEncoder : public MapHandler, private Encoder
 {
   public:
     MapEncoder(char* data, size_t size);

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/QueueRegistry.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/QueueRegistry.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/QueueRegistry.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/QueueRegistry.h Wed Feb  4 17:37:19 2015
@@ -44,7 +44,7 @@ class OwnershipToken;
  * are deleted when and only when they are no longer in use.
  *
  */
-class QueueRegistry : QueueFactory {
+class QueueRegistry : private QueueFactory {
   public:
     QPID_BROKER_EXTERN QueueRegistry(Broker* b = 0);
     QPID_BROKER_EXTERN ~QueueRegistry();

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/TopicKeyNode.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/TopicKeyNode.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/TopicKeyNode.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/TopicKeyNode.h Wed Feb  4 17:37:19 2015
@@ -166,7 +166,7 @@ class QPID_BROKER_CLASS_EXTERN TopicKeyN
     bool isHash;
 
     // children
-    typedef std::map<const std::string, typename TopicKeyNode::shared_ptr> ChildMap;
+    typedef std::map<std::string, typename TopicKeyNode::shared_ptr> ChildMap;
     ChildMap childTokens;
     typename TopicKeyNode::shared_ptr starChild;  // "*" subtree
     typename TopicKeyNode::shared_ptr hashChild;  // "#" subtree

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Filter.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Filter.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Filter.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Filter.h Wed Feb  4 17:37:19 2015
@@ -37,7 +37,7 @@ struct QueueSettings;
 namespace amqp {
 class Outgoing;
 
-class Filter : qpid::amqp::MapReader
+class Filter : private qpid::amqp::MapReader
 {
   public:
     Filter();

Modified: qpid/trunk/qpid/cpp/src/qpid/store/MessageStorePlugin.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/store/MessageStorePlugin.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/store/MessageStorePlugin.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/store/MessageStorePlugin.h Wed Feb  4 17:37:19 2015
@@ -267,7 +267,7 @@ class MessageStorePlugin :
     };
     StoreOptions options;
 
-    typedef std::map<const std::string, StorageProvider*> ProviderMap;
+    typedef std::map<std::string, StorageProvider*> ProviderMap;
     ProviderMap providers;
     ProviderMap::const_iterator provider;
 

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/FreeBSD/uuid.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/FreeBSD/uuid.cpp?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/FreeBSD/uuid.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/FreeBSD/uuid.cpp Wed Feb  4 17:37:19 2015
@@ -40,5 +40,5 @@ void uuid_generate (uint8_t out[qpid::sy
     out[7] = (uuid.time_hi_and_version & 0x00ff);
     out[8] = uuid.clock_seq_hi_and_reserved;
     out[9] = uuid.clock_seq_low;
-    ::memcpy(&out[10], &uuid.node, _UUID_NODE_LEN);
+    ::memcpy(&out[10], &uuid.node, sizeof(uuid.node));
 }

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/Thread.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/Thread.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/Thread.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/Thread.h Wed Feb  4 17:37:19 2015
@@ -34,6 +34,8 @@
 #  define QPID_TSS __thread
 #elif defined (__SUNPRO_CC)
 #  define QPID_TSS __thread
+#elif defined (__IBMCPP__)
+#  define QPID_TSS __thread
 #else
 #  error "Dont know how to define QPID_TSS for this platform"
 #endif

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp Wed Feb  4 17:37:19 2015
@@ -93,7 +93,7 @@ private:
 AsynchAcceptor::AsynchAcceptor(const Socket& s,
                                AsynchAcceptor::Callback callback) :
     acceptedCallback(callback),
-    handle(s, boost::bind(&AsynchAcceptor::readable, this, _1), 0, 0),
+    handle((const IOHandle&)s, boost::bind(&AsynchAcceptor::readable, this, _1),
0, 0),
     socket(s) {
 
     s.setNonblocking();
@@ -167,7 +167,7 @@ AsynchConnector::AsynchConnector(const S
                                  const std::string& port,
                                  ConnectedCallback connCb,
                                  FailedCallback failCb) :
-    DispatchHandle(s,
+    DispatchHandle((const IOHandle&)s,
                    0,
                    boost::bind(&AsynchConnector::connComplete, this, _1),
                    boost::bind(&AsynchConnector::connComplete, this, _1)),
@@ -308,7 +308,7 @@ AsynchIO::AsynchIO(const Socket& s,
                    ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb,
                    ClosedCallback cCb, BuffersEmptyCallback eCb, IdleCallback iCb) :
 
-    DispatchHandle(s, 
+    DispatchHandle((const IOHandle&)s,
                    boost::bind(&AsynchIO::readable, this, _1),
                    boost::bind(&AsynchIO::writeable, this, _1),
                    boost::bind(&AsynchIO::disconnected, this, _1)),

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/posix/Thread.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Thread.cpp?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/posix/Thread.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/posix/Thread.cpp Wed Feb  4 17:37:19 2015
@@ -59,7 +59,7 @@ Thread::operator bool() {
 }
 
 bool Thread::operator==(const Thread& t) const {
-    return ::pthread_equal(impl->thread, t.impl->thread) != 0;
+    return pthread_equal(impl->thread, t.impl->thread) != 0;
 }
 
 bool Thread::operator!=(const Thread& t) const {

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp Wed Feb  4 17:37:19 2015
@@ -24,6 +24,7 @@
 #include "qpid/sys/Time.h"
 #include <ostream>
 #include <istream>
+#include <sstream>
 #include <time.h>
 #include <stdio.h>
 #include <sys/time.h>
@@ -106,13 +107,14 @@ std::istream& operator>>(std::istream& i
     if (i.eof() || std::isspace(i.peek())) // No suffix
         d = int64_t(number*TIME_SEC);
     else {
-        std::string suffix;
-        i >> suffix;
+        std::stringbuf suffix;
+        i >> &suffix;
         if (i.fail()) return i;
-        if (suffix.compare("s") == 0) d = int64_t(number*TIME_SEC);
-        else if (suffix.compare("ms") == 0) d = int64_t(number*TIME_MSEC);
-        else if (suffix.compare("us") == 0) d = int64_t(number*TIME_USEC);
-        else if (suffix.compare("ns") == 0) d = int64_t(number*TIME_NSEC);
+	std::string suffix_str = suffix.str();
+        if (suffix_str.compare("s") == 0) d = int64_t(number*TIME_SEC);
+        else if (suffix_str.compare("ms") == 0) d = int64_t(number*TIME_MSEC);
+        else if (suffix_str.compare("us") == 0) d = int64_t(number*TIME_USEC);
+        else if (suffix_str.compare("ns") == 0) d = int64_t(number*TIME_NSEC);
         else i.setstate(std::ios::failbit);
     }
     return i;

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/unordered_map.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/unordered_map.h?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/unordered_map.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/unordered_map.h Wed Feb  4 17:37:19 2015
@@ -23,7 +23,7 @@
 
 #if defined(_MSC_VER) || defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
 #  include <unordered_map>
-#elif defined(__SUNPRO_CC)
+#elif defined(__SUNPRO_CC) || defined(__IBMCPP__)
 #  include <boost/tr1/unordered_map.hpp>
 #else
 #  include <tr1/unordered_map>

Modified: qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/types/Variant.cpp Wed Feb  4 17:37:19 2015
@@ -188,13 +188,13 @@ bool caseInsensitiveMatch(const std::str
     return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin(), &same_char);
 }
 
-const std::string TRUE("True");
-const std::string FALSE("False");
+const std::string TRUE_STRING("True");
+const std::string FALSE_STRING("False");
 
 bool toBool(const std::string& s)
 {
-    if (caseInsensitiveMatch(s, TRUE)) return true;
-    if (caseInsensitiveMatch(s, FALSE)) return false;
+    if (caseInsensitiveMatch(s, TRUE_STRING)) return true;
+    if (caseInsensitiveMatch(s, FALSE_STRING)) return false;
     try { return boost::lexical_cast<int>(s); } catch(const boost::bad_lexical_cast&)
{}
     throw InvalidConversion(QPID_MSG("Cannot convert " << s << " to bool"));
 }
@@ -494,7 +494,7 @@ std::string VariantImpl::asString() cons
 {
     switch(type) {
       case VAR_VOID: return EMPTY;
-      case VAR_BOOL: return value.b ? TRUE : FALSE;
+      case VAR_BOOL: return value.b ? TRUE_STRING : FALSE_STRING;
       case VAR_UINT8: return boost::lexical_cast<std::string>((int) value.ui8);
       case VAR_UINT16: return boost::lexical_cast<std::string>(value.ui16);
       case VAR_UINT32: return boost::lexical_cast<std::string>(value.ui32);

Modified: qpid/trunk/qpid/cpp/src/tests/TimerTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/TimerTest.cpp?rev=1657338&r1=1657337&r2=1657338&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/TimerTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/TimerTest.cpp Wed Feb  4 17:37:19 2015
@@ -82,7 +82,7 @@ class TestTask : public TimerTask
         uint64_t difference = _abs64(expected - actual);
 #elif defined(_WIN32)
         uint64_t difference = labs(expected - actual);
-#elif defined(__SUNPRO_CC)
+#elif defined(__SUNPRO_CC) || defined (__IBMCPP__)
         uint64_t difference = llabs(expected - actual);
 #else
         uint64_t difference = abs(expected - actual);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message