diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/asio/ip/detail | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/asio/ip/detail')
3 files changed, 37 insertions, 31 deletions
diff --git a/3rdParty/Boost/src/boost/asio/ip/detail/endpoint.hpp b/3rdParty/Boost/src/boost/asio/ip/detail/endpoint.hpp index 04335ef..f171d58 100644 --- a/3rdParty/Boost/src/boost/asio/ip/detail/endpoint.hpp +++ b/3rdParty/Boost/src/boost/asio/ip/detail/endpoint.hpp @@ -2,7 +2,7 @@ // ip/detail/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -109,13 +109,13 @@ public: // Determine whether the endpoint is IPv4. bool is_v4() const { - return data_.base.sa_family == AF_INET; + return data_.base.sa_family == BOOST_ASIO_OS_DEF(AF_INET); } -#if !defined(BOOST_NO_IOSTREAM) +#if !defined(BOOST_ASIO_NO_IOSTREAM) // Convert to a string. BOOST_ASIO_DECL std::string to_string(boost::system::error_code& ec) const; -#endif // !defined(BOOST_NO_IOSTREAM) +#endif // !defined(BOOST_ASIO_NO_IOSTREAM) private: // The underlying IP socket address. diff --git a/3rdParty/Boost/src/boost/asio/ip/detail/impl/endpoint.ipp b/3rdParty/Boost/src/boost/asio/ip/detail/impl/endpoint.ipp index 24bfce2..4ad5046 100644 --- a/3rdParty/Boost/src/boost/asio/ip/detail/impl/endpoint.ipp +++ b/3rdParty/Boost/src/boost/asio/ip/detail/impl/endpoint.ipp @@ -2,7 +2,7 @@ // ip/detail/impl/endpoint.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,9 +17,9 @@ #include <boost/asio/detail/config.hpp> #include <cstring> -#if !defined(BOOST_NO_IOSTREAM) +#if !defined(BOOST_ASIO_NO_IOSTREAM) # include <sstream> -#endif // !defined(BOOST_NO_IOSTREAM) +#endif // !defined(BOOST_ASIO_NO_IOSTREAM) #include <boost/asio/detail/socket_ops.hpp> #include <boost/asio/detail/throw_error.hpp> #include <boost/asio/error.hpp> @@ -35,25 +35,25 @@ namespace detail { endpoint::endpoint() : data_() { - data_.v4.sin_family = AF_INET; + data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET); data_.v4.sin_port = 0; - data_.v4.sin_addr.s_addr = INADDR_ANY; + data_.v4.sin_addr.s_addr = BOOST_ASIO_OS_DEF(INADDR_ANY); } endpoint::endpoint(int family, unsigned short port_num) : data_() { using namespace std; // For memcpy. - if (family == PF_INET) + if (family == BOOST_ASIO_OS_DEF(AF_INET)) { - data_.v4.sin_family = AF_INET; + data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET); data_.v4.sin_port = boost::asio::detail::socket_ops::host_to_network_short(port_num); - data_.v4.sin_addr.s_addr = INADDR_ANY; + data_.v4.sin_addr.s_addr = BOOST_ASIO_OS_DEF(INADDR_ANY); } else { - data_.v6.sin6_family = AF_INET6; + data_.v6.sin6_family = BOOST_ASIO_OS_DEF(AF_INET6); data_.v6.sin6_port = boost::asio::detail::socket_ops::host_to_network_short(port_num); data_.v6.sin6_flowinfo = 0; @@ -76,23 +76,26 @@ endpoint::endpoint(const boost::asio::ip::address& addr, using namespace std; // For memcpy. if (addr.is_v4()) { - data_.v4.sin_family = AF_INET; + data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET); data_.v4.sin_port = boost::asio::detail::socket_ops::host_to_network_short(port_num); data_.v4.sin_addr.s_addr = boost::asio::detail::socket_ops::host_to_network_long( - addr.to_v4().to_ulong()); + static_cast<boost::asio::detail::u_long_type>( + addr.to_v4().to_ulong())); } else { - data_.v6.sin6_family = AF_INET6; + data_.v6.sin6_family = BOOST_ASIO_OS_DEF(AF_INET6); data_.v6.sin6_port = boost::asio::detail::socket_ops::host_to_network_short(port_num); data_.v6.sin6_flowinfo = 0; boost::asio::ip::address_v6 v6_addr = addr.to_v6(); boost::asio::ip::address_v6::bytes_type bytes = v6_addr.to_bytes(); memcpy(data_.v6.sin6_addr.s6_addr, bytes.data(), 16); - data_.v6.sin6_scope_id = v6_addr.scope_id(); + data_.v6.sin6_scope_id = + static_cast<boost::asio::detail::u_long_type>( + v6_addr.scope_id()); } } @@ -174,7 +177,7 @@ bool operator<(const endpoint& e1, const endpoint& e2) return e1.port() < e2.port(); } -#if !defined(BOOST_NO_IOSTREAM) +#if !defined(BOOST_ASIO_NO_IOSTREAM) std::string endpoint::to_string(boost::system::error_code& ec) const { std::string a = address().to_string(ec); @@ -191,7 +194,7 @@ std::string endpoint::to_string(boost::system::error_code& ec) const return tmp_os.str(); } -#endif // !defined(BOOST_NO_IOSTREAM) +#endif // !defined(BOOST_ASIO_NO_IOSTREAM) } // namespace detail } // namespace ip diff --git a/3rdParty/Boost/src/boost/asio/ip/detail/socket_option.hpp b/3rdParty/Boost/src/boost/asio/ip/detail/socket_option.hpp index 041a9f8..3b053f1 100644 --- a/3rdParty/Boost/src/boost/asio/ip/detail/socket_option.hpp +++ b/3rdParty/Boost/src/boost/asio/ip/detail/socket_option.hpp @@ -2,7 +2,7 @@ // detail/socket_option.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,9 +19,9 @@ #include <cstddef> #include <cstring> #include <stdexcept> -#include <boost/throw_exception.hpp> #include <boost/asio/detail/socket_ops.hpp> #include <boost/asio/detail/socket_types.hpp> +#include <boost/asio/detail/throw_exception.hpp> #include <boost/asio/ip/address.hpp> #include <boost/asio/detail/push_options.hpp> @@ -142,7 +142,7 @@ public: if (s != sizeof(ipv6_value_)) { std::length_error ex("multicast_enable_loopback socket option resize"); - boost::throw_exception(ex); + boost::asio::detail::throw_exception(ex); } ipv4_value_ = ipv6_value_ ? 1 : 0; } @@ -151,7 +151,7 @@ public: if (s != sizeof(ipv4_value_)) { std::length_error ex("multicast_enable_loopback socket option resize"); - boost::throw_exception(ex); + boost::asio::detail::throw_exception(ex); } ipv6_value_ = ipv4_value_ ? 1 : 0; } @@ -238,7 +238,7 @@ public: if (s != sizeof(value_)) { std::length_error ex("unicast hops socket option resize"); - boost::throw_exception(ex); + boost::asio::detail::throw_exception(ex); } #if defined(__hpux) if (value_ < 0) @@ -255,7 +255,7 @@ template <int IPv4_Level, int IPv4_Name, int IPv6_Level, int IPv6_Name> class multicast_hops { public: -#if defined(BOOST_WINDOWS) && defined(UNDER_CE) +#if defined(BOOST_ASIO_WINDOWS) && defined(UNDER_CE) typedef int ipv4_value_type; #else typedef unsigned char ipv4_value_type; @@ -275,7 +275,7 @@ public: if (v < 0 || v > 255) { std::out_of_range ex("multicast hops value out of range"); - boost::throw_exception(ex); + boost::asio::detail::throw_exception(ex); } ipv4_value_ = (ipv4_value_type)v; ipv6_value_ = v; @@ -287,7 +287,7 @@ public: if (v < 0 || v > 255) { std::out_of_range ex("multicast hops value out of range"); - boost::throw_exception(ex); + boost::asio::detail::throw_exception(ex); } ipv4_value_ = (ipv4_value_type)v; ipv6_value_ = v; @@ -354,7 +354,7 @@ public: if (s != sizeof(ipv6_value_)) { std::length_error ex("multicast hops socket option resize"); - boost::throw_exception(ex); + boost::asio::detail::throw_exception(ex); } if (ipv6_value_ < 0) ipv4_value_ = 0; @@ -368,7 +368,7 @@ public: if (s != sizeof(ipv4_value_)) { std::length_error ex("multicast hops socket option resize"); - boost::throw_exception(ex); + boost::asio::detail::throw_exception(ex); } ipv6_value_ = ipv4_value_; } @@ -402,7 +402,7 @@ public: boost::asio::ip::address_v6 ipv6_address = multicast_address.to_v6(); boost::asio::ip::address_v6::bytes_type bytes = ipv6_address.to_bytes(); memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16); - ipv6_value_.ipv6mr_interface = 0; + ipv6_value_.ipv6mr_interface = ipv6_address.scope_id(); } else { @@ -440,7 +440,10 @@ public: boost::asio::ip::address_v6::bytes_type bytes = multicast_address.to_bytes(); memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16); - ipv6_value_.ipv6mr_interface = network_interface; + if (network_interface) + ipv6_value_.ipv6mr_interface = network_interface; + else + ipv6_value_.ipv6mr_interface = multicast_address.scope_id(); } // Get the level of the socket option. |