diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-09-07 22:02:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:34 -0500 |
commit | 3ddde3b74c0e387ea431d9f77a3f930c9f1f2776 (patch) | |
tree | 0e30dd2c8236368229a89006580d6a9607f8d57a /source4/include/includes.h | |
parent | 8fa455d815ff4ad3bda57d1c7b683adfe04efd85 (diff) | |
download | samba-3ddde3b74c0e387ea431d9f77a3f930c9f1f2776.tar.gz samba-3ddde3b74c0e387ea431d9f77a3f930c9f1f2776.tar.bz2 samba-3ddde3b74c0e387ea431d9f77a3f930c9f1f2776.zip |
r2242: some older versions of gcc don't properly handle the
PRINTF_ATTRIBUTE() format checking magic, so only enable it for gcc
versions >= 3.0
(This used to be commit 9c7100e3c770fca163d3788fc6b735457f74d7e9)
Diffstat (limited to 'source4/include/includes.h')
-rw-r--r-- | source4/include/includes.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h index c67b3c8195..7ea85b4fb9 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -53,10 +53,11 @@ #define PRINTCAP_NAME "/etc/printcap" #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) |