diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-05-31 11:27:02 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2008-05-31 11:27:02 +0200 |
commit | d1553f1417896deea5f534518a19ad92d9ecbcb9 (patch) | |
tree | 8e4650c8127b674790ca481307885a0a06214d18 /antispam-plugin.h | |
parent | 5a2cb64e4da591bea59a38fc4363ace858063930 (diff) | |
download | dovecot-antispam-d1553f1417896deea5f534518a19ad92d9ecbcb9.tar.gz dovecot-antispam-d1553f1417896deea5f534518a19ad92d9ecbcb9.tar.xz dovecot-antispam-d1553f1417896deea5f534518a19ad92d9ecbcb9.zip |
auto-detect dovecot version
Diffstat (limited to '')
-rw-r--r-- | antispam-plugin.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/antispam-plugin.h b/antispam-plugin.h index d50abf5..ff1294e 100644 --- a/antispam-plugin.h +++ b/antispam-plugin.h @@ -1,12 +1,12 @@ #ifndef _ANTISPAM_PLUGIN_H #define _ANTISPAM_PLUGIN_H -#include "config.h" #include "lib.h" #include "str.h" #include "client.h" #include "ostream.h" #include "imap-search.h" +#include "dovecot-version.h" #define __stringify_1(x) #x #define stringify(x) __stringify_1(x) @@ -79,7 +79,7 @@ extern bool need_folder_hook; * Dovecot version compat code */ -#if defined(CONFIG_DOVECOT_11) +#if DOVECOT_VERSION_CODE(1, 1) == DOVECOT_VERSION #define __attr_unused__ ATTR_UNUSED #define ME(err) MAIL_ERROR_ ##err, #define PLUGIN_ID uint32_t PLUGIN_FUNCTION(id) = 0 @@ -107,7 +107,7 @@ o_stream_create_from_fd(int fd, pool_t pool ATTR_UNUSED) { return o_stream_create_fd(fd, 0, TRUE); } -#elif defined(CONFIG_DOVECOT_10) +#elif DOVECOT_VERSION_CODE(1, 0) == DOVECOT_VERSION #define ME(err) #define PLUGIN_ID #define str_array_length(x) strarray_length(x) |