summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 68108d7)
raw | patch | inline | side by side (parent: 68108d7)
author | Florian Forster <octo@collectd.org> | |
Fri, 29 Aug 2014 09:14:31 +0000 (11:14 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 29 Aug 2014 09:14:31 +0000 (11:14 +0200) |
src/collectd.h | patch | blob | history |
diff --git a/src/collectd.h b/src/collectd.h
index 5650b59a438b0cfa9629290730959968ab589f4e..6886c123716e8fdb77e176d0edc5f23c4f651fd0 100644 (file)
--- a/src/collectd.h
+++ b/src/collectd.h
# define COLLECTD_USERAGENT PACKAGE_NAME"/"PACKAGE_VERSION
#endif
-/* Remove GNU specific __attribute__ settings when using another compiler */
-#if !__GNUC__
+/* Only enable __attribute__() for compilers known to support it. */
+#if defined(__clang__)
+# define clang_attr(x) __attribute__(x)
+# define gcc_attr(x) /**/
+#elif __GNUC__
+# define clang_attr(x) /**/
+# define gcc_attr(x) __attribute__(x)
+#else
+# define clang_attr(x) /**/
+# define gcc_attr(x) /**/
# define __attribute__(x) /**/
#endif