summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qpid/cpp/configure.ac3
-rw-r--r--qpid/cpp/src/qpid/Url.cpp69
2 files changed, 1 insertions, 71 deletions
diff --git a/qpid/cpp/configure.ac b/qpid/cpp/configure.ac
index 81f46870fe..b4bfb2f402 100644
--- a/qpid/cpp/configure.ac
+++ b/qpid/cpp/configure.ac
@@ -163,9 +163,6 @@ AC_SUBST(DOWNLOAD_URL)
AC_CHECK_HEADERS([boost/shared_ptr.hpp uuid/uuid.h],,
AC_MSG_ERROR([Missing required header files.]))
-# Link with whichever variant of libboost_thread is available.
-AC_SEARCH_LIBS([_ZN5boost6thread4joinEv],[boost_thread-mt boost_thread],,[AC_MSG_ERROR([No boost thread library found])])
-
# Check for optional cluster requirements.
tmp_LIBS=$LIBS
LDFLAGS="$LDFLAGS -L/usr/lib/openais -L/usr/lib64/openais"
diff --git a/qpid/cpp/src/qpid/Url.cpp b/qpid/cpp/src/qpid/Url.cpp
index d0aa28ab0f..b7d6f76a94 100644
--- a/qpid/cpp/src/qpid/Url.cpp
+++ b/qpid/cpp/src/qpid/Url.cpp
@@ -22,22 +22,12 @@
#include "qpid/sys/SystemInfo.h"
#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>
#include <boost/lexical_cast.hpp>
-#include <sstream>
-#include <map>
#include <algorithm>
-#include <limits>
-#include <stdio.h>
-#include <errno.h>
+#include <string.h>
-using namespace boost::spirit;
using namespace std;
using boost::lexical_cast;
@@ -192,63 +182,6 @@ class UrlParser {
const string UrlParser::LOCALHOST("127.0.0.1");
-// Addition to boost::spirit parsers: accept any character from a
-// string. Vastly more compile-time-efficient than long rules of the
-// form: ch_p('x') | ch_p('y') |...
-//
-struct ch_in : public char_parser<ch_in> {
- ch_in(const string& chars_) : chars(chars_) {}
- bool test(char ch_) const {
- return chars.find(ch_) != string::npos;
- }
- string chars;
-};
-
-inline ch_in ch_in_p(const string& chars) {
- return ch_in(chars);
-}
-
-/** Grammar for AMQP URLs. */
-struct UrlGrammar : public grammar<UrlGrammar>
-{
- Url& addr;
-
- UrlGrammar(Url& addr_) : addr(addr_) {}
-
- template <class ScannerT>
- struct definition {
- TcpAddress tcp;
-
- definition(const UrlGrammar& self)
- {
- first = eps_p[clear_a(self.addr)] >> amqp_url;
- amqp_url = str_p("amqp:") >> prot_addr_list >>
- !(str_p("/") >> !parameters);
- prot_addr_list = prot_addr % ',';
- prot_addr = tcp_prot_addr; // Extend for TLS etc.
-
- // TCP addresses
- tcp_prot_addr = tcp_id >> tcp_addr[push_back_a(self.addr, tcp)];
- tcp_id = !str_p("tcp:");
- tcp_addr = !(host[assign_a(tcp.host)] >> !(':' >> port));
-
- // See http://www.apps.ietf.org/rfc/rfc3986.html#sec-A
- // for real host grammar. Shortcut:
- port = uint_parser<uint16_t>()[assign_a(tcp.port)];
- host = *( unreserved | pct_encoded );
- unreserved = alnum_p | ch_in_p("-._~");
- pct_encoded = "%" >> xdigit_p >> xdigit_p;
- parameters = *anychar_p >> end_p; // Ignore, not used yet.
- }
-
- const rule<ScannerT>& start() const { return first; }
-
- rule<ScannerT> first, amqp_url, prot_addr_list, prot_addr,
- tcp_prot_addr, tcp_id, tcp_addr, host, port,
- unreserved, pct_encoded, parameters;
- };
-};
-
void Url::parse(const char* url) {
parseNoThrow(url);
if (empty())