From 8911a377da22e5a8ad5ca2a0443fbd935f572991 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 28 May 2022 14:14:06 +0300 Subject: add __has_attribute --- include/apos/attrs.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/apos/attrs.h') 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))) -- cgit v1.3