--- rstudio-1.1.463-orig/src/cpp/session/modules/SessionPlots.hpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/SessionPlots.hpp	2018-11-17 21:24:35.292976352 +1100
@@ -16,7 +16,7 @@
 #ifndef SESSION_PLOTS_HPP
 #define SESSION_PLOTS_HPP
 
-#include <boost/signals.hpp>
+#include <core/BoostSignals.hpp>
 
 namespace rstudio {
 namespace core {
@@ -35,9 +35,9 @@
 
 struct Events : boost::noncopyable
 {
-   boost::signal<void()> onBeforeNewPlot;
-   boost::signal<void()> onBeforeNewGridPage;
-   boost::signal<void()> onNewPlot;
+   RSTUDIO_BOOST_SIGNAL<void()> onBeforeNewPlot;
+   RSTUDIO_BOOST_SIGNAL<void()> onBeforeNewGridPage;
+   RSTUDIO_BOOST_SIGNAL<void()> onNewPlot;
 };
 
 Events& events();
--- rstudio-1.1.463-orig/src/cpp/session/modules/build/SessionSourceCpp.cpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/build/SessionSourceCpp.cpp	2018-11-17 21:24:35.293976361 +1100
@@ -15,11 +15,11 @@
 
 #include "SessionSourceCpp.hpp"
 
-#include <boost/signal.hpp>
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/algorithm/string/join.hpp>
 
+#include <core/BoostSignals.hpp>
 #include <core/Error.hpp>
 #include <core/FilePath.hpp>
 #include <core/StringUtils.hpp>
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookAlternateEngines.cpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookAlternateEngines.cpp	2018-11-17 21:24:35.294976371 +1100
@@ -142,7 +142,7 @@
       LOG_ERROR(error);
    
    // capture console output, error
-   boost::signals::scoped_connection consoleHandler =
+   RSTUDIO_BOOST_SCOPED_CONNECTION consoleHandler =
          module_context::events().onConsoleOutput.connect(
             boost::bind(chunkConsoleOutputHandler,
                         _1,
@@ -219,7 +219,7 @@
       LOG_ERROR(error);
    
    // capture console output, error
-   boost::signals::scoped_connection consoleHandler =
+   RSTUDIO_BOOST_SCOPED_CONNECTION consoleHandler =
          module_context::events().onConsoleOutput.connect(
             boost::bind(chunkConsoleOutputHandler,
                         _1,
@@ -363,7 +363,7 @@
       LOG_ERROR(error);
    
    // capture console output, error
-   boost::signals::scoped_connection consoleHandler =
+   RSTUDIO_BOOST_SCOPED_CONNECTION consoleHandler =
          module_context::events().onConsoleOutput.connect(
             boost::bind(chunkConsoleOutputHandler,
                         _1,
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookCapture.cpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookCapture.cpp	2018-11-17 21:24:35.294976371 +1100
@@ -16,6 +16,8 @@
 #include "SessionRmdNotebook.hpp"
 #include "NotebookCapture.hpp"
 
+#include <boost/make_shared.hpp>
+
 namespace rstudio {
 namespace session {
 namespace modules {
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookExec.cpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookExec.cpp	2018-11-17 21:24:35.295976381 +1100
@@ -441,7 +441,7 @@
    }
 
    // unhook all our event handlers
-   BOOST_FOREACH(const boost::signals::connection connection, connections_) 
+   BOOST_FOREACH(const RSTUDIO_BOOST_CONNECTION connection, connections_) 
    {
       connection.disconnect();
    }
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookExec.hpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookExec.hpp	2018-11-17 21:24:35.295976381 +1100
@@ -18,8 +18,7 @@
 
 #include <session/SessionModuleContext.hpp>
 
-#include <boost/signal.hpp>
-
+#include <core/BoostSignals.hpp>
 #include <core/json/Json.hpp>
 
 #include <r/RSexp.hpp>
@@ -99,7 +98,7 @@
    bool hasErrors_;
 
    std::vector<boost::shared_ptr<NotebookCapture> > captures_;
-   std::vector<boost::signals::connection> connections_;
+   std::vector<RSTUDIO_BOOST_CONNECTION> connections_;
 };
 
 } // namespace notebook
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookPlots.cpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookPlots.cpp	2018-11-17 21:24:35.295976381 +1100
@@ -20,11 +20,12 @@
 
 #include <boost/format.hpp>
 #include <boost/foreach.hpp>
-#include <boost/signals/connection.hpp>
 
-#include <core/system/FileMonitor.hpp>
-#include <core/StringUtils.hpp>
+#include <core/BoostSignals.hpp>
 #include <core/Exec.hpp>
+#include <core/StringUtils.hpp>
+
+#include <core/system/FileMonitor.hpp>
 
 #include <session/SessionModuleContext.hpp>
 
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookPlots.hpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookPlots.hpp	2018-11-17 21:24:35.296976391 +1100
@@ -18,8 +18,10 @@
 #define SESSION_NOTEBOOK_PLOTS_HPP
 
 #include <boost/function.hpp>
-#include <boost/signals/connection.hpp>
+
+#include <core/BoostSignals.hpp>
 #include <core/FilePath.hpp>
+
 #include <r/RSexp.hpp>
 
 #include "NotebookCapture.hpp"
@@ -80,9 +82,9 @@
 
    unsigned lastOrdinal_;
 
-   boost::signals::connection onBeforeNewPlot_;
-   boost::signals::connection onBeforeNewGridPage_;
-   boost::signals::connection onNewPlot_;
+   RSTUDIO_BOOST_CONNECTION onBeforeNewPlot_;
+   RSTUDIO_BOOST_CONNECTION onBeforeNewGridPage_;
+   RSTUDIO_BOOST_CONNECTION onNewPlot_;
 
    double width_;
    double height_;
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/NotebookQueue.cpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/NotebookQueue.cpp	2018-11-17 21:24:35.296976391 +1100
@@ -87,7 +87,7 @@
       pInput_->enque(kThreadQuitCommand);
 
       // unregister handlers
-      BOOST_FOREACH(boost::signals::connection connection, handlers_)
+      BOOST_FOREACH(RSTUDIO_BOOST_CONNECTION connection, handlers_)
       {
          connection.disconnect();
       }
@@ -651,7 +651,7 @@
    boost::shared_ptr<ChunkExecContext> execContext_;
 
    // registered signal handlers
-   std::vector<boost::signals::connection> handlers_;
+   std::vector<RSTUDIO_BOOST_CONNECTION> handlers_;
 
    // the thread which submits console input, and the queue which feeds it
    boost::thread console_;
--- rstudio-1.1.463-orig/src/cpp/session/modules/rmarkdown/SessionRmdNotebook.hpp	2018-10-25 09:42:55.000000000 +1100
+++ rstudio-1.1.463/src/cpp/session/modules/rmarkdown/SessionRmdNotebook.hpp	2018-11-17 21:24:35.296976391 +1100
@@ -18,7 +18,8 @@
 #define SESSION_RMARKDOWN_NOTEBOOK_HPP
 
 #include <ctime>
-#include <boost/signals.hpp>
+
+#include <core/BoostSignals.hpp>
 #include <core/json/Json.hpp>
 
 #define kChunkLibDir "lib"
@@ -76,24 +77,24 @@
 struct Events : boost::noncopyable
 {
    // Document {0}, chunk {1} from context id {3} execution completed
-   boost::signal<void(const std::string&, const std::string&,
+   RSTUDIO_BOOST_SIGNAL<void(const std::string&, const std::string&,
                       const std::string&)> 
                 onChunkExecCompleted;
 
    // Document {0}, chunk {1} had console output of type {2} and text {3}
-   boost::signal<void(const std::string&, const std::string&, int, 
+   RSTUDIO_BOOST_SIGNAL<void(const std::string&, const std::string&, int, 
                 const std::string&)>
                 onChunkConsoleOutput;
 
-   boost::signal<void(const core::FilePath&, const core::FilePath&, 
+   RSTUDIO_BOOST_SIGNAL<void(const core::FilePath&, const core::FilePath&, 
                       const core::json::Value& metadata, unsigned ordinal)> 
                          onPlotOutput;
-   boost::signal<void(const core::FilePath&, const core::FilePath&,
+   RSTUDIO_BOOST_SIGNAL<void(const core::FilePath&, const core::FilePath&,
                       const core::json::Value& metadata)> onHtmlOutput;
-   boost::signal<void(const core::json::Object&)> onErrorOutput;
-   boost::signal<void(const core::FilePath&, const core::FilePath&,
+   RSTUDIO_BOOST_SIGNAL<void(const core::json::Object&)> onErrorOutput;
+   RSTUDIO_BOOST_SIGNAL<void(const core::FilePath&, const core::FilePath&,
                       const core::json::Value& metadata)> onDataOutput;
-   boost::signal<void(Condition condition, const std::string& message)> 
+   RSTUDIO_BOOST_SIGNAL<void(Condition condition, const std::string& message)> 
                          onCondition;
 };
 
