aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-05-28 14:14:06 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-05-28 14:14:06 +0300
commit8911a377da22e5a8ad5ca2a0443fbd935f572991 (patch)
treeb5c43e17b8c0fc93163cd4c8d35a8d2dea2442a7 /include
parentceea33c4557ff35242889f347b5da68dd9e53908 (diff)
downloadkmi-8911a377da22e5a8ad5ca2a0443fbd935f572991.tar.gz
kmi-8911a377da22e5a8ad5ca2a0443fbd935f572991.zip
add __has_attribute
Diffstat (limited to 'include')
-rw-r--r--include/apos/attrs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/apos/attrs.h b/include/apos/attrs.h
index dd28b65..3825ece 100644
--- a/include/apos/attrs.h
+++ b/include/apos/attrs.h
@@ -6,6 +6,11 @@
* Attribute shorthands.
*/
+/* TODO: figure out which attributes are necessary and which are good to have */
+#if !defined(__has_attribute)
+#define __has_attribute(x) 0
+#endif
+
#define __section(section) __attribute__((__section__(section)))
#define __fmt(x, y) __attribute__((format(__printf__, x, y)))
#define __aligned(a) __attribute__((aligned(a)))