Author: aconway
Date: Thu Oct 16 07:41:16 2008
New Revision: 705257
URL: http://svn.apache.org/viewvc?rev=705257&view=rev
Log:
Compile boost.spirit library in thread-safe mode.
Modified:
incubator/qpid/trunk/qpid/cpp/src/Makefile.am
incubator/qpid/trunk/qpid/cpp/src/qpid/Url.cpp
Modified: incubator/qpid/trunk/qpid/cpp/src/Makefile.am
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/Makefile.am?rev=705257&r1=705256&r2=705257&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/src/Makefile.am Thu Oct 16 07:41:16 2008
@@ -216,6 +216,7 @@
libqpidcommon_la_LIBADD = \
-lboost_program_options \
-lboost_filesystem \
+ -lboost_thread-mt \
-luuid \
$(LIB_DLOPEN) \
$(LIB_CLOCK_GETTIME)
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/Url.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/Url.cpp?rev=705257&r1=705256&r2=705257&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/Url.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/Url.cpp Thu Oct 16 07:41:16 2008
@@ -23,6 +23,8 @@
#include "qpid/sys/StrError.h"
#include <limits.h> // NB: must be before boost/spirit headers.
+#define BOOST_SPIRIT_THREADSAFE
+
#include <boost/spirit.hpp>
#include <boost/spirit/actor.hpp>
@@ -43,7 +45,7 @@
std::istream& operator>>(std::istream&, const TcpAddress&);
Url Url::getHostNameUrl(uint16_t port) {
- TcpAddress address("", port);
+ TcpAddress address(std::string(), port);
if (!sys::SystemInfo::getLocalHostname(address))
throw InvalidUrl(QPID_MSG("Cannot get host name: " <<
qpid::sys::strError(errno)));
return Url(address);