+/***** LOG functions *****/
+
+#define M_DEBUG_CONFIG 0x001
+#define M_DEBUG_PHASE 0x002
+#define M_DEBUG 0x004
+#define M_INFO 0x008
+#define M_NOTICE 0x010
+#define M_WARNING 0x020
+#define M_ERR 0x040
+#define M_SECURITY 0x080
+#define M_FATAL 0x100
+
+/* The fatal() family of functions require messages that do not end in '\n' */
+extern NORETURN(fatal(const char *message, ...));
+extern NORETURN(fatal_perror(const char *message, ...));
+extern NORETURN(fatal_status(int status, const char *message, ...));
+extern NORETURN(fatal_perror_status(int status, const char *message, ...));
+
+/* The cfgfatal() family of functions require messages that end in '\n' */
+extern NORETURN(cfgfatal(struct cloc loc, cstring_t facility,
+ const char *message, ...));
+extern void cfgfile_postreadcheck(struct cloc loc, FILE *f);
+extern NORETURN(vcfgfatal_maybefile(FILE *maybe_f, struct cloc loc,
+ cstring_t facility, const char *message,
+ va_list));
+extern NORETURN(cfgfatal_maybefile(FILE *maybe_f, struct cloc loc,
+ cstring_t facility,
+ const char *message, ...));
+
+extern void Message(uint32_t class, const char *message, ...)
+ FORMAT(printf,2,3);
+extern void log_from_fd(int fd, cstring_t prefix, struct log_if *log);
+
+/***** END of log functions *****/
+
+#define STRING2(x) #x
+#define STRING(x) STRING2(x)
+
+#define FILLZERO(obj) (memset(&(obj),0,sizeof((obj))))
+