summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/macros.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-01-30 22:30:29 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-01-30 22:30:29 +0100
commit8f3d83eeaec58e9347fe4c61dae18686782f94ca (patch)
treeb1eeae7e8168cf49becc2407d70202f21e45d8d9 /apt-pkg/contrib/macros.h
parent5c0d3668dd2b6852812502f33d64b1644c2b137a (diff)
cleanup the error header a bit by moving the printf-macros out
and remove the using std::string
Diffstat (limited to 'apt-pkg/contrib/macros.h')
-rw-r--r--apt-pkg/contrib/macros.h9
1 files changed, 9 insertions, 0 deletions
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