summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-03-07 09:46:44 +0100
committerWerner Koch <wk@gnupg.org>2014-03-07 18:56:17 +0100
commit72133b54de89e593d8193b106e9369cf90d2e1c0 (patch)
treed3d147408f3b86a7267e5f8951d5f7b3c79db6d2 /common
parentUse attribute __gnu_printf__ with our estream-printf functions. (diff)
downloadgnupg2-72133b54de89e593d8193b106e9369cf90d2e1c0.tar.xz
gnupg2-72133b54de89e593d8193b106e9369cf90d2e1c0.zip
Use attribute __gnu_printf__ also in estream header files.
* common/estream-printf.h: Use attribute gnu_printf. * common/estream.h: Ditto.
Diffstat (limited to 'common')
-rw-r--r--common/estream-printf.h14
-rw-r--r--common/estream.h14
2 files changed, 18 insertions, 10 deletions
diff --git a/common/estream-printf.h b/common/estream-printf.h
index 138ed3777..3c2253dc0 100644
--- a/common/estream-printf.h
+++ b/common/estream-printf.h
@@ -99,11 +99,15 @@
#endif /*_ESTREAM_EXT_SYM_PREFIX*/
#ifndef _ESTREAM_GCC_A_PRINTF
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
-# define _ESTREAM_GCC_A_PRINTF( f, a ) __attribute__ ((format (printf,f,a)))
-#else
-# define _ESTREAM_GCC_A_PRINTF( f, a )
-#endif
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4 )
+# define _ESTREAM_GCC_A_PRINTF( f, a ) \
+ __attribute__ ((format (__gnu_printf__,f,a)))
+# elif __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
+# define _ESTREAM_GCC_A_PRINTF( f, a ) \
+ __attribute__ ((format (printf,f,a)))
+# else
+# define _ESTREAM_GCC_A_PRINTF( f, a )
+# endif
#endif /*_ESTREAM_GCC_A_PRINTF*/
diff --git a/common/estream.h b/common/estream.h
index e3c28feff..e3e9fc84a 100644
--- a/common/estream.h
+++ b/common/estream.h
@@ -241,11 +241,15 @@ typedef struct
#ifndef _ESTREAM_GCC_A_PRINTF
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
-# define _ESTREAM_GCC_A_PRINTF( f, a ) __attribute__ ((format (printf,f,a)))
-#else
-# define _ESTREAM_GCC_A_PRINTF( f, a )
-#endif
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4 )
+# define _ESTREAM_GCC_A_PRINTF( f, a ) \
+ __attribute__ ((format (__gnu_printf__,f,a)))
+# elif __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
+# define _ESTREAM_GCC_A_PRINTF( f, a ) \
+ __attribute__ ((format (printf,f,a)))
+# else
+# define _ESTREAM_GCC_A_PRINTF( f, a )
+# endif
#endif /*_ESTREAM_GCC_A_PRINTF*/