aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/config.hpp10
-rw-r--r--host/include/uhd/exception.hpp9
-rw-r--r--host/include/uhd/utils/log.hpp3
3 files changed, 15 insertions, 7 deletions
diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp
index 8504e0c18..c2b3f7f45 100644
--- a/host/include/uhd/config.hpp
+++ b/host/include/uhd/config.hpp
@@ -56,6 +56,8 @@ typedef SSIZE_T ssize_t;
# define UHD_ALIGNED(x) __declspec(align(x))
# define UHD_UNUSED(x) x
# define UHD_FALLTHROUGH
+# define UHD_FUNCTION __FUNCTION__
+# define UHD_PRETTY_FUNCTION __FUNCSIG__
#elif defined(__MINGW32__)
# define UHD_EXPORT __declspec(dllexport)
# define UHD_IMPORT __declspec(dllimport)
@@ -65,6 +67,8 @@ typedef SSIZE_T ssize_t;
# define UHD_ALIGNED(x) __declspec(align(x))
# define UHD_UNUSED(x) x __attribute__((unused))
# define UHD_FALLTHROUGH
+# define UHD_FUNCTION __func__
+# define UHD_PRETTY_FUNCTION __PRETTY_FUNCTION__
#elif defined(__GNUG__) && __GNUG__ >= 4
# define UHD_EXPORT __attribute__((visibility("default")))
# define UHD_IMPORT __attribute__((visibility("default")))
@@ -78,6 +82,8 @@ typedef SSIZE_T ssize_t;
# else
# define UHD_FALLTHROUGH
# endif
+# define UHD_FUNCTION __func__
+# define UHD_PRETTY_FUNCTION __PRETTY_FUNCTION__
#elif defined(__clang__)
# define UHD_EXPORT __attribute__((visibility("default")))
# define UHD_IMPORT __attribute__((visibility("default")))
@@ -91,6 +97,8 @@ typedef SSIZE_T ssize_t;
# else
# define UHD_FALLTHROUGH
# endif
+# define UHD_FUNCTION __func__
+# define UHD_PRETTY_FUNCTION __PRETTY_FUNCTION__
#else
# define UHD_EXPORT
# define UHD_IMPORT
@@ -100,6 +108,8 @@ typedef SSIZE_T ssize_t;
# define UHD_ALIGNED(x)
# define UHD_UNUSED(x) x
# define UHD_FALLTHROUGH
+# define UHD_FUNCTION __func__
+# define UHD_PRETTY_FUNCTION __func__
#endif
// Define API declaration macro
diff --git a/host/include/uhd/exception.hpp b/host/include/uhd/exception.hpp
index f48f97ba3..d0f886a18 100644
--- a/host/include/uhd/exception.hpp
+++ b/host/include/uhd/exception.hpp
@@ -8,7 +8,6 @@
#pragma once
#include <uhd/config.hpp>
-#include <boost/current_function.hpp>
#include <stdexcept>
#include <string>
@@ -302,10 +301,10 @@ struct UHD_API routing_error : rfnoc_error
* \param what the std::exception message
* \return the formatted exception message
*/
-#define UHD_THROW_SITE_INFO(what) \
- std::string(std::string(what) + "\n" + " in " + std::string(BOOST_CURRENT_FUNCTION) \
- + "\n" + " at " + std::string(__FILE__) + ":" \
- + BOOST_STRINGIZE(__LINE__) + "\n")
+#define UHD_THROW_SITE_INFO(what) \
+ std::string(std::string(what) + "\n" + " in " + std::string(UHD_FUNCTION) + "\n" \
+ + " at " + std::string(__FILE__) + ":" + BOOST_STRINGIZE(__LINE__) \
+ + "\n")
/*!
* Throws an invalid code path exception with throw-site information.
diff --git a/host/include/uhd/utils/log.hpp b/host/include/uhd/utils/log.hpp
index f333f9594..7b76ec075 100644
--- a/host/include/uhd/utils/log.hpp
+++ b/host/include/uhd/utils/log.hpp
@@ -8,7 +8,6 @@
#pragma once
#include <uhd/config.hpp>
-#include <boost/current_function.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <iomanip>
#include <iostream>
@@ -264,7 +263,7 @@ UHD_API void set_logger_level(const std::string& logger, uhd::log::severity_leve
//! Helpful debug tool to print site info
# define UHD_HERE() \
UHD_LOGGER_DEBUG("DEBUG") \
- << __FILE__ << ":" << __LINE__ << " (" << __PRETTY_FUNCTION__ << ")";
+ << __FILE__ << ":" << __LINE__ << " (" << UHD_PRETTY_FUNCTION << ")";
#else
//! Helpful debug tool to print site info
# define UHD_HERE() UHD_LOGGER_DEBUG("DEBUG") << __FILE__ << ":" << __LINE__;