From: Timo Sirainen Date: Fri, 20 Jun 2008 07:41:27 +0000 (+0300) Subject: Added ATTR_PURE macro, which expands to pure attribute if available. X-Git-Tag: 1.2.alpha1~250 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=69d87bf7d0a976a3c6ab8b9760cfc5c8a5f30bf3;p=thirdparty%2Fdovecot%2Fcore.git Added ATTR_PURE macro, which expands to pure attribute if available. --HG-- branch : HEAD --- diff --git a/src/lib/macros.h b/src/lib/macros.h index d3765ba5bd..055ce7573d 100644 --- a/src/lib/macros.h +++ b/src/lib/macros.h @@ -106,6 +106,7 @@ # define ATTR_UNUSED __attribute__((unused)) # define ATTR_NORETURN __attribute__((noreturn)) # define ATTR_CONST __attribute__((const)) +# define ATTR_PURE __attribute__((pure)) #else # define ATTR_FORMAT(format_idx, arg_idx) # define ATTR_FORMAT_ARG(arg_idx) @@ -113,7 +114,7 @@ # define ATTR_UNUSED # define ATTR_NORETURN # define ATTR_CONST -# define ATTR_UNUSED +# define ATTR_PURE #endif #if __GNUC__ > 2 # define ATTR_MALLOC __attribute__((malloc))