/******************************************************************************/
-/* postlicyd: a postfix policy daemon with a lot of features */
+/* pfixtools: a collection of postfix related tools */
/* ~~~~~~~~~ */
/* ________________________________________________________________________ */
/* */
#include <errno.h>
#include <limits.h>
#include <pthread.h>
+#include <signal.h>
#include <stdbool.h>
#include <stdbool.h>
#include <stdio.h>
syslog(LOG_ERR, "%s:%d:%s: %s: %m", \
__FILE__, __LINE__, __func__, fun)
+typedef int (*initcall_t)(void);
+typedef void (*exitcall_t)(void);
+
+#define __init __attribute__((__used__,__section__(".mad.init")))
+#define __exit __attribute__((__used__,__section__(".mad.exit")))
+
+#define module_init(fn) static initcall_t __init_##fn __init = fn;
+#define module_exit(fn) static exitcall_t __exit_##fn __exit = fn;
+
+/* common.c */
+extern sig_atomic_t cleanexit;
+extern sig_atomic_t sigint;
+extern sig_atomic_t sighup;
+
+void common_sighandler(int sig);
+void common_initialize(void);
+void common_shutdown(void);
+
#endif