+/**
+ * @def FIRM_PRINTF
+ * Attribute with marks a function to have a printf style format
+ * string and variadic argument.
+ */
+#if defined(__GNUC__)
+# define FIRM_PRINTF(a,b) __attribute__((__format__(__printf__, a, b)))
+#else
+# define FIRM_PRINTF(a,b)
+#endif
+
+#endif
+
+/* mark declarations as C function (note that we always need this,
+ * so don't put it in the include guard) */
+#ifdef __cplusplus
+extern "C" {