diff options
author | Tim Potter <tpot@samba.org> | 2004-09-08 02:48:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:37 -0500 |
commit | 53bfb76608efa347d5fe154c5583a5e8e3d53740 (patch) | |
tree | c693cecac6f8bcef16edc0181f31511de67f0a0d /source/tdb | |
parent | 46b9d6dcb5bdd47ea82f904d8fac4efe8dc94c9f (diff) | |
download | samba-53bfb76608efa347d5fe154c5583a5e8e3d53740.tar.gz samba-53bfb76608efa347d5fe154c5583a5e8e3d53740.tar.xz samba-53bfb76608efa347d5fe154c5583a5e8e3d53740.zip |
r2248: Merge of tridge's PRINTF_ATTRIBUTE fixes from samba4.
Diffstat (limited to 'source/tdb')
-rw-r--r-- | source/tdb/tdb.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/tdb/tdb.h b/source/tdb/tdb.h index 3db676a633f..e8a6d201c59 100644 --- a/source/tdb/tdb.h +++ b/source/tdb/tdb.h @@ -32,7 +32,15 @@ extern "C" { #endif #ifndef PRINTF_ATTRIBUTE +/** 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 **/ +#if (__GNUC__ >= 3) #define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) +#else +#define PRINTF_ATTRIBUTE(a1, a2) +#endif #endif /* flags to tdb_store() */ |