dovecot-2.2: Add DOVECOT_PREREQ to src/lib/macros.h - convenienc...

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 5 00:13:33 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/a588b743d695
changeset: 16181:a588b743d695
user:      Dennis Schridde <devurandom at gmx.net>
date:      Sun Oct 30 12:39:53 2011 +0100
description:
Add DOVECOT_PREREQ to src/lib/macros.h - convenience macro to test the version of dovecot

diffstat:

 src/lib/macros.h |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r e294e416f5ba -r a588b743d695 src/lib/macros.h
--- a/src/lib/macros.h	Sun Oct 30 12:23:28 2011 +0100
+++ b/src/lib/macros.h	Sun Oct 30 12:39:53 2011 +0100
@@ -196,4 +196,12 @@
 #define i_unreached() \
 	i_panic("file %s: line %d: unreached", __FILE__, __LINE__)
 
+/* Convenience macros to test the versions of dovecot. */
+#if defined DOVECOT_VERSION_MAJOR && defined DOVECOT_VERSION_MINOR
+#  define DOVECOT_PREREQ(maj, min) \
+          ((DOVECOT_VERSION_MAJOR << 16) + DOVECOT_VERSION_MINOR >= ((maj) << 16) + (min))
+#else
+#  define DOVECOT_PREREQ(maj, min) 0
 #endif
+
+#endif


More information about the dovecot-cvs mailing list