aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Dickens <michael.dickens@ettus.com>2016-06-24 16:46:41 -0400
committerMartin Braun <martin.braun@ettus.com>2016-08-01 18:49:53 -0700
commit2b6e1c33f567f1c56b4becf4176bb40c6a95ee9a (patch)
tree9def4980de593f986fb334c66c59e8dc7a103724
parent3df0f6e9e4b2784c7c23a566a34391b9629d32c1 (diff)
downloaduhd-2b6e1c33f567f1c56b4becf4176bb40c6a95ee9a.tar.gz
uhd-2b6e1c33f567f1c56b4becf4176bb40c6a95ee9a.tar.bz2
uhd-2b6e1c33f567f1c56b4becf4176bb40c6a95ee9a.zip
add specific configuration support for clang
-rw-r--r--host/include/uhd/config.h7
-rw-r--r--host/include/uhd/config.hpp7
2 files changed, 14 insertions, 0 deletions
diff --git a/host/include/uhd/config.h b/host/include/uhd/config.h
index 3c3f9b01b..a22dea424 100644
--- a/host/include/uhd/config.h
+++ b/host/include/uhd/config.h
@@ -50,6 +50,13 @@ typedef ptrdiff_t ssize_t;
#define UHD_DEPRECATED __attribute__((deprecated))
#define UHD_ALIGNED(x) __attribute__((aligned(x)))
#define UHD_UNUSED(x) x __attribute__((unused))
+#elif defined(__clang__)
+ #define UHD_EXPORT __attribute__((visibility("default")))
+ #define UHD_IMPORT __attribute__((visibility("default")))
+ #define UHD_INLINE inline __attribute__((always_inline))
+ #define UHD_DEPRECATED __attribute__((deprecated))
+ #define UHD_ALIGNED(x) __attribute__((aligned(x)))
+ #define UHD_UNUSED(x) x __attribute__((unused))
#else
#define UHD_EXPORT
#define UHD_IMPORT
diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp
index 8cbcab860..ed21634e1 100644
--- a/host/include/uhd/config.hpp
+++ b/host/include/uhd/config.hpp
@@ -73,6 +73,13 @@ typedef ptrdiff_t ssize_t;
#define UHD_DEPRECATED __attribute__((deprecated))
#define UHD_ALIGNED(x) __attribute__((aligned(x)))
#define UHD_UNUSED(x) x __attribute__((unused))
+#elif defined(__clang__)
+ #define UHD_EXPORT __attribute__((visibility("default")))
+ #define UHD_IMPORT __attribute__((visibility("default")))
+ #define UHD_INLINE inline __attribute__((always_inline))
+ #define UHD_DEPRECATED __attribute__((deprecated))
+ #define UHD_ALIGNED(x) __attribute__((aligned(x)))
+ #define UHD_UNUSED(x) x __attribute__((unused))
#else
#define UHD_EXPORT
#define UHD_IMPORT