summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/asio/detail/buffer_sequence_adapter.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-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/detail/buffer_sequence_adapter.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/buffer_sequence_adapter.hpp34
1 files changed, 27 insertions, 7 deletions
diff --git a/3rdParty/Boost/src/boost/asio/detail/buffer_sequence_adapter.hpp b/3rdParty/Boost/src/boost/asio/detail/buffer_sequence_adapter.hpp
index 562aa55..da81cbe 100644
--- a/3rdParty/Boost/src/boost/asio/detail/buffer_sequence_adapter.hpp
+++ b/3rdParty/Boost/src/boost/asio/detail/buffer_sequence_adapter.hpp
@@ -2,7 +2,7 @@
// detail/buffer_sequence_adapter.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)
@@ -29,7 +29,23 @@ namespace detail {
class buffer_sequence_adapter_base
{
protected:
-#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // The maximum number of buffers to support in a single operation.
+ enum { max_buffers = 1 };
+
+ typedef Windows::Storage::Streams::IBuffer^ native_buffer_type;
+
+ BOOST_ASIO_DECL static void init_native_buffer(
+ native_buffer_type& buf,
+ const boost::asio::mutable_buffer& buffer);
+
+ BOOST_ASIO_DECL static void init_native_buffer(
+ native_buffer_type& buf,
+ const boost::asio::const_buffer& buffer);
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ // The maximum number of buffers to support in a single operation.
+ enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
+
typedef WSABUF native_buffer_type;
static void init_native_buffer(WSABUF& buf,
@@ -45,7 +61,10 @@ protected:
buf.buf = const_cast<char*>(boost::asio::buffer_cast<const char*>(buffer));
buf.len = static_cast<ULONG>(boost::asio::buffer_size(buffer));
}
-#else // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ // The maximum number of buffers to support in a single operation.
+ enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
+
typedef iovec native_buffer_type;
static void init_iov_base(void*& base, void* addr)
@@ -73,7 +92,7 @@ protected:
boost::asio::buffer_cast<const void*>(buffer)));
iov.iov_len = boost::asio::buffer_size(buffer);
}
-#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
};
// Helper class to translate buffers into the native buffer representation.
@@ -146,9 +165,6 @@ public:
}
private:
- // The maximum number of buffers to support in a single operation.
- enum { max_buffers = 64 < max_iov_len ? 64 : max_iov_len };
-
native_buffer_type buffers_[max_buffers];
std::size_t count_;
std::size_t total_buffer_size_;
@@ -362,4 +378,8 @@ private:
#include <boost/asio/detail/pop_options.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/detail/impl/buffer_sequence_adapter.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
#endif // BOOST_ASIO_DETAIL_BUFFER_SEQUENCE_ADAPTER_HPP