summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/macros.h
diff options
context:
space:
mode:
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