summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-09-08 02:48:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:37 -0500
commit17f2560ce690d6ed2cb75d2442e3225a10f27d9c (patch)
tree2dfcc3f3a9fa3f249657c93a88d88cd0b6a62419 /source3/include
parentfc84e916f628b4fb6f6667ad45d0ced0e9134b23 (diff)
downloadsamba-17f2560ce690d6ed2cb75d2442e3225a10f27d9c.tar.gz
samba-17f2560ce690d6ed2cb75d2442e3225a10f27d9c.tar.bz2
samba-17f2560ce690d6ed2cb75d2442e3225a10f27d9c.zip
r2248: Merge of tridge's PRINTF_ATTRIBUTE fixes from samba4.
(This used to be commit 53bfb76608efa347d5fe154c5583a5e8e3d53740)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/includes.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 56624e5198..58cb39790f 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -45,10 +45,11 @@
#undef HAVE_TERMIOS_H
#endif
-#ifdef __GNUC__
+#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. **/
+ * 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)