From cdec7323eca6e32c07c6ea198f5575d85eab0846 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Oct 2006 00:48:26 +0200 Subject: Add ATTRIBUTE_FORMAT_FPTR macro for setting format specifier also on function pointers This was available from gcc 3.1, so diable it before that Update m_ctype.h to use the new macro include/m_ctype.h: Use macro ATTRIBUTE_FORMAT_FPTR on function pointer include/my_global.h: Add ATTRIBUTE_FORMAT_FPTR macro for setting format specifier also on function pointers This was available from gcc 3.1, so diable it before that --- include/my_global.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'include/my_global.h') diff --git a/include/my_global.h b/include/my_global.h index d92df6fa743..41b660227b5 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -431,9 +431,6 @@ typedef unsigned short ushort; #ifndef __attribute__ # if !defined(__GNUC__) # define __attribute__(A) -# elif defined (__QNXNTO__) - /* qcc defines GNUC */ -# define __attribute__(A) # elif GCC_VERSION < 2008 # define __attribute__(A) # elif defined(__cplusplus) && GCC_VERSION < 3004 @@ -450,6 +447,19 @@ typedef unsigned short ushort; # define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n))) #endif +/* + __attribute__((format(...))) on a function pointer is not supported + until gcc 3.1 +*/ +#ifndef ATTRIBUTE_FORMAT_FPTR +# if (GCC_VERSION >= 3001) +# define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n) +# else +# define ATTRIBUTE_FORMAT_FPTR(style, m, n) +# endif /* GNUC >= 3.1 */ +#endif + + /* From old s-system.h */ /* -- cgit v1.2.1