Skip to content

Commit 6ec03b6

Browse files
committed
[http_refactor] Updated sources and build scripts to ensure full compilation on Linux (GCC 4.6)
1 parent 822b9fc commit 6ec03b6

File tree

26 files changed

+252
-153
lines changed

26 files changed

+252
-153
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ if (OPENSSL_FOUND)
2020
add_definitions(-DBOOST_NETWORK_ENABLE_HTTPS)
2121
endif()
2222

23+
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
24+
INCLUDE(CheckCXXCompilerFlag)
25+
CHECK_CXX_COMPILER_FLAG(-std=c++0x HAVE_STD0X)
26+
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STD11)
27+
28+
if (NOT HAVE_STD0X)
29+
if (NOT HAVE_STD11)
30+
message(FATAL_ERROR "No advanced standard C++ support (-std=c++0x and -std=c++11 not defined).")
31+
endif()
32+
endif()
33+
endif()
34+
2335
if (Boost_FOUND)
2436
if (MSVC)
2537
add_definitions(-D_SCL_SECURE_NO_WARNINGS)

boost/network/message/message_base.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,4 @@ struct message_base {
4040

4141
} /* boost */
4242

43-
#ifdef BOOST_NETWORK_NO_LIB
44-
#include <boost/network/message_base.ipp>
45-
#endif
46-
4743
#endif /* BOOST_NETWORK_MESSAGE_BASE_HPP_20110910 */

boost/network/protocol/http/client/connection/simple_connection_factory.ipp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <boost/network/protocol/http/client/options.hpp>
1515
#include <boost/network/detail/debug.hpp>
1616
#ifdef BOOST_NETWORK_DEBUG
17-
#include <boost/network/uri/uri_io.hpp>
17+
#include <network/uri_io.hpp>
1818
#endif
1919
#include <boost/algorithm/string/case_conv.hpp>
2020

@@ -35,9 +35,9 @@ struct simple_connection_factory_pimpl {
3535
request_base const & request,
3636
client_options const & options) {
3737
BOOST_NETWORK_MESSAGE("simple_connection_factory_pimpl::create_connection(...)");
38-
uri::uri uri_ = http::uri(request);
38+
::network::uri uri_ = http::uri(request);
3939
BOOST_NETWORK_MESSAGE("destination: " << uri_);
40-
bool https = to_lower_copy(scheme(uri_)) == "https";
40+
bool https = to_lower_copy(::network::scheme(uri_)) == "https";
4141
shared_ptr<client_connection> conn_;
4242
conn_.reset(new (std::nothrow) http_async_connection(
4343
res_delegate_factory_->create_resolver_delegate(service, options.cache_resolved()),
@@ -83,9 +83,9 @@ simple_connection_factory::~simple_connection_factory() {
8383
}
8484

8585
} /* http */
86-
86+
8787
} /* network */
88-
88+
8989
} /* boost */
9090

9191
#endif /* BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CONNECTION_SIMPLE_CONNECTION_FACTORY_20111120 */

boost/network/protocol/http/impl/request.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <boost/fusion/sequence/intrinsic/at_key.hpp>
1616
#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
1717

18-
#include <boost/network/uri/uri.hpp>
18+
#include <network/uri/uri.hpp>
1919
#include <boost/network/traits/vector.hpp>
2020
#include <boost/network/constants.hpp>
2121

@@ -51,7 +51,7 @@ namespace http {
5151
struct basic_request : public basic_message<Tag>
5252
{
5353

54-
mutable boost::network::uri::uri uri_;
54+
mutable network::uri uri_;
5555
typedef basic_message<Tag> base_type;
5656

5757
public:
@@ -63,15 +63,15 @@ namespace http {
6363
: uri_(uri_)
6464
{ }
6565

66-
explicit basic_request(boost::network::uri::uri const & uri_)
66+
explicit basic_request(network::uri const & uri_)
6767
: uri_(uri_)
6868
{ }
6969

7070
void uri(string_type const & new_uri) {
7171
uri_ = new_uri;
7272
}
7373

74-
void uri(boost::network::uri::uri const & new_uri) {
74+
void uri(network::uri const & new_uri) {
7575
uri_ = new_uri;
7676
}
7777

@@ -130,7 +130,7 @@ namespace http {
130130
uri_ = new_uri;
131131
}
132132

133-
boost::network::uri::uri const & uri() const {
133+
network::uri const & uri() const {
134134
return uri_;
135135
}
136136

boost/network/protocol/http/message/modifiers/uri.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ inline void uri(request_base & request, std::string const & value) {
1616
request.set_uri(value);
1717
}
1818

19-
inline void uri(request_base & request, uri::uri const & value) {
19+
inline void uri(request_base & request, ::network::uri const & value) {
2020
request.set_uri(value);
2121
}
2222

boost/network/protocol/http/message/wrappers/anchor.ipp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
// http://www.boost.org/LICENSE_1_0.txt)
99

1010
#include <boost/network/protocol/http/message/wrappers/anchor.hpp>
11-
#include <boost/network/uri/uri.hpp>
11+
#include <network/uri.hpp>
1212

1313
namespace boost { namespace network { namespace http {
1414

1515
anchor_wrapper::anchor_wrapper(request_base const & request)
1616
: request_(request) {}
1717

1818
anchor_wrapper::operator std::string () const {
19-
uri::uri uri_;
19+
::network::uri uri_;
2020
request_.get_uri(uri_);
2121
return fragment(uri_);
2222
}

boost/network/protocol/http/message/wrappers/host.ipp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
// http://www.boost.org/LICENSE_1_0.txt)
99

1010
#include <boost/network/protocol/http/message/wrappers/host.hpp>
11-
#include <boost/network/uri/uri.hpp>
11+
#include <network/uri.hpp>
1212

1313
namespace boost { namespace network { namespace http {
1414

1515
host_wrapper::host_wrapper(request_base const & request)
1616
: request_(request) {}
1717

1818
host_wrapper::operator std::string () const {
19-
uri::uri uri_;
19+
::network::uri uri_;
2020
request_.get_uri(uri_);
2121
return host(uri_);
2222
}

boost/network/protocol/http/message/wrappers/path.ipp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
// http://www.boost.org/LICENSE_1_0.txt)
99

1010
#include <boost/network/protocol/http/message/wrappers/path.hpp>
11-
#include <boost/network/uri/uri.hpp>
11+
#include <network/uri.hpp>
1212

1313
namespace boost { namespace network { namespace http {
1414

1515
path_wrapper::path_wrapper(request_base const & request)
1616
: request_(request) {}
1717

1818
path_wrapper::operator std::string () const {
19-
uri::uri uri_;
19+
::network::uri uri_;
2020
request_.get_uri(uri_);
2121
return path(uri_);
2222
}

boost/network/protocol/http/message/wrappers/port.ipp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
// http://www.boost.org/LICENSE_1_0.txt)
99

1010
#include <boost/network/protocol/http/message/wrappers/port.hpp>
11-
#include <boost/network/uri/uri.hpp>
11+
#include <network/uri.hpp>
1212

1313
namespace boost { namespace network { namespace http {
1414

1515
port_wrapper::port_wrapper(request_base const & request)
1616
: request_(request) {}
1717

1818
port_wrapper::operator boost::uint16_t () const {
19-
uri::uri uri_;
19+
::network::uri uri_;
2020
request_.get_uri(uri_);
2121
optional<boost::uint16_t> optional_port = port_us(uri_);
2222
if (!optional_port) {
@@ -31,7 +31,7 @@ port_wrapper::operator boost::uint16_t () const {
3131
}
3232

3333
port_wrapper::operator optional<boost::uint16_t> () const {
34-
uri::uri uri_;
34+
::network::uri uri_;
3535
request_.get_uri(uri_);
3636
return port_us(uri_);
3737
}

boost/network/protocol/http/message/wrappers/query.ipp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
// http://www.boost.org/LICENSE_1_0.txt)
99

1010
#include <boost/network/protocol/http/message/wrappers/query.hpp>
11-
#include <boost/network/uri/uri.hpp>
11+
#include <network/uri.hpp>
1212

1313
namespace boost { namespace network { namespace http {
1414

1515
query_wrapper::query_wrapper(request_base const & request)
1616
: request_(request) {}
1717

1818
query_wrapper::operator std::string () const {
19-
uri::uri uri_;
19+
::network::uri uri_;
2020
request_.get_uri(uri_);
2121
return query(uri_);
2222
}

0 commit comments

Comments
 (0)