summaryrefslogtreecommitdiff
path: root/gr-uhd/lib/gr_uhd_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd/lib/gr_uhd_common.h')
-rw-r--r--gr-uhd/lib/gr_uhd_common.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/gr-uhd/lib/gr_uhd_common.h b/gr-uhd/lib/gr_uhd_common.h
index f2433b288c..0c18fa4634 100644
--- a/gr-uhd/lib/gr_uhd_common.h
+++ b/gr-uhd/lib/gr_uhd_common.h
@@ -1,5 +1,6 @@
+/* -*- c++ -*- */
/*
- * Copyright 2012 Free Software Foundation, Inc.
+ * Copyright 2012-2013 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,17 +27,26 @@
#include <boost/format.hpp>
#include <stdexcept>
-static inline void gr_uhd_check_abi(void){
- #ifdef UHD_VERSION_ABI_STRING
- if (std::string(UHD_VERSION_ABI_STRING) == uhd::get_abi_string()) return;
- throw std::runtime_error(str(boost::format(
+namespace gr {
+ namespace uhd {
+
+ static inline void check_abi(void)
+ {
+#ifdef UHD_VERSION_ABI_STRING
+ if(std::string(UHD_VERSION_ABI_STRING) == ::uhd::get_abi_string())
+ return;
+
+ throw std::runtime_error(str(boost::format(
"\nGR-UHD detected ABI compatibility mismatch with UHD library.\n"
"GR-UHD was build against ABI: %s,\n"
"but UHD library reports ABI: %s\n"
"Suggestion: install an ABI compatible version of UHD,\n"
"or rebuild GR-UHD component against this ABI version.\n"
- ) % UHD_VERSION_ABI_STRING % uhd::get_abi_string()));
- #endif
-}
+ ) % UHD_VERSION_ABI_STRING % ::uhd::get_abi_string()));
+#endif
+ }
+
+ } /* namespace uhd */
+} /* namespace gr */
#endif /* INCLUDED_GR_UHD_COMMON_H */