Update Boost to 1.76

https://www.boost.org/users/history/version_1_74_0.html
https://www.boost.org/users/history/version_1_75_0.html
https://www.boost.org/users/history/version_1_76_0.html

Update diff from Brad. Arm64 bulk build by phessler, amd64 bulk build by me.
Feedback from many. OK tb@
This commit is contained in:
rsadowski 2021-06-22 04:20:13 +00:00
parent 0a597a2584
commit 16e2726132
62 changed files with 1075 additions and 1823 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.113 2021/05/10 15:08:50 tb Exp $
# $OpenBSD: Makefile,v 1.114 2021/06/22 04:20:13 rsadowski Exp $
ONLY_FOR_ARCHS-md = aarch64 amd64 arm i386 mips64 mips64el powerpc powerpc64
ONLY_FOR_ARCHS-md = aarch64 amd64 arm i386 mips64 mips64el powerpc powerpc64 riscv64
COMMENT-main= free peer-reviewed portable C++ source libraries
COMMENT-md= machine-dependent libraries for boost
VERSION= 1.73.0
VERSION= 1.76.0
DISTNAME= boost_${VERSION:S/./_/g}
PKGNAME-main= boost-${VERSION}
PKGNAME-md= boost-md-${VERSION}
@ -13,9 +13,8 @@ CATEGORIES= devel
MASTER_SITES= https://boostorg.jfrog.io/artifactory/main/release/${VERSION}/source/
EXTRACT_SUFX= .tar.bz2
FIX_EXTRACT_PERMISSIONS = Yes
REVISION-main= 1
SO_VERSION= 14.0
SO_VERSION= 15.0
BOOST_LIBS= boost_atomic-mt \
boost_chrono-mt boost_chrono \
boost_container-mt boost_container \
@ -24,6 +23,7 @@ BOOST_LIBS= boost_atomic-mt \
boost_filesystem-mt boost_filesystem \
boost_graph-mt boost_graph \
boost_iostreams-mt boost_iostreams \
boost_json-mt boost_json \
boost_locale-mt \
boost_log-mt boost_log \
boost_log_setup-mt boost_log_setup \

View File

@ -1,2 +1,2 @@
SHA256 (boost_1_73_0.tar.bz2) = TrO41EK0Jtw1NGI1yHM7WuNbpDFpDjjGqCY9zp/LtAI=
SIZE (boost_1_73_0.tar.bz2) = 109247910
SHA256 (boost_1_76_0.tar.bz2) = 8Dl7pumCxEUPJ78yoqgykqugNbgnpWI6FGNupYMxjEE=
SIZE (boost_1_76_0.tar.bz2) = 110073117

View File

@ -1,14 +1,17 @@
$OpenBSD: patch-Jamroot,v 1.10 2021/04/28 05:08:58 rsadowski Exp $
$OpenBSD: patch-Jamroot,v 1.11 2021/06/22 04:20:13 rsadowski Exp $
Index: Jamroot
--- Jamroot.orig
+++ Jamroot
@@ -146,8 +146,9 @@ import tools/boost\_install/boost-install ;
@@ -146,11 +146,12 @@ import tools/boost\_install/boost-install ;
path-constant BOOST_ROOT : . ;
constant BOOST_VERSION : 1.73.0 ;
constant BOOST_VERSION : 1.76.0 ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;
+constant SO_VERSION : ${SO_VERSION} ;
# Allow subprojects to simply `import config : requires ;` to get access to the requires rule
modules.poke : BOOST_BUILD_PATH : $(BOOST_ROOT)/libs/config/checks [ modules.peek : BOOST_BUILD_PATH ] ;
-boostcpp.set-version $(BOOST_VERSION) ;
+boostcpp.set-version $(SO_VERSION) ;

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-boost_asio_detail_config_hpp,v 1.5 2021/04/28 05:08:58 rsadowski Exp $
Use _POSIX_VERSION to detect support for MSG_NOSIGNAL.
Index: boost/asio/detail/config.hpp
--- boost/asio/detail/config.hpp.orig
+++ boost/asio/detail/config.hpp
@@ -1480,4 +1480,15 @@
# endif // defined(__clang__)
#endif // !defined(BOOST_ASIO_HAS_CO_AWAIT)
+// Kernel support for MSG_NOSIGNAL.
+#if !defined(BOOST_ASIO_HAS_MSG_NOSIGNAL)
+# if defined(__linux__)
+# define BOOST_ASIO_HAS_MSG_NOSIGNAL 1
+# elif defined(_POSIX_VERSION)
+# if (_POSIX_VERSION >= 200809L)
+# define BOOST_ASIO_HAS_MSG_NOSIGNAL 1
+# endif // _POSIX_VERSION >= 200809L
+# endif // defined(_POSIX_VERSION)
+#endif // !defined(BOOST_ASIO_HAS_MSG_NOSIGNAL)
+
#endif // BOOST_ASIO_DETAIL_CONFIG_HPP

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-boost_asio_detail_impl_socket_ops_ipp,v 1.3 2021/02/01 12:00:51 rsadowski Exp $
Use _POSIX_VERSION to detect support for MSG_NOSIGNAL.
Index: boost/asio/detail/impl/socket_ops.ipp
--- boost/asio/detail/impl/socket_ops.ipp.orig
+++ boost/asio/detail/impl/socket_ops.ipp
@@ -1178,9 +1178,9 @@ signed_size_type send(socket_type s, const buf* bufs,
msghdr msg = msghdr();
msg.msg_iov = const_cast<buf*>(bufs);
msg.msg_iovlen = static_cast<int>(count);
-#if defined(__linux__)
+#if defined(BOOST_ASIO_HAS_MSG_NOSIGNAL)
flags |= MSG_NOSIGNAL;
-#endif // defined(__linux__)
+#endif // defined(BOOST_ASIO_HAS_MSG_NOSIGNAL)
signed_size_type result = error_wrapper(::sendmsg(s, &msg, flags), ec);
if (result >= 0)
ec = boost::system::error_code();
@@ -1307,9 +1307,9 @@ signed_size_type sendto(socket_type s, const buf* bufs
msg.msg_namelen = static_cast<int>(addrlen);
msg.msg_iov = const_cast<buf*>(bufs);
msg.msg_iovlen = static_cast<int>(count);
-#if defined(__linux__)
+#if defined(BOOST_ASIO_HAS_MSG_NOSIGNAL)
flags |= MSG_NOSIGNAL;
-#endif // defined(__linux__)
+#endif // defined(BOOST_ASIO_HAS_MSG_NOSIGNAL)
signed_size_type result = error_wrapper(::sendmsg(s, &msg, flags), ec);
if (result >= 0)
ec = boost::system::error_code();

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-boost_asio_ssl_impl_context_ipp,v 1.3 2021/05/10 15:08:50 tb Exp $
$OpenBSD: patch-boost_asio_ssl_impl_context_ipp,v 1.4 2021/06/22 04:20:13 rsadowski Exp $
Use accessors instead of reaching into SSL_CTX. The requisite
accessors have been available since LibreSSL 2.7.2 and are thus
@ -7,7 +7,7 @@ present in all supported versions.
Index: boost/asio/ssl/impl/context.ipp
--- boost/asio/ssl/impl/context.ipp.orig
+++ boost/asio/ssl/impl/context.ipp
@@ -387,9 +387,7 @@ context::~context()
@@ -397,9 +397,7 @@ context::~context()
{
if (handle_)
{
@ -18,7 +18,7 @@ Index: boost/asio/ssl/impl/context.ipp
void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
void* cb_userdata = handle_->default_passwd_callback_userdata;
@@ -400,9 +398,7 @@ context::~context()
@@ -410,9 +408,7 @@ context::~context()
static_cast<detail::password_callback_base*>(
cb_userdata);
delete callback;
@ -29,7 +29,7 @@ Index: boost/asio/ssl/impl/context.ipp
::SSL_CTX_set_default_passwd_cb_userdata(handle_, 0);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
handle_->default_passwd_callback_userdata = 0;
@@ -739,9 +735,7 @@ BOOST_ASIO_SYNC_OP_VOID context::use_certificate_chain
@@ -759,9 +755,7 @@ BOOST_ASIO_SYNC_OP_VOID context::use_certificate_chain
bio_cleanup bio = { make_buffer_bio(chain) };
if (bio.p)
{
@ -40,7 +40,7 @@ Index: boost/asio/ssl/impl/context.ipp
pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
@@ -768,9 +762,7 @@ BOOST_ASIO_SYNC_OP_VOID context::use_certificate_chain
@@ -788,9 +782,7 @@ BOOST_ASIO_SYNC_OP_VOID context::use_certificate_chain
BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
}
@ -51,7 +51,7 @@ Index: boost/asio/ssl/impl/context.ipp
::SSL_CTX_clear_chain_certs(handle_);
#else
if (handle_->extra_certs)
@@ -847,9 +839,7 @@ BOOST_ASIO_SYNC_OP_VOID context::use_private_key(
@@ -867,9 +859,7 @@ BOOST_ASIO_SYNC_OP_VOID context::use_private_key(
{
::ERR_clear_error();
@ -62,7 +62,7 @@ Index: boost/asio/ssl/impl/context.ipp
pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
@@ -916,9 +906,7 @@ BOOST_ASIO_SYNC_OP_VOID context::use_rsa_private_key(
@@ -936,9 +926,7 @@ BOOST_ASIO_SYNC_OP_VOID context::use_rsa_private_key(
{
::ERR_clear_error();
@ -73,7 +73,7 @@ Index: boost/asio/ssl/impl/context.ipp
pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
@@ -1157,9 +1145,7 @@ int context::verify_callback_function(int preverified,
@@ -1177,9 +1165,7 @@ int context::verify_callback_function(int preverified,
BOOST_ASIO_SYNC_OP_VOID context::do_set_password_callback(
detail::password_callback_base* callback, boost::system::error_code& ec)
{

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-boost_beast__experimental_http_impl_icy_stream_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/_experimental/http/impl/icy_stream.hpp
--- boost/beast/_experimental/http/impl/icy_stream.hpp.orig
+++ boost/beast/_experimental/http/impl/icy_stream.hpp
@@ -259,7 +259,7 @@ read_some(MutableBufferSequence const& buffers, error_
template<class NextLayer>
template<
class MutableBufferSequence,
- class ReadHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
icy_stream<NextLayer>::
async_read_some(
@@ -311,7 +311,7 @@ write_some(MutableBufferSequence const& buffers, error
template<class NextLayer>
template<
class MutableBufferSequence,
- class WriteHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
icy_stream<NextLayer>::
async_write_some(

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-boost_beast__experimental_test_impl_stream_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/_experimental/test/impl/stream.hpp
--- boost/beast/_experimental/test/impl/stream.hpp.orig
+++ boost/beast/_experimental/test/impl/stream.hpp
@@ -306,7 +306,7 @@ read_some(MutableBufferSequence const& buffers,
return 0;
}
-template<class MutableBufferSequence, class ReadHandler>
+template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
stream::
async_read_some(
@@ -386,7 +386,7 @@ write_some(
return n;
}
-template<class ConstBufferSequence, class WriteHandler>
+template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
stream::
async_write_some(

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-boost_beast_core_detail_impl_read_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/core/detail/impl/read.hpp
--- boost/beast/core/detail/impl/read.hpp.orig
+++ boost/beast/core/detail/impl/read.hpp
@@ -214,7 +214,7 @@ template<
class AsyncReadStream,
class DynamicBuffer,
class CompletionCondition,
- class ReadHandler,
+ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler,
class>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
async_read(

View File

@ -1,41 +0,0 @@
$OpenBSD: patch-boost_beast_core_detail_is_invocable_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/core/detail/is_invocable.hpp
--- boost/beast/core/detail/is_invocable.hpp.orig
+++ boost/beast/core/detail/is_invocable.hpp
@@ -10,6 +10,8 @@
#ifndef BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP
#define BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP
+#include <boost/asio/async_result.hpp>
+#include <boost/type_traits/make_void.hpp>
#include <type_traits>
#include <utility>
@@ -50,6 +52,26 @@ struct is_invocable<C, R(A...)>
{
};
/** @} */
+
+template<class CompletionToken, class Signature, class = void>
+struct is_completion_token_for : std::false_type
+{
+};
+
+struct any_initiation
+{
+ template<class...AnyArgs>
+ void operator()(AnyArgs&&...);
+};
+
+template<class CompletionToken, class R, class...Args>
+struct is_completion_token_for<
+ CompletionToken, R(Args...), boost::void_t<decltype(
+ boost::asio::async_initiate<CompletionToken, R(Args...)>(
+ any_initiation(), std::declval<CompletionToken&>())
+ )>> : std::true_type
+{
+};
} // detail
} // beast

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-boost_beast_core_detail_read_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/core/detail/read.hpp
--- boost/beast/core/detail/read.hpp.orig
+++ boost/beast/core/detail/read.hpp
@@ -219,7 +219,7 @@ template<
class AsyncReadStream,
class DynamicBuffer,
class CompletionCondition,
- class ReadHandler
+ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler
#if ! BOOST_BEAST_DOXYGEN
, class = typename std::enable_if<
is_async_read_stream<AsyncReadStream>::value &&

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-boost_beast_core_detect_ssl_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/core/detect_ssl.hpp
--- boost/beast/core/detect_ssl.hpp.orig
+++ boost/beast/core/detect_ssl.hpp
@@ -374,13 +374,13 @@ struct run_detect_ssl_op
void operator()(
DetectHandler&& h,
AsyncReadStream* s, // references are passed as pointers
- DynamicBuffer& b)
+ DynamicBuffer* b)
{
detect_ssl_op<
typename std::decay<DetectHandler>::type,
AsyncReadStream,
DynamicBuffer>(
- std::forward<DetectHandler>(h), *s, b);
+ std::forward<DetectHandler>(h), *s, *b);
}
};
@@ -439,7 +439,7 @@ async_detect_ssl(
detail::run_detect_ssl_op{},
token,
&stream, // pass the reference by pointer
- buffer);
+ &buffer);
}
//]

View File

@ -1,68 +0,0 @@
$OpenBSD: patch-boost_beast_core_impl_basic_stream_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/core/impl/basic_stream.hpp
--- boost/beast/core/impl/basic_stream.hpp.orig
+++ boost/beast/core/impl/basic_stream.hpp
@@ -776,7 +776,7 @@ close()
//------------------------------------------------------------------------------
template<class Protocol, class Executor, class RatePolicy>
-template<class ConnectHandler>
+template<BOOST_BEAST_ASYNC_TPARAM1 ConnectHandler>
BOOST_BEAST_ASYNC_RESULT1(ConnectHandler)
basic_stream<Protocol, Executor, RatePolicy>::
async_connect(
@@ -795,7 +795,7 @@ async_connect(
template<class Protocol, class Executor, class RatePolicy>
template<
class EndpointSequence,
- class RangeConnectHandler,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler,
class>
BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,void(error_code, typename Protocol::endpoint))
basic_stream<Protocol, Executor, RatePolicy>::
@@ -817,7 +817,7 @@ template<class Protocol, class Executor, class RatePol
template<
class EndpointSequence,
class ConnectCondition,
- class RangeConnectHandler,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler,
class>
BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,void (error_code, typename Protocol::endpoint))
basic_stream<Protocol, Executor, RatePolicy>::
@@ -839,7 +839,7 @@ async_connect(
template<class Protocol, class Executor, class RatePolicy>
template<
class Iterator,
- class IteratorConnectHandler>
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator))
basic_stream<Protocol, Executor, RatePolicy>::
async_connect(
@@ -860,7 +860,7 @@ template<class Protocol, class Executor, class RatePol
template<
class Iterator,
class ConnectCondition,
- class IteratorConnectHandler>
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator))
basic_stream<Protocol, Executor, RatePolicy>::
async_connect(
@@ -881,7 +881,7 @@ async_connect(
//------------------------------------------------------------------------------
template<class Protocol, class Executor, class RatePolicy>
-template<class MutableBufferSequence, class ReadHandler>
+template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
basic_stream<Protocol, Executor, RatePolicy>::
async_read_some(
@@ -901,7 +901,7 @@ async_read_some(
}
template<class Protocol, class Executor, class RatePolicy>
-template<class ConstBufferSequence, class WriteHandler>
+template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
basic_stream<Protocol, Executor, RatePolicy>::
async_write_some(

View File

@ -1,59 +0,0 @@
$OpenBSD: patch-boost_beast_core_impl_buffered_read_stream_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/core/impl/buffered_read_stream.hpp
--- boost/beast/core/impl/buffered_read_stream.hpp.orig
+++ boost/beast/core/impl/buffered_read_stream.hpp
@@ -110,7 +110,7 @@ struct run_read_op
operator()(
ReadHandler&& h,
buffered_read_stream* s,
- Buffers const& b)
+ Buffers const* b)
{
// If you get an error on the following line it means
// that your handler does not meet the documented type
@@ -124,7 +124,7 @@ struct run_read_op
read_op<
Buffers,
typename std::decay<ReadHandler>::type>(
- std::forward<ReadHandler>(h), *s, b);
+ std::forward<ReadHandler>(h), *s, *b);
}
};
@@ -141,7 +141,7 @@ buffered_read_stream(Args&&... args)
}
template<class Stream, class DynamicBuffer>
-template<class ConstBufferSequence, class WriteHandler>
+template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
buffered_read_stream<Stream, DynamicBuffer>::
async_write_some(
@@ -153,7 +153,7 @@ async_write_some(
static_assert(net::is_const_buffer_sequence<
ConstBufferSequence>::value,
"ConstBufferSequence type requirements not met");
- static_assert(detail::is_invocable<WriteHandler,
+ static_assert(detail::is_completion_token_for<WriteHandler,
void(error_code, std::size_t)>::value,
"WriteHandler type requirements not met");
return next_layer_.async_write_some(buffers,
@@ -212,7 +212,7 @@ read_some(MutableBufferSequence const& buffers,
}
template<class Stream, class DynamicBuffer>
-template<class MutableBufferSequence, class ReadHandler>
+template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
buffered_read_stream<Stream, DynamicBuffer>::
async_read_some(
@@ -233,7 +233,7 @@ async_read_some(
typename ops::run_read_op{},
handler,
this,
- buffers);
+ &buffers);
}
} // beast

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-boost_beast_core_impl_flat_stream_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/core/impl/flat_stream.hpp
--- boost/beast/core/impl/flat_stream.hpp.orig
+++ boost/beast/core/impl/flat_stream.hpp
@@ -144,7 +144,7 @@ read_some(MutableBufferSequence const& buffers, error_
template<class NextLayer>
template<
class MutableBufferSequence,
- class ReadHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
flat_stream<NextLayer>::
async_read_some(
@@ -225,7 +225,7 @@ write_some(ConstBufferSequence const& buffers, error_c
template<class NextLayer>
template<
class ConstBufferSequence,
- class WriteHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
flat_stream<NextLayer>::
async_write_some(

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-boost_beast_http_field_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/http/field.hpp
--- boost/beast/http/field.hpp.orig
+++ boost/beast/http/field.hpp
@@ -396,12 +396,9 @@ field
string_to_field(string_view s);
/// Write the text for a field name to an output stream.
-inline
+BOOST_BEAST_DECL
std::ostream&
-operator<<(std::ostream& os, field f)
-{
- return os << to_string(f);
-}
+operator<<(std::ostream& os, field f);
} // http
} // beast

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-boost_beast_http_impl_field_ipp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/http/impl/field.ipp
--- boost/beast/http/impl/field.ipp.orig
+++ boost/beast/http/impl/field.ipp
@@ -11,11 +11,13 @@
#define BOOST_BEAST_HTTP_IMPL_FIELD_IPP
#include <boost/beast/http/field.hpp>
+#include <boost/assert.hpp>
#include <algorithm>
#include <array>
#include <cstring>
-#include <boost/assert.hpp>
+#include <ostream>
+
namespace boost {
namespace beast {
namespace http {
@@ -563,6 +565,12 @@ field
string_to_field(string_view s)
{
return detail::get_field_table().string_to_field(s);
+}
+
+std::ostream&
+operator<<(std::ostream& os, field f)
+{
+ return os << to_string(f);
}
} // http

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-boost_beast_http_impl_file_body_win32_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/http/impl/file_body_win32.hpp
--- boost/beast/http/impl/file_body_win32.hpp.orig
+++ boost/beast/http/impl/file_body_win32.hpp
@@ -597,7 +597,7 @@ write_some(
template<
class Protocol, class Executor,
bool isRequest, class Fields,
- class WriteHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
async_write_some(
net::basic_stream_socket<

View File

@ -1,41 +0,0 @@
$OpenBSD: patch-boost_beast_http_impl_read_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/http/impl/read.hpp
--- boost/beast/http/impl/read.hpp.orig
+++ boost/beast/http/impl/read.hpp
@@ -304,7 +304,7 @@ template<
class AsyncReadStream,
class DynamicBuffer,
bool isRequest,
- class ReadHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
async_read_some(
AsyncReadStream& stream,
@@ -373,7 +373,7 @@ template<
class AsyncReadStream,
class DynamicBuffer,
bool isRequest,
- class ReadHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
async_read_header(
AsyncReadStream& stream,
@@ -443,7 +443,7 @@ template<
class AsyncReadStream,
class DynamicBuffer,
bool isRequest,
- class ReadHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
async_read(
AsyncReadStream& stream,
@@ -531,7 +531,7 @@ template<
class AsyncReadStream,
class DynamicBuffer,
bool isRequest, class Body, class Allocator,
- class ReadHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
async_read(
AsyncReadStream& stream,

View File

@ -1,59 +0,0 @@
$OpenBSD: patch-boost_beast_http_impl_write_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/http/impl/write.hpp
--- boost/beast/http/impl/write.hpp.orig
+++ boost/beast/http/impl/write.hpp
@@ -463,7 +463,7 @@ write_some_impl(
template<
class AsyncWriteStream,
bool isRequest, class Body, class Fields,
- class WriteHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
async_write_some_impl(
AsyncWriteStream& stream,
@@ -526,7 +526,7 @@ write_some(
template<
class AsyncWriteStream,
bool isRequest, class Body, class Fields,
- class WriteHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
async_write_some(
AsyncWriteStream& stream,
@@ -608,7 +608,7 @@ write_header(
template<
class AsyncWriteStream,
bool isRequest, class Body, class Fields,
- class WriteHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
async_write_header(
AsyncWriteStream& stream,
@@ -681,7 +681,7 @@ write(
template<
class AsyncWriteStream,
bool isRequest, class Body, class Fields,
- class WriteHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
async_write(
AsyncWriteStream& stream,
@@ -801,7 +801,7 @@ write(
template<
class AsyncWriteStream,
bool isRequest, class Body, class Fields,
- class WriteHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
async_write(
AsyncWriteStream& stream,
@@ -830,7 +830,7 @@ async_write(
template<
class AsyncWriteStream,
bool isRequest, class Body, class Fields,
- class WriteHandler>
+ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
async_write(
AsyncWriteStream& stream,

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-boost_beast_http_span_body_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/http/span_body.hpp
--- boost/beast/http/span_body.hpp.orig
+++ boost/beast/http/span_body.hpp
@@ -36,8 +36,10 @@ template<class T>
struct span_body
{
private:
- static_assert(std::is_pod<T>::value,
- "POD requirements not met");
+ static_assert(
+ std::is_trivial<T>::value &&
+ std::is_standard_layout<T>::value,
+ "POD requirements not met");
public:
/** The type of container used for the body

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-boost_beast_ssl_ssl_stream_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/ssl/ssl_stream.hpp
--- boost/beast/ssl/ssl_stream.hpp.orig
+++ boost/beast/ssl/ssl_stream.hpp
@@ -555,7 +555,7 @@ class ssl_stream (public)
need to ensure that all data is written before the asynchronous operation
completes.
*/
- template<class ConstBufferSequence, class WriteHandler>
+ template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, void(boost::system::error_code, std::size_t))
async_write_some(ConstBufferSequence const& buffers,
BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
@@ -636,7 +636,7 @@ class ssl_stream (public)
if you need to ensure that the requested amount of data is read before
the asynchronous operation completes.
*/
- template<class MutableBufferSequence, class ReadHandler>
+ template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void(boost::system::error_code, std::size_t))
async_read_some(MutableBufferSequence const& buffers,
BOOST_ASIO_MOVE_ARG(ReadHandler) handler)

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-boost_beast_version_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/version.hpp
--- boost/beast/version.hpp.orig
+++ boost/beast/version.hpp
@@ -20,7 +20,7 @@
This is a simple integer that is incremented by one every
time a set of code changes is merged to the develop branch.
*/
-#define BOOST_BEAST_VERSION 290
+#define BOOST_BEAST_VERSION 292
#define BOOST_BEAST_VERSION_STRING "Boost.Beast/" BOOST_STRINGIZE(BOOST_BEAST_VERSION)

View File

@ -1,59 +0,0 @@
$OpenBSD: patch-boost_beast_websocket_impl_accept_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/websocket/impl/accept.hpp
--- boost/beast/websocket/impl/accept.hpp.orig
+++ boost/beast/websocket/impl/accept.hpp
@@ -542,7 +542,7 @@ accept(
template<class NextLayer, bool deflateSupported>
template<
- class AcceptHandler>
+ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
stream<NextLayer, deflateSupported>::
async_accept(
@@ -564,7 +564,7 @@ async_accept(
template<class NextLayer, bool deflateSupported>
template<
class ResponseDecorator,
- class AcceptHandler>
+ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
stream<NextLayer, deflateSupported>::
async_accept_ex(
@@ -590,7 +590,7 @@ async_accept_ex(
template<class NextLayer, bool deflateSupported>
template<
class ConstBufferSequence,
- class AcceptHandler>
+ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
stream<NextLayer, deflateSupported>::
async_accept(
@@ -621,7 +621,7 @@ template<class NextLayer, bool deflateSupported>
template<
class ConstBufferSequence,
class ResponseDecorator,
- class AcceptHandler>
+ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
stream<NextLayer, deflateSupported>::
async_accept_ex(
@@ -654,7 +654,7 @@ async_accept_ex(
template<class NextLayer, bool deflateSupported>
template<
class Body, class Allocator,
- class AcceptHandler>
+ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
stream<NextLayer, deflateSupported>::
async_accept(
@@ -678,7 +678,7 @@ template<class NextLayer, bool deflateSupported>
template<
class Body, class Allocator,
class ResponseDecorator,
- class AcceptHandler>
+ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
stream<NextLayer, deflateSupported>::
async_accept_ex(

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-boost_beast_websocket_impl_close_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/websocket/impl/close.hpp
--- boost/beast/websocket/impl/close.hpp.orig
+++ boost/beast/websocket/impl/close.hpp
@@ -382,7 +382,7 @@ close(close_reason const& cr, error_code& ec)
}
template<class NextLayer, bool deflateSupported>
-template<class CloseHandler>
+template<BOOST_BEAST_ASYNC_TPARAM1 CloseHandler>
BOOST_BEAST_ASYNC_RESULT1(CloseHandler)
stream<NextLayer, deflateSupported>::
async_close(close_reason const& cr, CloseHandler&& handler)

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-boost_beast_websocket_impl_handshake_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/websocket/impl/handshake.hpp
--- boost/beast/websocket/impl/handshake.hpp.orig
+++ boost/beast/websocket/impl/handshake.hpp
@@ -268,7 +268,7 @@ do_handshake(
//------------------------------------------------------------------------------
template<class NextLayer, bool deflateSupported>
-template<class HandshakeHandler>
+template<BOOST_BEAST_ASYNC_TPARAM1 HandshakeHandler>
BOOST_BEAST_ASYNC_RESULT1(HandshakeHandler)
stream<NextLayer, deflateSupported>::
async_handshake(
@@ -293,7 +293,7 @@ async_handshake(
}
template<class NextLayer, bool deflateSupported>
-template<class HandshakeHandler>
+template<BOOST_BEAST_ASYNC_TPARAM1 HandshakeHandler>
BOOST_BEAST_ASYNC_RESULT1(HandshakeHandler)
stream<NextLayer, deflateSupported>::
async_handshake(

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-boost_beast_websocket_impl_ping_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/websocket/impl/ping.hpp
--- boost/beast/websocket/impl/ping.hpp.orig
+++ boost/beast/websocket/impl/ping.hpp
@@ -288,7 +288,7 @@ pong(ping_data const& payload, error_code& ec)
}
template<class NextLayer, bool deflateSupported>
-template<class WriteHandler>
+template<BOOST_BEAST_ASYNC_TPARAM1 WriteHandler>
BOOST_BEAST_ASYNC_RESULT1(WriteHandler)
stream<NextLayer, deflateSupported>::
async_ping(ping_data const& payload, WriteHandler&& handler)
@@ -306,7 +306,7 @@ async_ping(ping_data const& payload, WriteHandler&& ha
}
template<class NextLayer, bool deflateSupported>
-template<class WriteHandler>
+template<BOOST_BEAST_ASYNC_TPARAM1 WriteHandler>
BOOST_BEAST_ASYNC_RESULT1(WriteHandler)
stream<NextLayer, deflateSupported>::
async_pong(ping_data const& payload, WriteHandler&& handler)

View File

@ -1,32 +0,0 @@
$OpenBSD: patch-boost_beast_websocket_impl_read_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/websocket/impl/read.hpp
--- boost/beast/websocket/impl/read.hpp.orig
+++ boost/beast/websocket/impl/read.hpp
@@ -804,7 +804,7 @@ read(DynamicBuffer& buffer, error_code& ec)
}
template<class NextLayer, bool deflateSupported>
-template<class DynamicBuffer, class ReadHandler>
+template<class DynamicBuffer, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
stream<NextLayer, deflateSupported>::
async_read(DynamicBuffer& buffer, ReadHandler&& handler)
@@ -878,7 +878,7 @@ read_some(
}
template<class NextLayer, bool deflateSupported>
-template<class DynamicBuffer, class ReadHandler>
+template<class DynamicBuffer, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
stream<NextLayer, deflateSupported>::
async_read_some(
@@ -1263,7 +1263,7 @@ loop:
}
template<class NextLayer, bool deflateSupported>
-template<class MutableBufferSequence, class ReadHandler>
+template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
stream<NextLayer, deflateSupported>::
async_read_some(

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-boost_beast_websocket_impl_write_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/websocket/impl/write.hpp
--- boost/beast/websocket/impl/write.hpp.orig
+++ boost/beast/websocket/impl/write.hpp
@@ -700,7 +700,7 @@ write_some(bool fin,
}
template<class NextLayer, bool deflateSupported>
-template<class ConstBufferSequence, class WriteHandler>
+template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
stream<NextLayer, deflateSupported>::
async_write_some(bool fin,
@@ -756,7 +756,7 @@ write(ConstBufferSequence const& buffers, error_code&
}
template<class NextLayer, bool deflateSupported>
-template<class ConstBufferSequence, class WriteHandler>
+template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
stream<NextLayer, deflateSupported>::
async_write(

View File

@ -1,32 +0,0 @@
$OpenBSD: patch-boost_beast_websocket_stream_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: boost/beast/websocket/stream.hpp
--- boost/beast/websocket/stream.hpp.orig
+++ boost/beast/websocket/stream.hpp
@@ -2634,7 +2634,7 @@ class stream (public)
template<
class ResponseDecorator,
- class AcceptHandler>
+ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
async_accept_ex(
ResponseDecorator const& decorator,
@@ -2643,7 +2643,7 @@ class stream (public)
template<
class ConstBufferSequence,
class ResponseDecorator,
- class AcceptHandler>
+ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
async_accept_ex(
ConstBufferSequence const& buffers,
@@ -2656,7 +2656,7 @@ class stream (public)
template<
class Body, class Allocator,
class ResponseDecorator,
- class AcceptHandler>
+ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
async_accept_ex(
http::request<Body,

View File

@ -1,9 +1,30 @@
$OpenBSD: patch-boost_config_platform_bsd_hpp,v 1.2 2021/02/01 12:00:51 rsadowski Exp $
$OpenBSD: patch-boost_config_platform_bsd_hpp,v 1.3 2021/06/22 04:20:13 rsadowski Exp $
Index: boost/config/platform/bsd.hpp
--- boost/config/platform/bsd.hpp.orig
+++ boost/config/platform/bsd.hpp
@@ -56,13 +56,14 @@
@@ -28,7 +28,8 @@
// FreeBSD has <nl_types.h> but does not
// advertise the fact in <unistd.h>:
//
-#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__)
+#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) \
+ || defined(__OpenBSD__) || defined(__DragonFly__)
# define BOOST_HAS_NL_TYPES_H
#endif
@@ -36,8 +37,8 @@
// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h>
// and not in <unistd.h>
//
-#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\
- || defined(__OpenBSD__) || defined(__DragonFly__)
+#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3)) \
+ || defined(__DragonFly__)
# define BOOST_HAS_PTHREADS
#endif
@@ -56,15 +57,10 @@
#endif
#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \
@ -12,11 +33,20 @@ Index: boost/config/platform/bsd.hpp
+ || defined(__OpenBSD__) || defined(__DragonFly__))
# define BOOST_NO_CWCHAR
#endif
//
// The BSD <ctype.h> has macros only, no functions:
//
-//
-// The BSD <ctype.h> has macros only, no functions:
-//
-#if !defined(__OpenBSD__) || defined(__DragonFly__)
+#if defined(__DragonFly__)
# define BOOST_NO_CTYPE_FUNCTIONS
#endif
-# define BOOST_NO_CTYPE_FUNCTIONS
-#endif
//
// thread API's not auto detected:
@@ -74,6 +70,7 @@
#define BOOST_HAS_GETTIMEOFDAY
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
#define BOOST_HAS_SIGACTION
+#define BOOST_HAS_CLOCK_GETTIME
// boilerplate code:
#define BOOST_HAS_UNISTD_H

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-boost_outcome_experimental_status-code_status_code_ptr_hpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
status_code_domain assertion removal.
Index: boost/outcome/experimental/status-code/status_code_ptr.hpp
--- boost/outcome/experimental/status-code/status_code_ptr.hpp.orig
+++ boost/outcome/experimental/status-code/status_code_ptr.hpp
@@ -103,7 +103,7 @@ namespace detail
#endif
virtual void _do_erased_copy(status_code<void> &dst, const status_code<void> &src, size_t /*unused*/) const override // NOLINT
{
- assert(dst.domain() == *this);
+ // Note that dst will not have its domain set
assert(src.domain() == *this);
auto &d = static_cast<_mycode &>(dst); // NOLINT
const auto &_s = static_cast<const _mycode &>(src); // NOLINT

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-boost_predef_os_bsd_open_h,v 1.2 2021/04/28 05:08:58 rsadowski Exp $
Fix redef of OS_BSD predef.
Index: boost/predef/os/bsd/open.h
--- boost/predef/os/bsd/open.h.orig
+++ boost/predef/os/bsd/open.h
@@ -80,6 +80,7 @@ http://en.wikipedia.org/wiki/Openbsd[OpenBSD] operatin
defined(__OpenBSD__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
+# undef BOOST_OS_BSD
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-boost_predef_other_endian_h,v 1.5 2021/04/28 05:08:58 rsadowski Exp $
Switch to using the endian.h header on OpenBSD.
Index: boost/predef/other/endian.h
--- boost/predef/other/endian.h.orig
+++ boost/predef/other/endian.h
@@ -54,19 +54,14 @@ information and acquired knowledge:
*/
#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
!BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
-# if BOOST_LIB_C_GNU || BOOST_PLAT_ANDROID
+# if BOOST_LIB_C_GNU || BOOST_PLAT_ANDROID || BOOST_OS_BSD_OPEN
# include <endian.h>
# else
# if BOOST_OS_MACOS
# include <machine/endian.h>
-# else
-# if BOOST_OS_BSD
-# if BOOST_OS_BSD_OPEN
-# include <machine/endian.h>
-# else
-# include <sys/endian.h>
-# endif
-# endif
+# endif
+# if BOOST_OS_BSD
+# include <sys/endian.h>
# endif
# endif
# if defined(__BYTE_ORDER)

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-libs_beast_CHANGELOG_md,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/CHANGELOG.md
--- libs/beast/CHANGELOG.md.orig
+++ libs/beast/CHANGELOG.md
@@ -1,3 +1,25 @@
+Version 292:
+
+* Fix compile errors on Visual Studio with /std:c++latest
+* Fix standalone compilation error with std::string_view
+* OpenSSL 1.0.2 or later is required
+* Fix c++20 deprecation warning in span_body
+
+--------------------------------------------------------------------------------
+
+Version 291:
+
+* Test websocket with use_awaitable
+* Test http write with use_awaitable
+* Test http read with use_awaitable
+* Fix use buffered_read_stream with use_awaitable
+* Implement is_completion_token_for trait
+* Test use_awaitable with basic_stream
+* Fix async_detect_ssl with use_awaitable
+* Add clang coroutines-ts to circleci config
+
+--------------------------------------------------------------------------------
+
Version 290:
* Travis build host now bionic

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-libs_beast_CMakeLists_txt,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/CMakeLists.txt
--- libs/beast/CMakeLists.txt.orig
+++ libs/beast/CMakeLists.txt
@@ -40,7 +40,7 @@ endfunction()
#
#-------------------------------------------------------------------------------
-project (Beast VERSION 290)
+project (Beast VERSION 292)
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
option (Beast_BUILD_EXAMPLES "Build examples" ON)

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-libs_beast_doc_qbk_01_intro__intro_qbk,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/doc/qbk/01_intro/_intro.qbk
--- libs/beast/doc/qbk/01_intro/_intro.qbk.orig
+++ libs/beast/doc/qbk/01_intro/_intro.qbk
@@ -58,7 +58,7 @@ Beast requires:
* [*C++11:] Robust support for most language features.
* [*Boost:] Beast only works with Boost, not stand-alone Asio
-* [*OpenSSL:] Required to build the tests, examples, and to use TLS/Secure sockets.
+* [*OpenSSL:] Version 1.0.2 or higher. Required to build the tests, examples, and to use TLS/Secure sockets.
Tested with these compilers: msvc-14+, gcc 4.8.4+, clang 3.6+.

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_core_async_base_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/core/async_base.cpp
--- libs/beast/test/beast/core/async_base.cpp.orig
+++ libs/beast/test/beast/core/async_base.cpp
@@ -585,7 +585,7 @@ class async_base_test : public beast::unit_test::suite
//--------------------------------------------------------------------------
// Asynchronously read into a buffer until the buffer is full, or an error occurs
- template<class AsyncReadStream, class ReadHandler>
+ template<class AsyncReadStream, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
typename net::async_result<ReadHandler, void(error_code, std::size_t)>::return_type
async_read(AsyncReadStream& stream, net::mutable_buffer buffer, ReadHandler&& handler)
{

View File

@ -1,93 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_core_basic_stream_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/core/basic_stream.cpp
--- libs/beast/test/beast/core/basic_stream.cpp.orig
+++ libs/beast/test/beast/core/basic_stream.cpp
@@ -30,6 +30,13 @@
#include <array>
#include <thread>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/awaitable.hpp>
+#include <boost/asio/co_spawn.hpp>
+#include <boost/asio/use_awaitable.hpp>
+#endif
+
+
namespace boost {
namespace beast {
@@ -258,7 +265,7 @@ class test_server (private)
{
string_view s_;
net::ip::tcp::socket socket_;
-
+
public:
session(
string_view s,
@@ -1297,6 +1304,52 @@ class basic_stream_test (public)
//--------------------------------------------------------------------------
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompilation(
+ basic_stream<net::ip::tcp>& stream,
+ net::mutable_buffer outbuf,
+ net::const_buffer inbuf,
+ net::ip::tcp::resolver::results_type resolve_results)
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ stream.async_read_some(outbuf, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ stream.async_write_some(inbuf, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<net::ip::tcp::resolver::results_type::const_iterator>, decltype(
+ stream.async_connect(
+ resolve_results.begin(),
+ resolve_results.end(),
+ net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<net::ip::tcp::endpoint>, decltype(
+ stream.async_connect(
+ resolve_results,
+ net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<void>, decltype(
+ stream.async_connect(
+ resolve_results.begin()->endpoint(),
+ net::use_awaitable))>);
+
+ auto comparison_function = [](error_code&, net::ip::tcp::endpoint) { return true; };
+
+ static_assert(std::is_same_v<
+ net::awaitable<net::ip::tcp::resolver::results_type::const_iterator>, decltype(
+ stream.async_connect(
+ resolve_results.begin(),
+ resolve_results.end(),
+ comparison_function,
+ net::use_awaitable))>);
+ }
+#endif
+
void
run()
{
@@ -1307,6 +1360,11 @@ class basic_stream_test (public)
testMembers();
testJavadocs();
testIssue1589();
+
+#if BOOST_ASIO_HAS_CO_AWAIT
+ // test for compilation success only
+ boost::ignore_unused(&basic_stream_test::testAwaitableCompilation);
+#endif
}
};

View File

@ -1,49 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_core_buffered_read_stream_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/core/buffered_read_stream.cpp
--- libs/beast/test/beast/core/buffered_read_stream.cpp.orig
+++ libs/beast/test/beast/core/buffered_read_stream.cpp
@@ -21,6 +21,9 @@
#include <boost/asio/spawn.hpp>
#include <boost/asio/strand.hpp>
#include <boost/optional.hpp>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
namespace boost {
namespace beast {
@@ -211,6 +214,22 @@ class buffered_read_stream_test (public)
}
};
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(
+ buffered_read_stream<test::stream, flat_buffer>& stream,
+ net::mutable_buffer rxbuf,
+ net::const_buffer txbuf)
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ stream.async_read_some(rxbuf, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ stream.async_write_some(txbuf, net::use_awaitable))>);
+ }
+#endif
+
void run() override
{
testSpecialMembers();
@@ -221,6 +240,10 @@ class buffered_read_stream_test (public)
});
testAsyncLoop();
+
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&buffered_read_stream_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,43 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_core_detect_ssl_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/core/detect_ssl.cpp
--- libs/beast/test/beast/core/detect_ssl.cpp.orig
+++ libs/beast/test/beast/core/detect_ssl.cpp
@@ -16,6 +16,11 @@
#include <boost/beast/core/flat_buffer.hpp>
#include <boost/beast/core/string.hpp>
#include <boost/core/exchange.hpp>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/awaitable.hpp>
+#include <boost/asio/co_spawn.hpp>
+#include <boost/asio/use_awaitable.hpp>
+#endif
namespace boost {
namespace beast {
@@ -166,12 +171,25 @@ class detect_ssl_test : public unit_test::suite (publi
}
}
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(test::stream& stream, flat_buffer& b)
+ {
+ static_assert(
+ std::is_same_v<
+ net::awaitable<bool>, decltype(
+ async_detect_ssl(stream, b, net::use_awaitable))>);
+ }
+#endif
+
void
run() override
{
testDetect();
testRead();
testAsyncRead();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&detect_ssl_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,46 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_core_flat_stream_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/core/flat_stream.cpp
--- libs/beast/test/beast/core/flat_stream.cpp.orig
+++ libs/beast/test/beast/core/flat_stream.cpp
@@ -17,6 +17,9 @@
#include <boost/beast/core/role.hpp>
#include <initializer_list>
#include <vector>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
namespace boost {
namespace beast {
@@ -208,11 +211,30 @@ class flat_stream_test : public unit_test::suite (publ
check({1,2,3,4}, 3, 3, true);
}
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(
+ flat_stream<test::stream>& stream,
+ net::mutable_buffer rxbuf,
+ net::const_buffer txbuf)
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ stream.async_read_some(rxbuf, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ stream.async_write_some(txbuf, net::use_awaitable))>);
+ }
+#endif
+
void
run() override
{
testMembers();
testSplit();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&flat_stream_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,34 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_core_stream_traits_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/core/stream_traits.cpp
--- libs/beast/test/beast/core/stream_traits.cpp.orig
+++ libs/beast/test/beast/core/stream_traits.cpp
@@ -214,14 +214,14 @@ class stream_traits_test (public)
struct async_read_stream
{
net::io_context::executor_type get_executor() noexcept;
- template<class MutableBufferSequence, class ReadHandler>
+ template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
void async_read_some(MutableBufferSequence const&, ReadHandler&&);
};
struct async_write_stream
{
net::io_context::executor_type get_executor() noexcept;
- template<class ConstBufferSequence, class WriteHandler>
+ template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
void async_write_some(ConstBufferSequence const&, WriteHandler&&);
};
@@ -232,9 +232,9 @@ class stream_traits_test (public)
struct async_stream : async_read_stream, async_write_stream
{
net::io_context::executor_type get_executor() noexcept;
- template<class MutableBufferSequence, class ReadHandler>
+ template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
void async_read_some(MutableBufferSequence const&, ReadHandler&&);
- template<class ConstBufferSequence, class WriteHandler>
+ template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
void async_write_some(ConstBufferSequence const&, WriteHandler&&);
};

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_http_CMakeLists_txt,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/http/CMakeLists.txt
--- libs/beast/test/beast/http/CMakeLists.txt.orig
+++ libs/beast/test/beast/http/CMakeLists.txt
@@ -26,6 +26,7 @@ add_executable (tests-beast-http
empty_body.cpp
error.cpp
field.cpp
+ field_compiles.cpp
fields.cpp
file_body.cpp
message.cpp

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_http_Jamfile,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/http/Jamfile
--- libs/beast/test/beast/http/Jamfile.orig
+++ libs/beast/test/beast/http/Jamfile
@@ -16,6 +16,7 @@ local SOURCES =
dynamic_body.cpp
error.cpp
field.cpp
+ field_compiles.cpp
fields.cpp
file_body.cpp
message.cpp

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_http_field_compiles_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/http/field_compiles.cpp
--- libs/beast/test/beast/http/field_compiles.cpp.orig
+++ libs/beast/test/beast/http/field_compiles.cpp
@@ -0,0 +1,11 @@
+//
+// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail 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)
+//
+// Official repository: https://github.com/boostorg/beast
+//
+
+// Test that header file is self-contained.
+#include <boost/beast/http/field.hpp>

View File

@ -1,75 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_http_read_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/http/read.cpp
--- libs/beast/test/beast/http/read.cpp.orig
+++ libs/beast/test/beast/http/read.cpp
@@ -25,6 +25,9 @@
#include <boost/asio/strand.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <atomic>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
namespace boost {
namespace beast {
@@ -529,6 +532,49 @@ class read_test (public)
}
}
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(
+ test::stream& stream,
+ flat_buffer& dynbuf,
+ parser<true, string_body>& request_parser,
+ request<http::string_body>& request,
+ parser<false, string_body>& response_parser,
+ response<http::string_body>& response)
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_read(stream, dynbuf, request, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_read(stream, dynbuf, request_parser, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_read(stream, dynbuf, response, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_read(stream, dynbuf, response_parser, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_read_some(stream, dynbuf, request_parser, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_read_some(stream, dynbuf, response_parser, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_read_header(stream, dynbuf, request_parser, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_read_header(stream, dynbuf, response_parser, net::use_awaitable))>);
+ }
+#endif
+
void
run() override
{
@@ -552,6 +598,9 @@ class read_test (public)
testRegression430();
testReadGrind();
testAsioHandlerInvoke();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&read_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,85 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_http_write_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/http/write.cpp
--- libs/beast/test/beast/http/write.cpp.orig
+++ libs/beast/test/beast/http/write.cpp
@@ -26,6 +26,9 @@
#include <boost/asio/strand.hpp>
#include <sstream>
#include <string>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
namespace boost {
namespace beast {
@@ -994,6 +997,59 @@ class write_test (public)
}
}
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(
+ test::stream& stream,
+ serializer<true, string_body>& request_serializer,
+ request<string_body>& req,
+ request<string_body> const& creq,
+ serializer<false, string_body>& response_serializer,
+ response<string_body>& resp,
+ response<string_body> const& cresp)
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write(stream, request_serializer, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write(stream, response_serializer, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write(stream, req, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write(stream, creq, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write(stream, resp, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write(stream, cresp, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write_some(stream, request_serializer, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write_some(stream, response_serializer, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write_header(stream, request_serializer, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ http::async_write_header(stream, response_serializer, net::use_awaitable))>);
+ }
+#endif
+
+
void
run() override
{
@@ -1017,6 +1073,9 @@ class write_test (public)
});
testAsioHandlerInvoke();
testBodyWriters();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&write_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,54 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_websocket_accept_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/websocket/accept.cpp
--- libs/beast/test/beast/websocket/accept.cpp.orig
+++ libs/beast/test/beast/websocket/accept.cpp
@@ -14,7 +14,9 @@
#include <boost/beast/_experimental/test/tcp.hpp>
#include <boost/beast/_experimental/unit_test/suite.hpp>
#include "test.hpp"
-
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
namespace boost {
namespace beast {
namespace websocket {
@@ -810,6 +812,27 @@ class accept_test : public unit_test::suite //: public
}
}
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(
+ stream<net::ip::tcp::socket>& s,
+ http::request<http::empty_body>& req,
+ net::mutable_buffer buf
+ )
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<void>, decltype(
+ s.async_accept(net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<void>, decltype(
+ s.async_accept(req, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<void>, decltype(
+ s.async_accept(buf, net::use_awaitable))>);
+ }
+#endif
+
void
run() override
{
@@ -820,6 +843,9 @@ class accept_test : public unit_test::suite //: public
testInvalidInputs();
testEndOfStream();
testAsync();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&accept_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,41 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_websocket_close_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/websocket/close.cpp
--- libs/beast/test/beast/websocket/close.cpp.orig
+++ libs/beast/test/beast/websocket/close.cpp
@@ -16,6 +16,9 @@
#include <boost/asio/io_context.hpp>
#include <boost/asio/strand.hpp>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
namespace boost {
namespace beast {
@@ -735,6 +738,15 @@ class close_test : public websocket_test_suite (public
}
};
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(stream<test::stream>& s, close_reason cr )
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<void>, decltype(
+ s.async_close(cr, net::use_awaitable))>);
+ }
+#endif
+
void
run() override
{
@@ -742,6 +754,9 @@ class close_test : public websocket_test_suite (public
testTimeout();
testSuspend();
testMoveOnly();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&close_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,49 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_websocket_handshake_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/websocket/handshake.cpp
--- libs/beast/test/beast/websocket/handshake.cpp.orig
+++ libs/beast/test/beast/websocket/handshake.cpp
@@ -18,6 +18,9 @@
#include <boost/asio/io_context.hpp>
#include <boost/asio/strand.hpp>
#include <thread>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
namespace boost {
namespace beast {
@@ -704,6 +707,23 @@ class handshake_test : public websocket_test_suite (pu
}
}
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(
+ stream<test::stream>& s,
+ std::string host,
+ std::string port,
+ response_type& resp)
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<void>, decltype(
+ s.async_handshake(host, port, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<void>, decltype(
+ s.async_handshake(resp, host, port, net::use_awaitable))>);
+ }
+#endif
+
void
run() override
{
@@ -714,6 +734,9 @@ class handshake_test : public websocket_test_suite (pu
testMoveOnly();
testAsync();
testIssue1460();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&handshake_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,47 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_websocket_ping_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/websocket/ping.cpp
--- libs/beast/test/beast/websocket/ping.cpp.orig
+++ libs/beast/test/beast/websocket/ping.cpp
@@ -18,6 +18,10 @@
#include <boost/asio/io_context.hpp>
#include <boost/asio/strand.hpp>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
+
namespace boost {
namespace beast {
namespace websocket {
@@ -483,12 +487,30 @@ class ping_test : public websocket_test_suite (public)
}
};
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(
+ stream<test::stream>& s,
+ ping_data& pdat)
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<void>, decltype(
+ s.async_ping(pdat, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<void>, decltype(
+ s.async_pong(pdat, net::use_awaitable))>);
+ }
+#endif
+
void
run() override
{
testPing();
testSuspend();
testMoveOnly();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&ping_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,51 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_websocket_read2_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/websocket/read2.cpp
--- libs/beast/test/beast/websocket/read2.cpp.orig
+++ libs/beast/test/beast/websocket/read2.cpp
@@ -14,6 +14,10 @@
#include <boost/asio/write.hpp>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
+
#include <boost/config/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_GCC, < 80200)
#define BOOST_BEAST_SYMBOL_HIDDEN __attribute__ ((visibility("hidden")))
@@ -673,10 +677,34 @@ class BOOST_BEAST_SYMBOL_HIDDEN read2_test (public)
}
}
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(
+ stream<test::stream>& s,
+ flat_buffer& dynbuf,
+ net::mutable_buffer buf,
+ std::size_t limit)
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ s.async_read(dynbuf, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ s.async_read_some(buf, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ s.async_read_some(dynbuf, limit, net::use_awaitable))>);
+ }
+#endif
+
void
run() override
{
testRead();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&read2_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,49 +0,0 @@
$OpenBSD: patch-libs_beast_test_beast_websocket_write_cpp,v 1.1 2021/04/28 05:08:58 rsadowski Exp $
Index: libs/beast/test/beast/websocket/write.cpp
--- libs/beast/test/beast/websocket/write.cpp.orig
+++ libs/beast/test/beast/websocket/write.cpp
@@ -13,6 +13,10 @@
#include <boost/asio/io_context.hpp>
#include <boost/asio/strand.hpp>
+#if BOOST_ASIO_HAS_CO_AWAIT
+#include <boost/asio/use_awaitable.hpp>
+#endif
+
#include "test.hpp"
namespace boost {
@@ -716,6 +720,22 @@ class write_test : public websocket_test_suite (public
BEAST_EXPECT(n1 < n0 + s.size());
}
+#if BOOST_ASIO_HAS_CO_AWAIT
+ void testAwaitableCompiles(
+ stream<test::stream>& s,
+ net::mutable_buffer buf,
+ bool fin)
+ {
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ s.async_write(buf, net::use_awaitable))>);
+
+ static_assert(std::is_same_v<
+ net::awaitable<std::size_t>, decltype(
+ s.async_write_some(fin, buf, net::use_awaitable))>);
+ }
+#endif
+
void
run() override
{
@@ -726,6 +746,9 @@ class write_test : public websocket_test_suite (public
testMoveOnly();
testIssue300();
testIssue1666();
+#if BOOST_ASIO_HAS_CO_AWAIT
+ boost::ignore_unused(&write_test::testAwaitableCompiles);
+#endif
}
};

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-libs_filesystem_src_operations_cpp,v 1.5 2021/02/01 12:00:51 rsadowski Exp $
On OpenBSD 4.4 and newer, use statvfs to obtain filesystem space info.
Index: libs/filesystem/src/operations.cpp
--- libs/filesystem/src/operations.cpp.orig
+++ libs/filesystem/src/operations.cpp
@@ -68,6 +68,7 @@
#endif
#include <boost/filesystem/config.hpp>
+#include <boost/predef/os/bsd/open.h>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/file_status.hpp>
#include <boost/filesystem/exception.hpp>
@@ -97,8 +98,7 @@
# include <sys/types.h>
# include <sys/stat.h>
-# if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__) \
- && !defined(__VXWORKS__)
+# if !defined(__APPLE__) && (!defined(__OpenBSD__) || BOOST_OS_BSD_OPEN >= BOOST_VERSION_NUMBER(4, 4, 0)) && !defined(__ANDROID__) && !defined(__VXWORKS__)
# include <sys/statvfs.h>
# define BOOST_STATVFS statvfs
# define BOOST_STATVFS_F_FRSIZE vfs.f_frsize

View File

@ -1,21 +1,21 @@
$OpenBSD: patch-tools_build_src_engine_build_sh,v 1.2 2021/04/28 05:08:58 rsadowski Exp $
$OpenBSD: patch-tools_build_src_engine_build_sh,v 1.3 2021/06/22 04:20:13 rsadowski Exp $
Index: tools/build/src/engine/build.sh
--- tools/build/src/engine/build.sh.orig
+++ tools/build/src/engine/build.sh
@@ -233,7 +233,7 @@ case $B2_TOOLSET in
*)
B2_CXX="${CXX} -x c++ -std=c++11"
@@ -325,7 +325,7 @@ case "${B2_TOOLSET}" in
B2_CXX="${B2_CXX} -pthread"
;;
esac
- B2_CXXFLAGS_RELEASE="-O2 -s"
+ B2_CXXFLAGS_RELEASE=""
B2_CXXFLAGS_DEBUG="-O0 -g"
esac
;;
@@ -372,7 +372,7 @@ case $B2_TOOLSET in
CXX_VERSION_OPT=${CXX_VERSION_OPT:=--version}
B2_CXX="${CXX} -x c++ -std=c++11"
B2_TOOLSET=clang
@@ -391,7 +391,7 @@ case "${B2_TOOLSET}" in
clang*)
CXX_VERSION_OPT=${CXX_VERSION_OPT:---version}
- B2_CXXFLAGS_RELEASE="-O3 -s"
+ B2_CXXFLAGS_RELEASE=""
B2_CXXFLAGS_DEBUG="-O0 -fno-inline -g"

View File

@ -0,0 +1,91 @@
$OpenBSD: patch-tools_build_src_engine_jam_cpp,v 1.1 2021/06/22 04:20:13 rsadowski Exp $
[PATCH] Add a default exec path logic.
This adds default/fallback logic to determine the b2 exec absolute path
as possible. It uses the arg0 and current dir or path to construct the
liekliest path.
* Fix `b2` executable path determination for platforms that don't have a
native method of getting the path to executables, like OpenBSD.
Index: tools/build/src/engine/jam.cpp
--- tools/build/src/engine/jam.cpp.orig
+++ tools/build/src/engine/jam.cpp
@@ -707,76 +707,3 @@ int main( int argc, char * * argv )
return status ? EXITBAD : EXITOK;
}
-
-
-/*
- * executable_path()
- */
-
-#if defined(_WIN32)
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-char * executable_path( char const * argv0 )
-{
- char buf[ 1024 ];
- DWORD const ret = GetModuleFileNameA( NULL, buf, sizeof( buf ) );
- return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf );
-}
-#elif defined(__APPLE__) /* Not tested */
-# include <mach-o/dyld.h>
-char *executable_path( char const * argv0 )
-{
- char buf[ 1024 ];
- uint32_t size = sizeof( buf );
- return _NSGetExecutablePath( buf, &size ) ? NULL : strdup( buf );
-}
-#elif defined(sun) || defined(__sun) /* Not tested */
-# include <stdlib.h>
-char * executable_path( char const * argv0 )
-{
- const char * execname = getexecname();
- return execname ? strdup( execname ) : NULL;
-}
-#elif defined(__FreeBSD__)
-# include <sys/sysctl.h>
-char * executable_path( char const * argv0 )
-{
- int mib[ 4 ] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
- char buf[ 1024 ];
- size_t size = sizeof( buf );
- sysctl( mib, 4, buf, &size, NULL, 0 );
- return ( !size || size == sizeof( buf ) ) ? NULL : strndup( buf, size );
-}
-#elif defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__)
-# include <unistd.h>
-char * executable_path( char const * argv0 )
-{
- char buf[ 1024 ];
- ssize_t const ret = readlink( "/proc/self/exe", buf, sizeof( buf ) );
- return ( !ret || ret == sizeof( buf ) ) ? NULL : strndup( buf, ret );
-}
-#elif defined(OS_VMS)
-# include <unixlib.h>
-char * executable_path( char const * argv0 )
-{
- char * vms_path = NULL;
- char * posix_path = NULL;
- char * p;
-
- /* On VMS argv[0] shows absolute path to the image file.
- * So, just remove VMS file version and translate path to POSIX-style.
- */
- vms_path = strdup( argv0 );
- if ( vms_path && ( p = strchr( vms_path, ';') ) ) *p = '\0';
- posix_path = decc$translate_vms( vms_path );
- if ( vms_path ) free( vms_path );
-
- return posix_path > 0 ? strdup( posix_path ) : NULL;
-}
-#else
-char * executable_path( char const * argv0 )
-{
- /* If argv0 is an absolute path, assume it is the right absolute path. */
- return argv0[ 0 ] == '/' ? strdup( argv0 ) : NULL;
-}
-#endif

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-tools_build_src_engine_jam_h,v 1.3 2021/02/01 12:00:51 rsadowski Exp $
$OpenBSD: patch-tools_build_src_engine_jam_h,v 1.4 2021/06/22 04:20:13 rsadowski Exp $
Index: tools/build/src/engine/jam.h
--- tools/build/src/engine/jam.h.orig
+++ tools/build/src/engine/jam.h
@@ -321,7 +321,9 @@
@@ -328,7 +328,9 @@
#ifdef __OpenBSD__
#define OSMINOR "OS=OPENBSD"
#define OS_OPENBSD

View File

@ -0,0 +1,132 @@
$OpenBSD: patch-tools_build_src_engine_pathsys_cpp,v 1.1 2021/06/22 04:20:13 rsadowski Exp $
[PATCH] Add a default exec path logic.
This adds default/fallback logic to determine the b2 exec absolute path
as possible. It uses the arg0 and current dir or path to construct the
liekliest path.
* Fix `b2` executable path determination for platforms that don't have a
native method of getting the path to executables, like OpenBSD.
Index: tools/build/src/engine/pathsys.cpp
--- tools/build/src/engine/pathsys.cpp.orig
+++ tools/build/src/engine/pathsys.cpp
@@ -28,9 +28,10 @@
*/
#include "jam.h"
-#include "pathsys.h"
+#include "cwd.h"
#include "filesys.h"
+#include "pathsys.h"
#include <stdlib.h>
#include <time.h>
@@ -364,3 +365,105 @@ std::string b2::paths::normalize(const std::string &p)
return result;
}
+
+
+/*
+ * executable_path()
+ */
+
+#if defined(_WIN32)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+char * executable_path( char const * argv0 )
+{
+ char buf[ 1024 ];
+ DWORD const ret = GetModuleFileNameA( NULL, buf, sizeof( buf ) );
+ return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf );
+}
+#elif defined(__APPLE__) /* Not tested */
+# include <mach-o/dyld.h>
+char *executable_path( char const * argv0 )
+{
+ char buf[ 1024 ];
+ uint32_t size = sizeof( buf );
+ return _NSGetExecutablePath( buf, &size ) ? NULL : strdup( buf );
+}
+#elif defined(sun) || defined(__sun) /* Not tested */
+# include <stdlib.h>
+char * executable_path( char const * argv0 )
+{
+ const char * execname = getexecname();
+ return execname ? strdup( execname ) : NULL;
+}
+#elif defined(__FreeBSD__)
+# include <sys/sysctl.h>
+char * executable_path( char const * argv0 )
+{
+ int mib[ 4 ] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
+ char buf[ 1024 ];
+ size_t size = sizeof( buf );
+ sysctl( mib, 4, buf, &size, NULL, 0 );
+ return ( !size || size == sizeof( buf ) ) ? NULL : strndup( buf, size );
+}
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__)
+# include <unistd.h>
+char * executable_path( char const * argv0 )
+{
+ char buf[ 1024 ];
+ ssize_t const ret = readlink( "/proc/self/exe", buf, sizeof( buf ) );
+ return ( !ret || ret == sizeof( buf ) ) ? NULL : strndup( buf, ret );
+}
+#elif defined(OS_VMS)
+# include <unixlib.h>
+char * executable_path( char const * argv0 )
+{
+ char * vms_path = NULL;
+ char * posix_path = NULL;
+ char * p;
+
+ /* On VMS argv[0] shows absolute path to the image file.
+ * So, just remove VMS file version and translate path to POSIX-style.
+ */
+ vms_path = strdup( argv0 );
+ if ( vms_path && ( p = strchr( vms_path, ';') ) ) *p = '\0';
+ posix_path = decc$translate_vms( vms_path );
+ if ( vms_path ) free( vms_path );
+
+ return posix_path > 0 ? strdup( posix_path ) : NULL;
+}
+#else
+char * executable_path( char const * argv0 )
+{
+ char * result = nullptr;
+ /* If argv0 is an absolute path, assume it is the right absolute path. */
+ if (!result && b2::paths::is_rooted(argv0))
+ result = strdup( argv0 );
+ // If argv0 is a relative path, we can compute the absolute one from the
+ // current working dir.
+ if (!result && b2::paths::is_relative(argv0))
+ {
+ auto p = b2::paths::normalize(b2::cwd_str()+"/"+argv0);
+ result = strdup( p.c_str() );
+ }
+ // If it's a bare basename, search the PATH for a match.
+ if (!result)
+ {
+ std::string path_env = getenv( "PATH" );
+ std::string::size_type i = 0;
+ while (i != std::string::npos)
+ {
+ std::string::size_type e = path_env.find_first_of(':', i);
+ std::string p = e == std::string::npos
+ ? path_env.substr(i)
+ : path_env.substr(i, e-i);
+ if (b2::filesys::is_file(p+"/"+argv0))
+ {
+ result = strdup( (p+"/"+argv0).c_str() );
+ break;
+ }
+ i = e == std::string::npos ? e : e+1;
+ }
+ }
+ return result;
+}
+#endif

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-tools_build_src_engine_pathsys_h,v 1.1 2021/06/22 04:20:13 rsadowski Exp $
[PATCH] Add a default exec path logic.
This adds default/fallback logic to determine the b2 exec absolute path
as possible. It uses the arg0 and current dir or path to construct the
liekliest path.
* Fix `b2` executable path determination for platforms that don't have a
native method of getting the path to executables, like OpenBSD.
Index: tools/build/src/engine/pathsys.h
--- tools/build/src/engine/pathsys.h.orig
+++ tools/build/src/engine/pathsys.h
@@ -108,6 +108,14 @@ namespace b2
(p.size() >= 1 && (p[0] == '/' || p[0] == '\\'));
#endif
}
+ inline bool is_relative(const std::string &p)
+ {
+ return
+ (p.size() >= 3 && (
+ (p[0] == '.' && p[1] == '.' && (p[2] == '/' || p[2] == '\\')) ||
+ (p[0] == '.' && (p[1] == '/' || p[1] == '\\'))
+ ));
+ }
std::string normalize(const std::string &p);
}
}

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-tools_build_src_tools_gcc_jam,v 1.11 2021/04/28 05:08:58 rsadowski Exp $
$OpenBSD: patch-tools_build_src_tools_gcc_jam,v 1.12 2021/06/22 04:20:13 rsadowski Exp $
Index: tools/build/src/tools/gcc.jam
--- tools/build/src/tools/gcc.jam.orig
+++ tools/build/src/tools/gcc.jam
@@ -708,7 +708,7 @@ actions compile.c.pch
@@ -705,7 +705,7 @@ actions compile.c.pch
# Declare flags and action for compilation.
toolset.flags gcc.compile OPTIONS <optimization>off : -O0 ;
@ -12,7 +12,7 @@ Index: tools/build/src/tools/gcc.jam
toolset.flags gcc.compile OPTIONS <optimization>space : -Os ;
toolset.flags gcc.compile OPTIONS <inlining>off : -fno-inline ;
@@ -1274,7 +1274,7 @@ cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
@@ -1288,7 +1288,7 @@ cpu-flags gcc OPTIONS : x86 : c7 : -march=c7 ;
##
cpu-flags gcc OPTIONS : x86 : atom : -march=atom ;
# Sparc

File diff suppressed because it is too large Load Diff