diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-11-12 13:14:00 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-11-15 01:25:06 +0000 |
commit | f20cf610809d74aff58a3711a0405f243da5dce4 (patch) | |
tree | ed7496536718d4e2a1661568af5365c95c21e7fb /lib/util | |
parent | 1342185e333cb8139b7a70b7fe43571bcc2716a7 (diff) | |
download | samba-f20cf610809d74aff58a3711a0405f243da5dce4.tar.gz samba-f20cf610809d74aff58a3711a0405f243da5dce4.tar.bz2 samba-f20cf610809d74aff58a3711a0405f243da5dce4.zip |
Add attribute macros for Heimdal to use
Heimdal uses HEIMDAL_NORETURN_ATTRIBUTE and HEIMDAL_PRINTF_ATTRIBUTE,
and we need to provide a link between these and Samba's function
attribute handling.
Andrew Bartlett
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/attr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/util/attr.h b/lib/util/attr.h index 9b346459b6..a2690613fb 100644 --- a/lib/util/attr.h +++ b/lib/util/attr.h @@ -81,4 +81,16 @@ #endif #endif +#ifndef FORMAT_ATTRIBUTE +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +/** Use gcc attribute to check printf fns. a1 is argument to format() + * in the above macro. This is needed to support Heimdal's printf + * decorations. Note that some gcc 2.x versions don't handle this + * properly, and as such I've used the same minimum from heimdal: GCC 3.1 **/ +#define FORMAT_ATTRIBUTE(a) __attribute__ ((format a)) +#else +#define FORMAT_ATTRIBUTE(a) +#endif +#endif + #endif /* __UTIL_ATTR_H__ */ |