From 3ddde3b74c0e387ea431d9f77a3f930c9f1f2776 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 7 Sep 2004 22:02:44 +0000 Subject: 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) --- source4/include/includes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/include') 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) -- cgit