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