#include "err.h"
+static void lafe_vwarnc(int, const char *, va_list) __LA_PRINTFLIKE(2, 0);
+
const char *lafe_progname;
static void
#define __LA_DEAD
#endif
+#if defined(__GNUC__) && (__GNUC__ > 2 || \
+ (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
+#define __LA_PRINTFLIKE(f,a) __attribute__((__format__(__printf__, f, a)))
+#else
+#define __LA_PRINTFLIKE(f,a)
+#endif
+
extern const char *lafe_progname;
-void lafe_warnc(int code, const char *fmt, ...);
-void lafe_errc(int eval, int code, const char *fmt, ...) __LA_DEAD;
+void lafe_warnc(int code, const char *fmt, ...) __LA_PRINTFLIKE(2, 3);
+void lafe_errc(int eval, int code, const char *fmt, ...) __LA_DEAD
+ __LA_PRINTFLIKE(3, 4);
#endif