aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-01-03 11:22:48 -0800
committerMartin Braun <martin.braun@ettus.com>2017-01-03 15:15:26 -0800
commitd00d4ae8ff7744d0a5f514cf8cc875348bd408ac (patch)
tree46dce5149161a8655ad66ab839e065bf10c0d98d /host
parent2f20264768bf6000e6edd485afa533ed8b4826a2 (diff)
downloaduhd-d00d4ae8ff7744d0a5f514cf8cc875348bd408ac.tar.gz
uhd-d00d4ae8ff7744d0a5f514cf8cc875348bd408ac.tar.bz2
uhd-d00d4ae8ff7744d0a5f514cf8cc875348bd408ac.zip
C API: Added UHD_VERSION usrp.h
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/usrp/usrp.h2
-rw-r--r--host/include/uhd/version.hpp.in8
2 files changed, 7 insertions, 3 deletions
diff --git a/host/include/uhd/usrp/usrp.h b/host/include/uhd/usrp/usrp.h
index f24d12b85..bb186a278 100644
--- a/host/include/uhd/usrp/usrp.h
+++ b/host/include/uhd/usrp/usrp.h
@@ -30,6 +30,8 @@
#include <uhd/usrp/mboard_eeprom.h>
#include <uhd/usrp/dboard_eeprom.h>
#include <uhd/usrp/subdev_spec.h>
+/* version.hpp is safe to include in C: */
+#include <uhd/version.hpp> /* Provides UHD_VERSION */
#include <stdbool.h>
#include <stdlib.h>
diff --git a/host/include/uhd/version.hpp.in b/host/include/uhd/version.hpp.in
index 10f6a97ba..8cfc7b8c6 100644
--- a/host/include/uhd/version.hpp.in
+++ b/host/include/uhd/version.hpp.in
@@ -18,9 +18,6 @@
#ifndef INCLUDED_UHD_VERSION_HPP
#define INCLUDED_UHD_VERSION_HPP
-#include <uhd/config.hpp>
-#include <string>
-
/*!
* The ABI version string that the client application builds against.
* Call get_abi_string() to check this against the library build.
@@ -36,6 +33,10 @@
*/
#define UHD_VERSION @UHD_VERSION_ADDED@
+#ifdef __cplusplus
+#include <uhd/config.hpp>
+#include <string>
+
namespace uhd{
//! Get the version string (dotted version number + build info)
@@ -45,5 +46,6 @@ namespace uhd{
UHD_API std::string get_abi_string(void);
} //namespace uhd
+#endif
#endif /* INCLUDED_UHD_VERSION_HPP */