aboutsummaryrefslogtreecommitdiffstats
path: root/api-compat.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-09-30 18:24:28 +0200
committerJohannes Berg <johannes@sipsolutions.net>2007-09-30 18:24:28 +0200
commit94e5e07c847768a15157c183aaa3bcb914e1afc2 (patch)
treeb4c51e1193472297d48cc3bc39053e9fe9f8d408 /api-compat.h
parent79a2ad5cb09df93f150c1afa231554eb9b37dc6b (diff)
downloaddovecot-antispam-94e5e07c847768a15157c183aaa3bcb914e1afc2.tar.gz
dovecot-antispam-94e5e07c847768a15157c183aaa3bcb914e1afc2.tar.xz
dovecot-antispam-94e5e07c847768a15157c183aaa3bcb914e1afc2.zip
Make it build against dovecot 1.1
Untested, use at your own risk, mostly consisted of copying changes from the cmd-copy.c implementation into plugin.c.
Diffstat (limited to '')
-rw-r--r--api-compat.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/api-compat.h b/api-compat.h
new file mode 100644
index 0000000..f0a0476
--- /dev/null
+++ b/api-compat.h
@@ -0,0 +1,15 @@
+#ifndef _ANTISPAM_API_COMPAT_H
+#define _ANTISPAM_API_COMPAT_H
+
+#if DOVECOT_VER==10000
+#define MAILBOX_TRANSACTION_FLAG_ASSIGN_UIDS 0
+#define str_array_length strarray_length
+#define IMAP_SYNC_FLAG_SAFE 0
+#define mailbox_transaction_commit(arg) mailbox_transaction_commit(arg, 0)
+#define mempool_unref(poolptr) pool_unref((*poolptr))
+#define command_register(str, func, flags) command_register(str, func)
+#else
+#define mempool_unref(poolptr) pool_unref(poolptr)
+#endif
+
+#endif /* _ANTISPAM_API_COMPAT_H */