]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: DOVECOT_PREREQ() - Add micro version
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 14 Sep 2021 16:21:09 +0000 (18:21 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 8 Nov 2021 08:51:57 +0000 (08:51 +0000)
Nowadays APIs can change between micro versions as well.

src/lib/macros.h

index dea1ac7270330a0b2bfa3708279fe21d83bc1533..8cd159f784b67862f067fa7e0e74b2223134428f 100644 (file)
 #endif
 
 /* Convenience macro to test the versions of dovecot. */
-#define DOVECOT_PREREQ(maj, min) \
-       ((DOVECOT_VERSION_MAJOR << 16) + DOVECOT_VERSION_MINOR >= ((maj) << 16) + (min))
+#define DOVECOT_PREREQ(maj, min, micro) \
+       ((DOVECOT_VERSION_MAJOR << 24) + \
+        (DOVECOT_VERSION_MINOR << 16) + \
+        DOVECOT_VERSION_MICRO >= ((maj) << 24) + ((min) << 16) + (micro))
 
 #ifdef __cplusplus
 #  undef STATIC_ARRAY