#define STATIC_ARRAY_LEN(array) (sizeof (array) / sizeof ((array)[0]))
+/* Remove GNU specific __attribute__ settings when using another compiler */
+#if !__GNUC__
+# define __attribute__(x) /**/
+#endif
+
extern char hostname_g[];
extern int interval_g;
int plugin_dispatch_notification (const notification_t *notif);
-void plugin_log (int level, const char *format, ...);
+void plugin_log (int level, const char *format, ...)
+ __attribute__ ((format(printf,2,3)));
+
#define ERROR(...) plugin_log (LOG_ERR, __VA_ARGS__)
#define WARNING(...) plugin_log (LOG_WARNING, __VA_ARGS__)
#define NOTICE(...) plugin_log (LOG_NOTICE, __VA_ARGS__)