From 8f3d83eeaec58e9347fe4c61dae18686782f94ca Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 30 Jan 2010 22:30:29 +0100 Subject: cleanup the error header a bit by moving the printf-macros out and remove the using std::string --- apt-pkg/contrib/macros.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apt-pkg/contrib/macros.h') diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h index e53eb32df..9aeb77b81 100644 --- a/apt-pkg/contrib/macros.h +++ b/apt-pkg/contrib/macros.h @@ -76,4 +76,13 @@ #define __cold /* no cold marker */ #endif +#ifdef __GNUG__ +// Methods have a hidden this parameter that is visible to this attribute + #define __like_printf_1 __attribute__ ((format (printf, 2, 3))) + #define __like_printf_2 __attribute__ ((format (printf, 3, 4))) +#else + #define __like_printf_1 + #define __like_printf_2 +#endif + #endif -- cgit v1.2.3