]> diplodocus.org Git - nmh/commitdiff
Detect function-pointer `done' being set twice in a row.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 21 Sep 2017 15:59:15 +0000 (16:59 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 21 Sep 2017 15:59:15 +0000 (16:59 +0100)
Make `done' a function that uses a file-static function pointer, and add
set_done() to alter it.  That wants either the old or new value to be
exit(3).  If it's not, it still alters the stored pointer, to maintain
the existing behaviour, but emits a warning on stderr.  mhbuild(1)
triggers that warning, making this hunch worthwhile.

62 files changed:
Makefile.am
h/done.h [new file with mode: 0644]
h/mh.h
sbr/done.c
sbr/error.c
sbr/m_draft.c
sbr/push.c
uip/ali.c
uip/anno.c
uip/ap.c
uip/burst.c
uip/comp.c
uip/dist.c
uip/dp.c
uip/flist.c
uip/fmtdump.c
uip/fmttest.c
uip/folder.c
uip/forw.c
uip/inc.c
uip/install-mh.c
uip/mark.c
uip/mhbuild.c
uip/mhbuildsbr.c
uip/mhfixmsg.c
uip/mhical.c
uip/mhl.c
uip/mhlist.c
uip/mhlogin.c
uip/mhlsbr.c
uip/mhn.c
uip/mhparam.c
uip/mhpath.c
uip/mhshow.c
uip/mhshowsbr.c
uip/mhstore.c
uip/mkstemp.c
uip/msgchk.c
uip/new.c
uip/packf.c
uip/pick.c
uip/post.c
uip/prompter.c
uip/rcvdist.c
uip/rcvpack.c
uip/rcvstore.c
uip/rcvtty.c
uip/refile.c
uip/repl.c
uip/replsbr.c
uip/rmf.c
uip/rmm.c
uip/scan.c
uip/send.c
uip/sendsbr.c
uip/show.c
uip/slocal.c
uip/sortm.c
uip/viamail.c
uip/whatnowproc.c
uip/whatnowsbr.c
uip/whom.c

index 68a7d90..b75896a 100644 (file)
@@ -335,6 +335,7 @@ noinst_HEADERS = \
     h/addrsbr.h \
     h/aliasbr.h \
     h/crawl_folders.h \
+    h/done.h \
     h/dropsbr.h \
     h/fmt_compile.h \
     h/fmt_scan.h \
diff --git a/h/done.h b/h/done.h
new file mode 100644 (file)
index 0000000..b0c3cc3
--- /dev/null
+++ b/h/done.h
@@ -0,0 +1,9 @@
+/* done.h -- allow calls to exit(3) to be redirected
+ *
+ * This code is Copyright (c) 2017, by the authors of nmh.  See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
+ */
+
+void set_done(void (*new)(int) NORETURN);
+void done(int status) NORETURN;
diff --git a/h/mh.h b/h/mh.h
index 069d9cb..a97a2e4 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
@@ -512,6 +512,4 @@ extern char *version_str;
 extern char *whatnowproc;
 extern char *whomproc;
 
-extern void (*done) (int) NORETURN;
-
 #include <h/prototypes.h>
index c703aba..cd76fac 100644 (file)
@@ -7,4 +7,39 @@
 
 #include <h/mh.h>
 
-void (*done) (int) NORETURN = exit;
+/* It's undefined behaviour in C99 to convert from a function pointer to
+ * a data-object pointer, e.g. void pointer.  gcc's -pedantic warns of
+ * this and can stop compilation.  POSIX requires the operation however,
+ * e.g. for dlsym(3), and so we know it's safe on POSIX platforms, e.g.
+ * the pointers are of the same size.  Thus use a union to subvert gcc's
+ * check.  The function-pointer equivalent of a void pointer is any
+ * function-pointer type as all function pointers are defined to be
+ * convertible from one another;  use the simplest available. */
+typedef union {
+    void *v;
+    void (*f)(void);
+} generic_pointer;
+
+static void (*altexit)(int) NORETURN = exit;
+
+/* set_done changes the path of done() from exit(3), or back to exit(3).
+ * Anything else will work, but a standard-error warning will report the
+ * old non-exit() value has been trampled. */
+void
+set_done(void (*new)(int) NORETURN)
+{
+    generic_pointer gpo, gpn;
+
+    if (altexit != exit && new != exit) {
+        gpo.f = (void (*)(void))altexit;
+        gpn.f = (void (*)(void))new;
+        inform("altexit trampled: %p %p", gpo.v, gpn.v);
+    }
+    altexit = new;
+}
+
+void NORETURN
+done(int status)
+{
+    (*altexit)(status);
+}
index 5a5808c..8285051 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <sys/types.h>
 #include <sys/uio.h>
-
+#include "h/done.h"
 
 /* inform calls advertise() with no what and no tail.
  * Thus the simple "[invo_name: ]fmt\n" results. */
index 683af25..a09bf06 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include "m_maildir.h"
+#include "h/done.h"
 
 
 char *
index 6708db4..4576c8e 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <h/mh.h>
 #include <h/signals.h>
+#include "h/done.h"
 #include "m_mktemp.h"
 
 
index 43e9f5a..a1b642c 100644 (file)
--- a/uip/ali.c
+++ b/uip/ali.c
@@ -9,6 +9,7 @@
 #include <h/addrsbr.h>
 #include <h/aliasbr.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 
 #define ALI_SWITCHES \
index 521f7b9..77ecc10 100644 (file)
@@ -43,6 +43,7 @@
 
 #include <h/mh.h>
 #include <h/utils.h>
+#include "h/done.h"
 #include "sbr/m_maildir.h"
 
 #define ANNO_SWITCHES \
index 8265723..0e3e8b5 100644 (file)
--- a/uip/ap.c
+++ b/uip/ap.c
@@ -9,6 +9,7 @@
 #include <h/addrsbr.h>
 #include <h/fmt_scan.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/terminal.h"
 
index 5623e2c..5e5d86b 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include <h/mhparse.h>
+#include "h/done.h"
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
 #include "mhfree.h"
index 744ea19..2805d56 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include <h/fmt_scan.h>
+#include "h/done.h"
 #include "sbr/m_maildir.h"
 #include <fcntl.h>
 
index b0728bd..7eea4fc 100644 (file)
@@ -9,6 +9,7 @@
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 #include <fcntl.h>
+#include "h/done.h"
 
 #define DIST_SWITCHES \
     X("annotate", 0, ANNOSW) \
index 9ed5199..dc79991 100644 (file)
--- a/uip/dp.c
+++ b/uip/dp.c
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include <h/fmt_scan.h>
 #include <h/tws.h>
index f40f010..057192c 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <h/mh.h>
 #include <h/utils.h>
+#include "h/done.h"
 #include "sbr/m_maildir.h"
 
 /*
index 90e87e1..be6b763 100644 (file)
@@ -9,6 +9,7 @@
 #include <h/fmt_scan.h>
 #include <h/fmt_compile.h>
 #include <h/scansbr.h>
+#include "h/done.h"
 #include <h/utils.h>
 
 #define FMTDUMP_SWITCHES \
index 6b49fc6..9a569ae 100644 (file)
@@ -11,6 +11,7 @@
 #include <h/utils.h>
 #include <h/scansbr.h>
 #include <h/addrsbr.h>
+#include "h/done.h"
 #include "sbr/m_maildir.h"
 #include "sbr/terminal.h"
 
index 625d68a..001c342 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <h/mh.h>
 #include <h/crawl_folders.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
index 51caa0b..288e85a 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <fcntl.h>
 #include <h/tws.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
index 2bd1b71..e824ea3 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -40,6 +40,7 @@
 #include <h/signals.h>
 #include <h/tws.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include "sbr/lock_file.h"
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
@@ -196,7 +197,7 @@ main (int argc, char **argv)
 
     int nmsgs, nbytes;
     char *MAILHOST_env_variable;
-    done=inc_done;
+    set_done(inc_done);
 
 /* absolutely the first thing we do is save our privileges,
  * and drop them if we can.
@@ -907,7 +908,7 @@ skip:
 static void NORETURN
 inc_done (int status)
 {
-    done = exit;
+    set_done(exit);
     if (locked)
     {
         GETGROUPPRIVS();
index 549e452..2470c3e 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>                              /* mh internals */
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 #include "sbr/makedir.h"
index 0b17b86..1c92caf 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
index 3b17f35..bb45519 100644 (file)
@@ -13,6 +13,7 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/mhcachesbr.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
@@ -108,7 +109,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 2)) { return 1; }
 
-    done=unlink_done;
+    set_done(unlink_done);
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index ffec2d6..ba96ac4 100644 (file)
@@ -21,6 +21,7 @@
 #include <h/fmt_scan.h>
 #include <h/mime.h>
 #include <h/mhparse.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "h/mhcachesbr.h"
 #include "mhmisc.h"
@@ -445,7 +446,7 @@ finish_field:
         CT *ctp;
         convert_list *next;
 
-        done = freects_done;
+        set_done(freects_done);
 
         /* In case there are multiple calls that land here, prevent leak. */
         for (ctp = cts; ctp && *ctp; ++ctp) { free_content (*ctp); }
index 2bbb045..486c7cc 100644 (file)
@@ -9,6 +9,7 @@
 #include <h/fmt_scan.h>
 #include <h/mime.h>
 #include <h/mhparse.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include <h/signals.h>
 #include "sbr/m_maildir.h"
index d62fce9..b29be15 100644 (file)
@@ -11,6 +11,7 @@
 #include <h/fmt_scan.h>
 #include "h/addrsbr.h"
 #include "h/mts.h"
+#include "h/done.h"
 #include "h/utils.h"
 #include <time.h>
 
index ea7a244..e360820 100644 (file)
--- a/uip/mhl.c
+++ b/uip/mhl.c
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 
 
index 93e2ea0..aa304e6 100644 (file)
@@ -14,6 +14,7 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/mhcachesbr.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "mhmisc.h"
 #include "sbr/m_maildir.h"
@@ -79,7 +80,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 1)) { return 1; }
 
-    done=freects_done;
+    set_done(freects_done);
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index aee2c1e..e02ef46 100644 (file)
@@ -10,6 +10,7 @@
 #include <string.h>
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include <h/oauth.h>
 #include "sbr/lock_file.h"
index d21c71c..5c050e3 100644 (file)
@@ -10,6 +10,7 @@
 #include <h/addrsbr.h>
 #include <h/fmt_scan.h>
 #include <h/tws.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_popen.h"
 #include <setjmp.h>
index 7103488..94f25ac 100644 (file)
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -15,6 +15,7 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/mhcachesbr.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "mhmisc.h"
 #include "sbr/m_maildir.h"
@@ -118,7 +119,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 1)) { return 1; }
 
-    done=freects_done;
+    set_done(freects_done);
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index bfecb9f..e8047be 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <h/mh.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 
 #define MHPARAM_SWITCHES \
index abf6b01..1e6ab51 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
index fea4083..d3b8504 100644 (file)
@@ -15,6 +15,7 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/mhcachesbr.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "mhmisc.h"
 #include "sbr/m_maildir.h"
@@ -93,7 +94,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 1)) { return 1; }
 
-    done=freects_done;
+    set_done(freects_done);
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index f0b5ef4..aee86ec 100644 (file)
@@ -14,6 +14,7 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/fmt_scan.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "mhmisc.h"
 #include "mhshowsbr.h"
index ed6ad77..7fa819a 100644 (file)
@@ -14,6 +14,7 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/mhcachesbr.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "mhmisc.h"
 #include "sbr/m_maildir.h"
@@ -78,7 +79,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 1)) { return 1; }
 
-    done=freects_done;
+    set_done(freects_done);
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index f28ccf2..7028d43 100644 (file)
@@ -118,6 +118,7 @@ build_template(const char *directory, const char *prefix, const char *suffix) {
 
 #if NMH
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 
 #if HAVE_MKSTEMPS
index 73ed728..e4aad8a 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <h/mts.h>
 #include <h/tws.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include <pwd.h>
 
index ae5f376..d608883 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -13,6 +13,7 @@
 
 #include <h/mh.h>
 #include <h/crawl_folders.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/lock_file.h"
 #include "sbr/m_maildir.h"
index 94a18ef..4d25c38 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <fcntl.h>
 #include <h/dropsbr.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
@@ -46,7 +47,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 1)) { return 1; }
 
-    done=mbxclose_done;
+    set_done(mbxclose_done);
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 1084a47..d252f3c 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <h/tws.h>
 #include <h/picksbr.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
@@ -72,7 +73,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 1)) { return 1; }
 
-    done=putzero_done;
+    set_done(putzero_done);
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 56ae555..c6a0917 100644 (file)
@@ -12,6 +12,7 @@
 #include <h/aliasbr.h>
 #include <h/dropsbr.h>
 #include <h/mime.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include <h/tws.h>
 #include <h/mts.h>
index fc7b2c6..3a51dbe 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <fcntl.h>
 #include <h/signals.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_mktemp.h"
 #include <setjmp.h>
index f30a573..bf301cc 100644 (file)
@@ -10,6 +10,7 @@
 #include <h/rcvmail.h>
 #include <h/tws.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_mktemp.h"
 
@@ -49,7 +50,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 2)) { return 1; }
 
-    done=unlink_done;
+    set_done(unlink_done);
 
     /*
      * Configure this now, since any unknown switches to rcvdist get
index 7fc7602..ec1342e 100644 (file)
@@ -10,6 +10,7 @@
 #include <h/rcvmail.h>
 #include <h/tws.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 
 #define RCVPACK_SWITCHES \
index 6f82f81..0238818 100644 (file)
@@ -9,6 +9,7 @@
 #include <fcntl.h>
 #include <h/signals.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
@@ -58,7 +59,7 @@ main (int argc, char **argv)
 
     if (nmh_init(argv[0], 2)) { return 1; }
 
-    done=unlink_done;
+    set_done(unlink_done);
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
index 2c66fa6..f1368f7 100644 (file)
@@ -17,6 +17,7 @@
 #include <h/scansbr.h>
 #include <h/tws.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_mktemp.h"
 #include <fcntl.h>
index bed5cba..be1294f 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
index 5f2886a..f213eb3 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <h/mh.h>
 #include <h/mime.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
index f99b6d0..05997fd 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <h/addrsbr.h>
 #include <h/fmt_scan.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include <sys/file.h>          /* L_SET */
 
index a99b53c..406d9a6 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
index fa5fe5b..104d5d2 100644 (file)
--- a/uip/rmm.c
+++ b/uip/rmm.c
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
index b0c64f1..c9cf4ce 100644 (file)
@@ -10,6 +10,7 @@
 #include <h/scansbr.h>
 #include <h/tws.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 #include "sbr/terminal.h"
index 817feb7..f974337 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <h/mh.h>
 #include <fcntl.h>
+#include "h/done.h"
 #include <h/utils.h>
 #ifdef OAUTH_SUPPORT
 # include <h/oauth.h>
index 371321c..d7e7603 100644 (file)
@@ -24,6 +24,7 @@
 #ifdef OAUTH_SUPPORT
 #include <h/oauth.h>
 #endif
+#include "h/done.h"
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
 #include "sbr/message_id.h"
@@ -109,7 +110,7 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st,
        break;
     }
 
-    done=armed_done;
+    set_done(armed_done);
     switch (setjmp (env)) {
     case OK:
        /*
@@ -175,7 +176,7 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st,
        break;
     }
 
-    done=exit;
+    set_done(exit);
     if (distfile)
        (void) m_unlink (distfile);
 
index 86e8e5b..def6275 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <h/mh.h>
 #include <h/mime.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
index a4344fd..df02d0d 100644 (file)
@@ -26,6 +26,7 @@
 #include <setjmp.h>
 #include <h/tws.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/lock_file.h"
 #include "sbr/m_mktemp.h"
index 9f95c6d..0b951bf 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <h/mh.h>
 #include <h/tws.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_maildir.h"
 
index db93066..f706dfd 100644 (file)
@@ -12,6 +12,7 @@
 #include <h/tws.h>
 #include <h/mime.h>
 #include <h/mhparse.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_mktemp.h"
 #include "sbr/base64.h"
index ca2236e..2fa0ed8 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 
 
 /*
index 5183650..c5d2a8f 100644 (file)
@@ -44,6 +44,7 @@
 #ifdef OAUTH_SUPPORT
 # include <h/oauth.h>
 #endif
+#include "h/done.h"
 #include "sbr/m_maildir.h"
 #include "sbr/m_mktemp.h"
 #include "sbr/mime_type.h"
index 39a6470..76f434e 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include <h/signals.h>
 #include "sbr/m_maildir.h"