X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=boost%2Fasio%2Fip%2Fimpl%2Faddress_v4.ipp;h=a2029016b317b249764d9d74a02de3cc34fe0392;hb=08c1e93fa36a49f49325a07fe91ff92c964c2b6c;hp=31f6e27d59fd2ded3156646989f23a1522dbba5f;hpb=bb4dd8289b351fae6b55e303f189127a394a1edd;p=platform%2Fupstream%2Fboost.git diff --git a/boost/asio/ip/impl/address_v4.ipp b/boost/asio/ip/impl/address_v4.ipp index 31f6e27..a202901 100644 --- a/boost/asio/ip/impl/address_v4.ipp +++ b/boost/asio/ip/impl/address_v4.ipp @@ -2,7 +2,7 @@ // ip/impl/address_v4.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) @@ -18,10 +18,10 @@ #include #include #include -#include #include #include #include +#include #include #include @@ -37,7 +37,7 @@ address_v4::address_v4(const address_v4::bytes_type& bytes) || bytes[2] > 0xFF || bytes[3] > 0xFF) { std::out_of_range ex("address_v4 from bytes_type"); - boost::throw_exception(ex); + boost::asio::detail::throw_exception(ex); } #endif // UCHAR_MAX > 0xFF @@ -51,11 +51,12 @@ address_v4::address_v4(unsigned long addr) if (addr > 0xFFFFFFFF) { std::out_of_range ex("address_v4 from unsigned long"); - boost::throw_exception(ex); + boost::asio::detail::throw_exception(ex); } #endif // ULONG_MAX > 0xFFFFFFFF - addr_.s_addr = boost::asio::detail::socket_ops::host_to_network_long(addr); + addr_.s_addr = boost::asio::detail::socket_ops::host_to_network_long( + static_cast(addr)); } address_v4::bytes_type address_v4::to_bytes() const @@ -87,7 +88,8 @@ std::string address_v4::to_string(boost::system::error_code& ec) const { char addr_str[boost::asio::detail::max_addr_v4_str_len]; const char* addr = - boost::asio::detail::socket_ops::inet_ntop(AF_INET, &addr_, addr_str, + boost::asio::detail::socket_ops::inet_ntop( + BOOST_ASIO_OS_DEF(AF_INET), &addr_, addr_str, boost::asio::detail::max_addr_v4_str_len, 0, ec); if (addr == 0) return std::string(); @@ -107,7 +109,7 @@ address_v4 address_v4::from_string( { address_v4 tmp; if (boost::asio::detail::socket_ops::inet_pton( - AF_INET, str, &tmp.addr_, 0, ec) <= 0) + BOOST_ASIO_OS_DEF(AF_INET), str, &tmp.addr_, 0, ec) <= 0) return address_v4(); return tmp; }