From eaa71dc56b0ec9bddc24709a2ab8d1b6e3d13e9c Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 29 Jul 2008 20:27:08 +0000 Subject: QPID-1198 (Partial): Missing header files that are really needed Patches from Manuel Teira. Compilation works on Linux due to implicit header inclusions but fails on Solaris Some tightening up of std and global namespace use. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@680830 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/agent/ManagementAgentImpl.cpp | 1 + cpp/src/qpid/broker/Broker.cpp | 3 ++- cpp/src/qpid/sys/posix/AsynchIO.cpp | 4 +++- cpp/src/qpid/sys/posix/Fork.h | 1 + cpp/src/qpid/sys/posix/Socket.cpp | 2 +- cpp/src/qpid/sys/posix/Time.cpp | 1 + cpp/src/qpid/sys/posix/check.h | 3 ++- 7 files changed, 11 insertions(+), 4 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/cpp/src/qpid/agent/ManagementAgentImpl.cpp index 5894aad404..5cff0fcd3c 100644 --- a/cpp/src/qpid/agent/ManagementAgentImpl.cpp +++ b/cpp/src/qpid/agent/ManagementAgentImpl.cpp @@ -23,6 +23,7 @@ #include "ManagementAgentImpl.h" #include #include +#include using namespace qpid::client; using namespace qpid::framing; diff --git a/cpp/src/qpid/broker/Broker.cpp b/cpp/src/qpid/broker/Broker.cpp index f5a829593e..ae24283651 100644 --- a/cpp/src/qpid/broker/Broker.cpp +++ b/cpp/src/qpid/broker/Broker.cpp @@ -29,10 +29,10 @@ #include "RecoveryManagerImpl.h" #include "TopicExchange.h" #include "Link.h" + #include "qpid/management/PackageQpid.h" #include "qpid/management/ManagementExchange.h" #include "qpid/management/ArgsBrokerEcho.h" - #include "qpid/log/Statement.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/ProtocolInitiation.h" @@ -51,6 +51,7 @@ #include #include +#include #if HAVE_SASL #include diff --git a/cpp/src/qpid/sys/posix/AsynchIO.cpp b/cpp/src/qpid/sys/posix/AsynchIO.cpp index 58c7800514..d464ec826f 100644 --- a/cpp/src/qpid/sys/posix/AsynchIO.cpp +++ b/cpp/src/qpid/sys/posix/AsynchIO.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -133,7 +134,8 @@ void AsynchConnector::connComplete(DispatchHandle& h) connCallback(socket); DispatchHandle::doDelete(); } else { - failure(errCode, std::string(strerror(errCode))); + // TODO: This need to be fixed as strerror isn't thread safe + failure(errCode, std::string(::strerror(errCode))); } } diff --git a/cpp/src/qpid/sys/posix/Fork.h b/cpp/src/qpid/sys/posix/Fork.h index d6fe862ee7..698c61ed30 100644 --- a/cpp/src/qpid/sys/posix/Fork.h +++ b/cpp/src/qpid/sys/posix/Fork.h @@ -20,6 +20,7 @@ */ #include +#include namespace qpid { namespace sys { diff --git a/cpp/src/qpid/sys/posix/Socket.cpp b/cpp/src/qpid/sys/posix/Socket.cpp index d4de1741b1..c742b08c64 100644 --- a/cpp/src/qpid/sys/posix/Socket.cpp +++ b/cpp/src/qpid/sys/posix/Socket.cpp @@ -257,7 +257,7 @@ std::string Socket::getLocalAddress() const uint16_t Socket::getLocalPort() const { - return atoi(getService(impl->fd, true).c_str()); + return std::atoi(getService(impl->fd, true).c_str()); } uint16_t Socket::getRemotePort() const diff --git a/cpp/src/qpid/sys/posix/Time.cpp b/cpp/src/qpid/sys/posix/Time.cpp index 09627cdc6b..8aa9fd9946 100644 --- a/cpp/src/qpid/sys/posix/Time.cpp +++ b/cpp/src/qpid/sys/posix/Time.cpp @@ -24,6 +24,7 @@ #include "qpid/sys/Time.h" #include #include +#include #include namespace qpid { diff --git a/cpp/src/qpid/sys/posix/check.h b/cpp/src/qpid/sys/posix/check.h index aa93c37205..32fdc48077 100644 --- a/cpp/src/qpid/sys/posix/check.h +++ b/cpp/src/qpid/sys/posix/check.h @@ -25,6 +25,7 @@ #include "qpid/Exception.h" #include #include +#include #define QPID_POSIX_ERROR(ERRNO) qpid::Exception(QPID_MSG(qpid::strError(ERRNO))) @@ -41,7 +42,7 @@ #define QPID_POSIX_ASSERT_THROW_IF(ERRNO) QPID_POSIX_THROW_IF(ERRNO) #else #define QPID_POSIX_ASSERT_THROW_IF(ERRNO) \ - do { int e=(ERRNO); if (e) { errno=e; perror(0); assert(0); } } while(0) + do { int e=(ERRNO); if (e) { errno=e; ::perror(0); assert(0); } } while(0) #endif #endif /*!_posix_check_h*/ -- cgit v1.2.1