Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5672:ca38eb4189e8 HEAD
Added missing __attr_*__ macros for non-GCC compilers.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 04 Jun 2007 14:50:50 +0300 |
parents | 0021765627f3 |
children | dc8d38798296 |
files | src/lib/macros.h |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/macros.h Sun Jun 03 17:59:55 2007 +0300 +++ b/src/lib/macros.h Mon Jun 04 14:50:50 2007 +0300 @@ -104,21 +104,22 @@ # define __attr_noreturn__ __attribute__((noreturn)) # define __attr_const__ __attribute__((const)) # define __attr_malloc__ __attribute__((malloc)) -# if __GNUC__ > 3 -/* GCC 4.0 and later */ -# define __attr_warn_unused_result__ __attribute__((warn_unused_result)) -# define __attr_sentinel__ __attribute__((sentinel)) -# else -# define __attr_warn_unused_result__ -# define __attr_sentinel__ -# endif #else # define __attr_format__(format_idx, arg_idx) # define __attr_format_arg__(arg_idx) +# define __attr_scanf__ # define __attr_unused__ # define __attr_noreturn__ # define __attr_const__ # define __attr_unused__ +# define __attr_malloc__ +#endif +#if __GNUC__ > 3 +/* GCC 4.0 and later */ +# define __attr_warn_unused_result__ __attribute__((warn_unused_result)) +# define __attr_sentinel__ __attribute__((sentinel)) +#else +# define __attr_warn_unused_result__ # define __attr_sentinel__ #endif