Author: astitcher
Date: Tue Jul 29 13:27:08 2008
New Revision: 680830
URL: http://svn.apache.org/viewvc?rev=680830&view=rev
Log:
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.
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Fork.h
incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Socket.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/check.h
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp?rev=680830&r1=680829&r2=680830&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
(original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp Tue
Jul 29 13:27:08 2008
@@ -23,6 +23,7 @@
#include "ManagementAgentImpl.h"
#include <list>
#include <unistd.h>
+#include <string.h>
using namespace qpid::client;
using namespace qpid::framing;
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp?rev=680830&r1=680829&r2=680830&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp Tue Jul 29
13:27:08 2008
@@ -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 <iostream>
#include <memory>
+#include <stdlib.h>
#if HAVE_SASL
#include <sasl/sasl.h>
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp?rev=680830&r1=680829&r2=680830&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp Tue Jul 29
13:27:08 2008
@@ -31,6 +31,7 @@
#include <sys/socket.h>
#include <signal.h>
#include <errno.h>
+#include <string.h>
#include <boost/bind.hpp>
@@ -133,7 +134,8 @@
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)));
}
}
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Fork.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Fork.h?rev=680830&r1=680829&r2=680830&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Fork.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Fork.h Tue Jul 29 13:27:08
2008
@@ -20,6 +20,7 @@
*/
#include <string>
+#include <sys/types.h>
namespace qpid {
namespace sys {
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Socket.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Socket.cpp?rev=680830&r1=680829&r2=680830&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Socket.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Socket.cpp Tue Jul 29
13:27:08 2008
@@ -257,7 +257,7 @@
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
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp?rev=680830&r1=680829&r2=680830&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/Time.cpp Tue Jul 29
13:27:08 2008
@@ -24,6 +24,7 @@
#include "qpid/sys/Time.h"
#include <ostream>
#include <time.h>
+#include <stdio.h>
#include <sys/time.h>
namespace qpid {
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/check.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/check.h?rev=680830&r1=680829&r2=680830&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/check.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/check.h Tue Jul 29
13:27:08 2008
@@ -25,6 +25,7 @@
#include "qpid/Exception.h"
#include <cerrno>
#include <assert.h>
+#include <stdio.h>
#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*/