diff options
author | Tim Potter <tpot@samba.org> | 2004-09-07 23:12:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:34 -0500 |
commit | 915f2e539d4b2f5f4eb87a1f64f50f3d9a17743a (patch) | |
tree | de5a6a7ca428176bb5a90bb4bb1ee507986c1fab | |
parent | 3ddde3b74c0e387ea431d9f77a3f930c9f1f2776 (diff) | |
download | samba-915f2e539d4b2f5f4eb87a1f64f50f3d9a17743a.tar.gz samba-915f2e539d4b2f5f4eb87a1f64f50f3d9a17743a.tar.bz2 samba-915f2e539d4b2f5f4eb87a1f64f50f3d9a17743a.zip |
r2243: Include definition for PRINTF_ATTRIBUTE in Python tdb wrapper.
(This used to be commit 301bb069c31ee7ce09bdd6cd2dd4b7fa0441e1a1)
-rw-r--r-- | source4/scripting/swig/tdb.i | 10 |
1 files changed, 10 insertions, 0 deletions
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" |