diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-11 04:17:54 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2005-07-11 04:17:54 +0000 |
commit | 91747bd9e745c92785fbc1e09fc361ed061d752c (patch) | |
tree | cd1d6fd009c2ff5324aee2cb0f91f2627576f25a /source/lib/replace/replace.h | |
parent | 0f157ab6bc8d2e723e78280013a90658b5c3f1a5 (diff) | |
download | samba-91747bd9e745c92785fbc1e09fc361ed061d752c.tar.gz samba-91747bd9e745c92785fbc1e09fc361ed061d752c.tar.xz samba-91747bd9e745c92785fbc1e09fc361ed061d752c.zip |
r8313: moved PRINTF_ATTRIBUTE to replace.h to try to get irix building with heimdal
Diffstat (limited to 'source/lib/replace/replace.h')
-rw-r--r-- | source/lib/replace/replace.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h index e0cb1420ec0..c7c343ef383 100644 --- a/source/lib/replace/replace.h +++ b/source/lib/replace/replace.h @@ -111,4 +111,16 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); typedef int (*comparison_fn_t)(const void *, const void *); #endif +#ifndef PRINTF_ATTRIBUTE +#if (__GNUC__ >= 3) +/** Use gcc attribute to check printf fns. a1 is the 1-based index of + * the parameter containing the format, and a2 the index of the first + * argument. Note that some gcc 2.x versions don't handle this + * properly **/ +#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) +#else +#define PRINTF_ATTRIBUTE(a1, a2) +#endif +#endif + #endif |