[PATCH 1/6] unit-tests: add some helper macros for unit-test framework implementation

Bartosz Golaszewski bartekgola at gmail.com
Tue Apr 15 23:06:34 UTC 2014


Signed-off-by: Bartosz Golaszewski <bartekgola at gmail.com>
---
 include/platform.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/platform.h b/include/platform.h
index 92f7755..5fe443c 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -56,6 +56,9 @@
 #define RETURNS_MALLOC __attribute__ ((malloc))
 #define PACKED __attribute__ ((__packed__))
 #define ALIGNED(m) __attribute__ ((__aligned__(m)))
+#define PRINTF_FUNC(fmt, params) __attribute__ ((format(printf, fmt, params)))
+#define INIT_FIRST __attribute__ ((constructor(1000)))
+#define INIT_LAST __attribute__ ((constructor(2000)))
 
 /* __NO_INLINE__: some gcc's do not honor inlining! :( */
 #if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__)
-- 
1.8.4.5



More information about the busybox mailing list