From 915f2e539d4b2f5f4eb87a1f64f50f3d9a17743a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 7 Sep 2004 23:12:29 +0000 Subject: r2243: Include definition for PRINTF_ATTRIBUTE in Python tdb wrapper. (This used to be commit 301bb069c31ee7ce09bdd6cd2dd4b7fa0441e1a1) --- source4/scripting/swig/tdb.i | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/scripting/swig/tdb.i') diff --git a/source4/scripting/swig/tdb.i b/source4/scripting/swig/tdb.i index 0c756765de..404f498c26 100644 --- a/source4/scripting/swig/tdb.i +++ b/source4/scripting/swig/tdb.i @@ -45,6 +45,16 @@ typedef sig_atomic_t SIG_ATOMIC_T; typedef int SIG_ATOMIC_T; #endif +#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 + /* Include tdb headers */ #include "lib/tdb/include/tdb.h" -- cgit