Author: tpot Date: 2004-09-07 23:12:29 +0000 (Tue, 07 Sep 2004) New Revision: 2243
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/scripting/swig&rev=2243&nolog=1 Log: Include definition for PRINTF_ATTRIBUTE in Python tdb wrapper. Modified: branches/SAMBA_4_0/source/scripting/swig/tdb.i Changeset: Modified: branches/SAMBA_4_0/source/scripting/swig/tdb.i =================================================================== --- branches/SAMBA_4_0/source/scripting/swig/tdb.i 2004-09-07 22:02:44 UTC (rev 2242) +++ branches/SAMBA_4_0/source/scripting/swig/tdb.i 2004-09-07 23:12:29 UTC (rev 2243) @@ -45,6 +45,16 @@ 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"