macros: add CONST (__attribute((__const__)))

This commit is contained in:
Daniel Eklöf 2020-12-27 16:14:17 +01:00
parent c1cc75051f
commit 973a57a096
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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