From 949c6967871ab089c29d9078a7ccc285873279ee Mon Sep 17 00:00:00 2001 From: brianlheim Date: Tue, 25 Aug 2020 17:55:43 -0500 Subject: [PATCH 1/4] remove outdated #define snprintf _snprintf mucks up windows builds with boost 1.74 --- common/SC_Win32Utils.h | 1 - lang/LangSource/DumpParseNode.cpp | 1 - lang/LangSource/SC_LanguageClient.cpp | 1 - 3 files changed, 3 deletions(-) diff --git a/common/SC_Win32Utils.h b/common/SC_Win32Utils.h index 83c62ca54..c343935ab 100644 --- a/common/SC_Win32Utils.h +++ b/common/SC_Win32Utils.h @@ -51,7 +51,6 @@ # if _MSC_VER typedef int pid_t; -# define snprintf _snprintf # endif void win32_ReplaceCharInString(char* string, int len, char src, char dst); diff --git a/lang/LangSource/DumpParseNode.cpp b/lang/LangSource/DumpParseNode.cpp index 84c852c6f..4313809a8 100644 --- a/lang/LangSource/DumpParseNode.cpp +++ b/lang/LangSource/DumpParseNode.cpp @@ -30,7 +30,6 @@ #include #ifdef _WIN32 -# define snprintf _snprintf # define PATH_MAX _MAX_PATH #endif diff --git a/lang/LangSource/SC_LanguageClient.cpp b/lang/LangSource/SC_LanguageClient.cpp index 59531adcb..af7c15b87 100644 --- a/lang/LangSource/SC_LanguageClient.cpp +++ b/lang/LangSource/SC_LanguageClient.cpp @@ -32,7 +32,6 @@ #ifdef _WIN32 # include # include -# define snprintf _snprintf # ifndef PATH_MAX # define PATH_MAX _MAX_PATH # endif -- 2.28.0 From 77700bd0ffb6c612bb505922aff370303c67c7df Mon Sep 17 00:00:00 2001 From: brianlheim Date: Tue, 25 Aug 2020 17:14:32 -0500 Subject: [PATCH 2/4] supernova: fix c++17 compilation error fix error in sc_plugin_container when compiling under C++17: use checked_deleter instead of checked_delete, as clear_and_dispose expects a functor type --- server/supernova/sc/sc_ugen_factory.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/supernova/sc/sc_ugen_factory.hpp b/server/supernova/sc/sc_ugen_factory.hpp index 16460945a..21834c4ad 100644 --- a/server/supernova/sc/sc_ugen_factory.hpp +++ b/server/supernova/sc/sc_ugen_factory.hpp @@ -139,9 +139,9 @@ protected: cmdplugin_set(cmdplugin_set_type::bucket_traits(cmdplugin_set_buckets, cmdplugin_set_bucket_count)) {} ~sc_plugin_container(void) { - ugen_set.clear_and_dispose(boost::checked_delete); - bufgen_set.clear_and_dispose(boost::checked_delete); - cmdplugin_set.clear_and_dispose(boost::checked_delete); + ugen_set.clear_and_dispose(boost::checked_deleter()); + bufgen_set.clear_and_dispose(boost::checked_deleter()); + cmdplugin_set.clear_and_dispose(boost::checked_deleter()); } public: -- 2.28.0 From 7b64c4484ec5142b0321e260cfb4148561e9bae5 Mon Sep 17 00:00:00 2001 From: brianlheim Date: Tue, 25 Aug 2020 17:14:29 -0500 Subject: [PATCH 3/4] remove workarounds for old boost versions we don't need to support boost pre-1.70 anymore, and tcp::socket::executor_type was always the right typealias to use --- server/supernova/sc/sc_osc_handler.hpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/server/supernova/sc/sc_osc_handler.hpp b/server/supernova/sc/sc_osc_handler.hpp index a1a30d628..ba767a835 100644 --- a/server/supernova/sc/sc_osc_handler.hpp +++ b/server/supernova/sc/sc_osc_handler.hpp @@ -229,11 +229,7 @@ public: class tcp_connection : public nova_endpoint { public: using pointer = std::shared_ptr; -#if BOOST_VERSION >= 107000 - using executor = boost::asio::executor; -#else - using executor = boost::asio::io_context::executor_type; -#endif + using executor = tcp::socket::executor_type; static pointer create(const executor& executor) { return pointer(new tcp_connection(executor)); } @@ -244,11 +240,7 @@ public: bool operator==(tcp_connection const& rhs) const { return &rhs == this; } private: -#if BOOST_VERSION >= 107000 tcp_connection(const executor& executor): socket_(executor) {} -#else - tcp_connection(const executor& executor): socket_(executor.context()) {} -#endif void send(const char* data, size_t length) override final; -- 2.28.0 From 2d32afd25823e6cb263d0cb531b08e25e27ca725 Mon Sep 17 00:00:00 2001 From: brianlheim Date: Tue, 25 Aug 2020 17:14:23 -0500 Subject: [PATCH 4/4] fix boost deprecation warnings use boost/bind/bind.hpp instead of boost/bind.hpp --- lang/LangPrimSource/PyrSerialPrim.cpp | 2 +- lang/LangPrimSource/SC_ComPort.cpp | 2 +- lang/LangSource/SC_TerminalClient.cpp | 4 +++- server/scsynth/SC_ComPort.cpp | 2 +- server/supernova/sc/sc_osc_handler.cpp | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lang/LangPrimSource/PyrSerialPrim.cpp b/lang/LangPrimSource/PyrSerialPrim.cpp index 7e5f94091..cc56abdce 100644 --- a/lang/LangPrimSource/PyrSerialPrim.cpp +++ b/lang/LangPrimSource/PyrSerialPrim.cpp @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include diff --git a/lang/LangPrimSource/SC_ComPort.cpp b/lang/LangPrimSource/SC_ComPort.cpp index 19238dc81..6d2b54b84 100644 --- a/lang/LangPrimSource/SC_ComPort.cpp +++ b/lang/LangPrimSource/SC_ComPort.cpp @@ -33,7 +33,7 @@ #include "SC_ReplyImpl.hpp" #include -#include +#include #include #define scprintf printf diff --git a/lang/LangSource/SC_TerminalClient.cpp b/lang/LangSource/SC_TerminalClient.cpp index 1b993d981..bc3710ca2 100644 --- a/lang/LangSource/SC_TerminalClient.cpp +++ b/lang/LangSource/SC_TerminalClient.cpp @@ -29,7 +29,7 @@ # include "../../QtCollider/LanguageClient.h" #endif -#include +#include #ifdef _WIN32 # define __GNU_LIBRARY__ @@ -63,6 +63,8 @@ #include +using namespace boost::placeholders; + static FILE* gPostDest = stdout; #ifdef _WIN32 diff --git a/server/scsynth/SC_ComPort.cpp b/server/scsynth/SC_ComPort.cpp index 3ab9e9bdb..c8c418675 100644 --- a/server/scsynth/SC_ComPort.cpp +++ b/server/scsynth/SC_ComPort.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include diff --git a/server/supernova/sc/sc_osc_handler.cpp b/server/supernova/sc/sc_osc_handler.cpp index ef2a00b14..c08abf590 100644 --- a/server/supernova/sc/sc_osc_handler.cpp +++ b/server/supernova/sc/sc_osc_handler.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include "osc/OscOutboundPacketStream.h" -- 2.28.0