update boost on linux

This commit is contained in:
Bassem Girgis
2019-08-10 16:06:25 -05:00
parent 76ad52be58
commit 861b918727
5363 changed files with 483306 additions and 116507 deletions

View File

@@ -2,7 +2,7 @@
// local/detail/impl/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Derived from a public domain implementation written by Daniel Casimiro.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -49,6 +49,13 @@ endpoint::endpoint(const std::string& path_name)
init(path_name.data(), path_name.length());
}
#if defined(BOOST_ASIO_HAS_STRING_VIEW)
endpoint::endpoint(string_view path_name)
{
init(path_name.data(), path_name.length());
}
#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
void endpoint::resize(std::size_t new_size)
{
if (new_size > sizeof(boost::asio::detail::sockaddr_un_type))
@@ -109,7 +116,8 @@ void endpoint::init(const char* path_name, std::size_t path_length)
using namespace std; // For memcpy.
data_.local = boost::asio::detail::sockaddr_un_type();
data_.local.sun_family = AF_UNIX;
memcpy(data_.local.sun_path, path_name, path_length);
if (path_length > 0)
memcpy(data_.local.sun_path, path_name, path_length);
path_length_ = path_length;
// NUL-terminate normal path names. Names that start with a NUL are in the