diff --git a/host/cmake/Modules/UHDBoost.cmake b/host/cmake/Modules/UHDBoost.cmake index 51aa1e238..10d43043c 100644 --- a/host/cmake/Modules/UHDBoost.cmake +++ b/host/cmake/Modules/UHDBoost.cmake @@ -99,7 +99,7 @@ if(MINGW) list(FIND UHD_BOOST_REQUIRED_COMPONENTS "thread" THREAD_NDX) if(NOT ${THREAD_NDX} EQUAL -1) list(REMOVE_AT UHD_BOOST_REQUIRED_COMPONENTS ${THREAD_NDX}) - list(INSERT UHD_BOOST_REQUIRED_COMPONENTS ${THREAD_NDX} thread_win32) + list(INSERT UHD_BOOST_REQUIRED_COMPONENTS ${THREAD_NDX} thread) endif() endif() diff --git a/host/cmake/Modules/UHDPython.cmake b/host/cmake/Modules/UHDPython.cmake index d8b203b91..d1ffa2df2 100644 --- a/host/cmake/Modules/UHDPython.cmake +++ b/host/cmake/Modules/UHDPython.cmake @@ -269,15 +269,14 @@ macro(PYTHON_INSTALL_MODULE) if(NOT DEFINED UHD_PYTHON_DIR) execute_process(COMMAND ${PYTHON_EXECUTABLE} -c # Avoid the posix_local install scheme - "import os,sysconfig;\ - install_scheme = 'posix_user';\ - platlib = sysconfig.get_path('platlib', scheme=install_scheme);\ - prefix = sysconfig.get_config_var('prefix');\ - print(os.path.relpath(platlib, prefix));" + "import sys,os,sysconfig;\ + platlib = sysconfig.get_path('platlib');\ + print(os.path.relpath(platlib, sys.prefix));" OUTPUT_VARIABLE UHD_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE ) endif(NOT DEFINED UHD_PYTHON_DIR) + file(TO_CMAKE_PATH ${UHD_PYTHON_DIR} UHD_PYTHON_DIR) message( diff --git a/host/examples/CMakeLists.txt b/host/examples/CMakeLists.txt index 69e84f95d..81ab97c19 100644 --- a/host/examples/CMakeLists.txt +++ b/host/examples/CMakeLists.txt @@ -57,11 +57,11 @@ find_package(Curses) if(CURSES_FOUND) include_directories(${CURSES_INCLUDE_DIR}) add_executable(rx_ascii_art_dft rx_ascii_art_dft.cpp) - target_link_libraries(rx_ascii_art_dft uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES}) + target_link_libraries(rx_ascii_art_dft uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES} ncursesw) UHD_INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples) add_executable(twinrx_freq_hopping twinrx_freq_hopping.cpp) - target_link_libraries(twinrx_freq_hopping uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES}) + target_link_libraries(twinrx_freq_hopping uhd ${CURSES_LIBRARIES} ${Boost_LIBRARIES} ncursesw) UHD_INSTALL(TARGETS twinrx_freq_hopping RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples) endif(CURSES_FOUND) diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp index 910584452..17f2f5214 100644 --- a/host/examples/network_relay.cpp +++ b/host/examples/network_relay.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp index b8f351dc5..3b320bd57 100644 --- a/host/examples/rx_ascii_art_dft.cpp +++ b/host/examples/rx_ascii_art_dft.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/include/uhd/transport/nirio/rpc/rpc_client.hpp b/host/include/uhd/transport/nirio/rpc/rpc_client.hpp index 844e36c76..82dce4f2d 100644 --- a/host/include/uhd/transport/nirio/rpc/rpc_client.hpp +++ b/host/include/uhd/transport/nirio/rpc/rpc_client.hpp @@ -10,6 +10,7 @@ #include "rpc_common.hpp" #include #include +#include #include #include #include diff --git a/host/include/uhd/transport/udp_simple.hpp b/host/include/uhd/transport/udp_simple.hpp index 9c2e2e92d..1d846e59d 100644 --- a/host/include/uhd/transport/udp_simple.hpp +++ b/host/include/uhd/transport/udp_simple.hpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/host/lib/deps/rpclib/lib/rpc/client.cc b/host/lib/deps/rpclib/lib/rpc/client.cc index 1b366e491..24d93e351 100644 --- a/host/lib/deps/rpclib/lib/rpc/client.cc +++ b/host/lib/deps/rpclib/lib/rpc/client.cc @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/host/lib/deps/rpclib/lib/rpc/server.cc b/host/lib/deps/rpclib/lib/rpc/server.cc index 4facb93a8..a9ba36d7b 100644 --- a/host/lib/deps/rpclib/lib/rpc/server.cc +++ b/host/lib/deps/rpclib/lib/rpc/server.cc @@ -6,6 +6,7 @@ #include #include +#include #include #include "rpc/detail/dev_utils.h" diff --git a/host/lib/include/uhdlib/transport/udp_boost_asio_link.hpp b/host/lib/include/uhdlib/transport/udp_boost_asio_link.hpp index 8944aa999..5b82d0260 100644 --- a/host/lib/include/uhdlib/transport/udp_boost_asio_link.hpp +++ b/host/lib/include/uhdlib/transport/udp_boost_asio_link.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/include/uhdlib/transport/udp_common.hpp b/host/lib/include/uhdlib/transport/udp_common.hpp index 96146a701..f706fdc5f 100644 --- a/host/lib/include/uhdlib/transport/udp_common.hpp +++ b/host/lib/include/uhdlib/transport/udp_common.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/include/uhdlib/utils/eeprom_utils.hpp b/host/lib/include/uhdlib/utils/eeprom_utils.hpp index d3be4c03c..34e462e2f 100644 --- a/host/lib/include/uhdlib/utils/eeprom_utils.hpp +++ b/host/lib/include/uhdlib/utils/eeprom_utils.hpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt index ef887c572..84833b083 100644 --- a/host/lib/transport/CMakeLists.txt +++ b/host/lib/transport/CMakeLists.txt @@ -90,7 +90,7 @@ endif() #On windows, the boost asio implementation uses the winsock2 library. #Note: we exclude the .lib extension for cygwin and mingw platforms. if(WIN32) - LIBUHD_APPEND_LIBS(ws2_32) + LIBUHD_APPEND_LIBS(ws2_32 wsock32) endif() #atlbase.h is not included with visual studio express diff --git a/host/lib/usrp/cores/xport_adapter_ctrl.cpp b/host/lib/usrp/cores/xport_adapter_ctrl.cpp index 224f51ba2..1585157fe 100644 --- a/host/lib/usrp/cores/xport_adapter_ctrl.cpp +++ b/host/lib/usrp/cores/xport_adapter_ctrl.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/mpmd/mpmd_find.cpp b/host/lib/usrp/mpmd/mpmd_find.cpp index 97e6fab80..880c01504 100644 --- a/host/lib/usrp/mpmd/mpmd_find.cpp +++ b/host/lib/usrp/mpmd/mpmd_find.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #ifdef HAVE_DPDK diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp index 169139ba1..b9bccda09 100644 --- a/host/lib/usrp/usrp2/dboard_iface.cpp +++ b/host/lib/usrp/usrp2/dboard_iface.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include //htonl and ntohl #include #include diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index c58787e3e..80c4e63ec 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp index f676ce5da..48db0dafa 100644 --- a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp +++ b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include //htonl #include diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp index c79ffccab..5acb2022b 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.cpp +++ b/host/lib/usrp/usrp2/usrp2_iface.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include //used for htonl and ntohl #include #include diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index cfd80abfd..37834b696 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp/x300/x300_eth_mgr.cpp b/host/lib/usrp/x300/x300_eth_mgr.cpp index 7d4239bbb..a4420fac5 100644 --- a/host/lib/usrp/x300/x300_eth_mgr.cpp +++ b/host/lib/usrp/x300/x300_eth_mgr.cpp @@ -29,6 +29,7 @@ # include # include #endif +#include #include #include diff --git a/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp b/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp index 9023c6607..f404f21a8 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp +++ b/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include typedef boost::asio::ip::address_v4 ip_v4; diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp index b4185eded..b09567dea 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp +++ b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/usrp_clock/octoclock/octoclock_uart.cpp b/host/lib/usrp_clock/octoclock/octoclock_uart.cpp index 0a0fa4c14..efb91a156 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_uart.cpp +++ b/host/lib/usrp_clock/octoclock/octoclock_uart.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/host/lib/utils/pathslib.cpp b/host/lib/utils/pathslib.cpp index 7854782c0..d8e8db85b 100644 --- a/host/lib/utils/pathslib.cpp +++ b/host/lib/utils/pathslib.cpp @@ -7,7 +7,7 @@ #include #include -#ifdef BOOST_MSVC +#if defined(BOOST_MSVC) || defined(_WIN64) || defined(_WIN32) # include #elif defined(__OpenBSD__) # include @@ -20,7 +20,7 @@ std::string uhd::path_expandvars(const std::string& path) if (path.empty()) { return path; } -#ifdef BOOST_MSVC +#if defined(BOOST_MSVC) || defined(_WIN64) || defined(_WIN32) constexpr size_t max_pathlen = 4096; char result[max_pathlen]; const size_t result_len = diff --git a/host/lib/utils/thread.cpp b/host/lib/utils/thread.cpp index c5e1b5156..7146f2a9e 100644 --- a/host/lib/utils/thread.cpp +++ b/host/lib/utils/thread.cpp @@ -178,9 +178,9 @@ void uhd::set_thread_affinity(const std::vector& cpu_affinity_list) void uhd::set_thread_name(boost::thread* thrd, const std::string& name) { -#ifdef HAVE_PTHREAD_SETNAME - pthread_setname_np(thrd->native_handle(), name.substr(0, 16).c_str()); -#endif /* HAVE_PTHREAD_SETNAME */ +//#ifdef HAVE_PTHREAD_SETNAME +// pthread_setname_np(thrd->native_handle(), name.substr(0, 16).c_str()); +//#endif /* HAVE_PTHREAD_SETNAME */ #ifdef HAVE_THREAD_SETNAME_DUMMY // Then we can't set the thread name. This function may get called // before the logger starts, and thus can't log any error messages. @@ -191,9 +191,9 @@ void uhd::set_thread_name(boost::thread* thrd, const std::string& name) void uhd::set_thread_name(std::thread* thrd, const std::string& name) { -#ifdef HAVE_PTHREAD_SETNAME - pthread_setname_np(thrd->native_handle(), name.substr(0, 16).c_str()); -#endif /* HAVE_PTHREAD_SETNAME */ +//#ifdef HAVE_PTHREAD_SETNAME +// pthread_setname_np(thrd->native_handle(), name.substr(0, 16).c_str()); +//#endif /* HAVE_PTHREAD_SETNAME */ #ifdef HAVE_THREAD_SETNAME_DUMMY // Then we can't set the thread name. This function may get called // before the logger starts, and thus can't log any error messages. diff --git a/host/utils/latency/CMakeLists.txt b/host/utils/latency/CMakeLists.txt index e4cd4d171..340b76dc1 100644 --- a/host/utils/latency/CMakeLists.txt +++ b/host/utils/latency/CMakeLists.txt @@ -26,7 +26,7 @@ if(CURSES_FOUND) get_filename_component(name ${source} NAME_WE) add_executable(${name} ${source} ${latency_lib_path}) LIBUHD_APPEND_SOURCES(${name}) - target_link_libraries(${name} uhd ${Boost_LIBRARIES} ${CURSES_LIBRARIES}) + target_link_libraries(${name} uhd ${Boost_LIBRARIES} ${CURSES_LIBRARIES} ncursesw) UHD_INSTALL(TARGETS ${name} RUNTIME DESTINATION ${latency_comp_dest} COMPONENT ${latency_comp_name}) endforeach(source) diff --git a/host/utils/latency/include/Responder.hpp b/host/utils/latency/include/Responder.hpp index 81b5e84f9..a87fa17e9 100644 --- a/host/utils/latency/include/Responder.hpp +++ b/host/utils/latency/include/Responder.hpp @@ -9,7 +9,7 @@ #define RESPONDER_H #include -#include +#include #include #include #include