aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-12-27 15:14:17 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-01 20:09:34 +0000
commit973a57a09603a46fe19ebe0c59b9615952b622e9 (patch)
tree9f91c6417747fff75330040efc59cf684ef3dc5a
parentbox-drawing: LIGH/HEAVY LEFT, UP, RIGTH, DOWN (diff)
macros: add CONST (__attribute((__const__)))
-rw-r--r--macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/macros.h b/macros.h
index 323b3748..4d63404c 100644
--- a/macros.h
+++ b/macros.h
@@ -26,6 +26,12 @@
#define UNUSED
#endif
+#if HAS_ATTRIBUTE(const)
+ #define CONST __attribute__((__const__))
+#else
+ #define CONST
+#endif
+
#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(malloc)
#define MALLOC __attribute__((__malloc__))
#else