From bf2ac9ec81f27393796598fe233e6c3780868452 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 16 Jul 2020 13:07:34 +0200 Subject: [PATCH] boost: Include bind.hpp where used, add BOOST_BIND_GLOBAL_PLACEHOLDERS Consists of two changes: - Grepped for files that use boost::bind, but don't include boost/bind.hpp. Changed all of those to include bind.hpp - Add BOOST_BIND_GLOBAL_PLACEHOLDERS so that Boost doesn't complain about using bind placeholders in the global namespace. Background: boost/bind.hpp is a convenience header that pulls the Boost bind placeholders into the global namespace, but that's deprecated behaviour. For UHD 3.15, we'll keep the deprecated behaviour (modern UHD no longer uses Boost.Bind), so this fixes build failures with modern Boost, and related warnings. (cherry picked from commit 13caaf001061db3c01082c4574a5e326c4969ab6) --- host/cmake/Modules/UHDBoost.cmake | 3 +++ host/examples/network_relay.cpp | 1 + host/examples/rfnoc_rx_to_file.cpp | 1 + host/examples/test_clock_synch.cpp | 1 + host/examples/txrx_loopback_to_file.cpp | 1 + host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp | 1 + host/lib/rfnoc/legacy_compat.cpp | 1 + host/lib/transport/xport_benchmarker.cpp | 1 + host/lib/usrp/b100/b100_impl.cpp | 1 + host/lib/usrp/b200/b200_iface.cpp | 1 + host/lib/usrp/b200/b200_impl.cpp | 1 + host/lib/usrp/cores/rx_dsp_core_3000.cpp | 1 + host/lib/usrp/cores/tx_dsp_core_3000.cpp | 1 + host/lib/usrp/dboard/db_cbx.cpp | 1 + host/lib/usrp/dboard/db_dbsrx.cpp | 1 + host/lib/usrp/dboard/db_dbsrx2.cpp | 1 + host/lib/usrp/dboard/db_sbx_common.cpp | 1 + host/lib/usrp/dboard/db_sbx_version3.cpp | 1 + host/lib/usrp/dboard/db_sbx_version4.cpp | 1 + host/lib/usrp/dboard/db_tvrx.cpp | 1 + host/lib/usrp/dboard/db_tvrx2.cpp | 1 + host/lib/usrp/dboard/db_twinrx.cpp | 1 + host/lib/usrp/dboard/db_ubx.cpp | 1 + host/lib/usrp/dboard/db_wbx_common.cpp | 1 + host/lib/usrp/dboard/db_wbx_simple.cpp | 1 + host/lib/usrp/dboard/db_wbx_version2.cpp | 1 + host/lib/usrp/dboard/db_wbx_version3.cpp | 1 + host/lib/usrp/dboard/db_wbx_version4.cpp | 1 + host/lib/usrp/dboard/db_xcvr2450.cpp | 1 + host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp | 1 + host/lib/usrp/multi_usrp.cpp | 1 + host/lib/usrp/n230/n230_resource_manager.cpp | 1 + host/lib/usrp/n230/n230_uart.cpp | 1 + host/lib/usrp/usrp1/soft_time_ctrl.cpp | 1 + host/lib/usrp/usrp1/usrp1_impl.cpp | 1 + host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 1 + host/lib/usrp_clock/octoclock/octoclock_impl.cpp | 1 + host/lib/utils/ihex.cpp | 1 + host/lib/utils/tasks.cpp | 1 + host/utils/uhd_cal_rx_iq_balance.cpp | 1 + host/utils/uhd_cal_tx_dc_offset.cpp | 1 + host/utils/uhd_cal_tx_iq_balance.cpp | 1 + 42 files changed, 44 insertions(+) diff --git a/host/cmake/Modules/UHDBoost.cmake b/host/cmake/Modules/UHDBoost.cmake index 5ebb4acef..e3ee42b50 100644 --- a/host/cmake/Modules/UHDBoost.cmake +++ b/host/cmake/Modules/UHDBoost.cmake @@ -259,6 +259,9 @@ else() # disable Boost's use of std::experimental::string_view # works for Boost 1.67.0 and newer & doesn't hurt older add_definitions(-DBOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) + # UHD 3.15 still uses global placeholders (_1, _2, ...) from Boost which + # need to be enabled explicitly for some Boost versions + add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS) # Boost 1.70.0's find cmake scripts don't always set the expected # return variables. Replicate the commit that fixes that issue here: diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp index bf2ac9255..9a9f56eb5 100644 --- a/host/examples/network_relay.cpp +++ b/host/examples/network_relay.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/host/examples/rfnoc_rx_to_file.cpp b/host/examples/rfnoc_rx_to_file.cpp index 5bb9985ae..cbd35cbe8 100644 --- a/host/examples/rfnoc_rx_to_file.cpp +++ b/host/examples/rfnoc_rx_to_file.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/host/examples/test_clock_synch.cpp b/host/examples/test_clock_synch.cpp index 8556063d7..ec071f7c7 100644 --- a/host/examples/test_clock_synch.cpp +++ b/host/examples/test_clock_synch.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp index 271d249f6..a2f0427c9 100644 --- a/host/examples/txrx_loopback_to_file.cpp +++ b/host/examples/txrx_loopback_to_file.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp b/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp index a80e2ef53..b78635002 100644 --- a/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp +++ b/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp index 91de361df..f93fe871a 100644 --- a/host/lib/rfnoc/legacy_compat.cpp +++ b/host/lib/rfnoc/legacy_compat.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/host/lib/transport/xport_benchmarker.cpp b/host/lib/transport/xport_benchmarker.cpp index 67582ff2c..7abd4c5fd 100644 --- a/host/lib/transport/xport_benchmarker.cpp +++ b/host/lib/transport/xport_benchmarker.cpp @@ -6,6 +6,7 @@ // #include "xport_benchmarker.hpp" +#include #include #include diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp index cd4319803..08006ae32 100644 --- a/host/lib/usrp/b100/b100_impl.cpp +++ b/host/lib/usrp/b100/b100_impl.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp index 082be071c..cdf88f69b 100644 --- a/host/lib/usrp/b200/b200_iface.cpp +++ b/host/lib/usrp/b200/b200_iface.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 1be8c263b..ab6cc5118 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp index 46fce3f69..ff7caf105 100644 --- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp +++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include //thread sleep #include diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.cpp b/host/lib/usrp/cores/tx_dsp_core_3000.cpp index be7593841..b76a74b1c 100644 --- a/host/lib/usrp/cores/tx_dsp_core_3000.cpp +++ b/host/lib/usrp/cores/tx_dsp_core_3000.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include //sleep #include diff --git a/host/lib/usrp/dboard/db_cbx.cpp b/host/lib/usrp/dboard/db_cbx.cpp index dd0640d00..f5c7f2399 100644 --- a/host/lib/usrp/dboard/db_cbx.cpp +++ b/host/lib/usrp/dboard/db_cbx.cpp @@ -7,6 +7,7 @@ #include "db_sbx_common.hpp" #include +#include #include using namespace uhd; diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp index 587158470..dc82b60f9 100644 --- a/host/lib/usrp/dboard/db_dbsrx.cpp +++ b/host/lib/usrp/dboard/db_dbsrx.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp index e2505dfd7..da4da4148 100644 --- a/host/lib/usrp/dboard/db_dbsrx2.cpp +++ b/host/lib/usrp/dboard/db_dbsrx2.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_sbx_common.cpp b/host/lib/usrp/dboard/db_sbx_common.cpp index b6eaedc3d..95aff96b4 100644 --- a/host/lib/usrp/dboard/db_sbx_common.cpp +++ b/host/lib/usrp/dboard/db_sbx_common.cpp @@ -6,6 +6,7 @@ // #include "db_sbx_common.hpp" +#include using namespace uhd; using namespace uhd::usrp; diff --git a/host/lib/usrp/dboard/db_sbx_version3.cpp b/host/lib/usrp/dboard/db_sbx_version3.cpp index 369315b2e..fb829cf34 100644 --- a/host/lib/usrp/dboard/db_sbx_version3.cpp +++ b/host/lib/usrp/dboard/db_sbx_version3.cpp @@ -9,6 +9,7 @@ #include "db_sbx_common.hpp" #include #include +#include using namespace uhd; using namespace uhd::usrp; diff --git a/host/lib/usrp/dboard/db_sbx_version4.cpp b/host/lib/usrp/dboard/db_sbx_version4.cpp index d1c76287b..e1adebf99 100644 --- a/host/lib/usrp/dboard/db_sbx_version4.cpp +++ b/host/lib/usrp/dboard/db_sbx_version4.cpp @@ -9,6 +9,7 @@ #include "db_sbx_common.hpp" #include #include +#include using namespace uhd; using namespace uhd::usrp; diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp index 8bf377c4d..5fbbf5bee 100644 --- a/host/lib/usrp/dboard/db_tvrx.cpp +++ b/host/lib/usrp/dboard/db_tvrx.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_tvrx2.cpp b/host/lib/usrp/dboard/db_tvrx2.cpp index 5dba83551..e1623487d 100644 --- a/host/lib/usrp/dboard/db_tvrx2.cpp +++ b/host/lib/usrp/dboard/db_tvrx2.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_twinrx.cpp b/host/lib/usrp/dboard/db_twinrx.cpp index de1cd3f33..aa9da8adf 100644 --- a/host/lib/usrp/dboard/db_twinrx.cpp +++ b/host/lib/usrp/dboard/db_twinrx.cpp @@ -19,6 +19,7 @@ #include #include #include "dboard_ctor_args.hpp" +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp index 305a69c52..e78f9db75 100644 --- a/host/lib/usrp/dboard/db_ubx.cpp +++ b/host/lib/usrp/dboard/db_ubx.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_wbx_common.cpp b/host/lib/usrp/dboard/db_wbx_common.cpp index 41f323d19..fd7b2481a 100644 --- a/host/lib/usrp/dboard/db_wbx_common.cpp +++ b/host/lib/usrp/dboard/db_wbx_common.cpp @@ -12,6 +12,7 @@ #include #include #include +#include using namespace uhd; using namespace uhd::usrp; diff --git a/host/lib/usrp/dboard/db_wbx_simple.cpp b/host/lib/usrp/dboard/db_wbx_simple.cpp index 390c5c47a..e3a5667c7 100644 --- a/host/lib/usrp/dboard/db_wbx_simple.cpp +++ b/host/lib/usrp/dboard/db_wbx_simple.cpp @@ -17,6 +17,7 @@ #include #include #include +#include using namespace uhd; using namespace uhd::usrp; diff --git a/host/lib/usrp/dboard/db_wbx_version2.cpp b/host/lib/usrp/dboard/db_wbx_version2.cpp index 775ee4467..f1bf7dacc 100644 --- a/host/lib/usrp/dboard/db_wbx_version2.cpp +++ b/host/lib/usrp/dboard/db_wbx_version2.cpp @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp index 41979f8ef..b755d09a2 100644 --- a/host/lib/usrp/dboard/db_wbx_version3.cpp +++ b/host/lib/usrp/dboard/db_wbx_version3.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_wbx_version4.cpp b/host/lib/usrp/dboard/db_wbx_version4.cpp index 8b3d13b37..f2976d3a7 100644 --- a/host/lib/usrp/dboard/db_wbx_version4.cpp +++ b/host/lib/usrp/dboard/db_wbx_version4.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index 9e1c9f2b0..8f95dbb1c 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp index 73851656b..717fa144f 100644 --- a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp +++ b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 49ffec698..13cb03cf9 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/n230/n230_resource_manager.cpp b/host/lib/usrp/n230/n230_resource_manager.cpp index 22f8ddedb..df3c9fb15 100644 --- a/host/lib/usrp/n230/n230_resource_manager.cpp +++ b/host/lib/usrp/n230/n230_resource_manager.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/n230/n230_uart.cpp b/host/lib/usrp/n230/n230_uart.cpp index 8689335c8..26fafde94 100644 --- a/host/lib/usrp/n230/n230_uart.cpp +++ b/host/lib/usrp/n230/n230_uart.cpp @@ -13,6 +13,7 @@ #include #include #include +#include using namespace uhd; using namespace uhd::transport; diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.cpp b/host/lib/usrp/usrp1/soft_time_ctrl.cpp index 7f39caf8a..9a84ee188 100644 --- a/host/lib/usrp/usrp1/soft_time_ctrl.cpp +++ b/host/lib/usrp/usrp1/soft_time_ctrl.cpp @@ -8,6 +8,7 @@ #include "soft_time_ctrl.hpp" #include #include +#include #include #include #include diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp index 2134f8182..1e83ce3fc 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.cpp +++ b/host/lib/usrp/usrp1/usrp1_impl.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp index 8d967ae15..de36379ea 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp index f3cf3f4ea..c48649b45 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp +++ b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/utils/ihex.cpp b/host/lib/utils/ihex.cpp index 6bb0ba9d4..7fb605627 100644 --- a/host/lib/utils/ihex.cpp +++ b/host/lib/utils/ihex.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/host/lib/utils/tasks.cpp b/host/lib/utils/tasks.cpp index 888a5a8f1..e5195fcf1 100644 --- a/host/lib/utils/tasks.cpp +++ b/host/lib/utils/tasks.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/host/utils/uhd_cal_rx_iq_balance.cpp b/host/utils/uhd_cal_rx_iq_balance.cpp index c68c96173..3f5fa1788 100644 --- a/host/utils/uhd_cal_rx_iq_balance.cpp +++ b/host/utils/uhd_cal_rx_iq_balance.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/host/utils/uhd_cal_tx_dc_offset.cpp b/host/utils/uhd_cal_tx_dc_offset.cpp index f47b5e913..2cb65d3f5 100644 --- a/host/utils/uhd_cal_tx_dc_offset.cpp +++ b/host/utils/uhd_cal_tx_dc_offset.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/host/utils/uhd_cal_tx_iq_balance.cpp b/host/utils/uhd_cal_tx_iq_balance.cpp index 2e7229fd3..ace93462e 100644 --- a/host/utils/uhd_cal_tx_iq_balance.cpp +++ b/host/utils/uhd_cal_tx_iq_balance.cpp @@ -8,6 +8,7 @@ #include "usrp_cal_utils.hpp" #include #include +#include #include #include #include