#include <libmilter/mfapi.h> int smfi_version( unsigned int *pmajor, unsigned int *pminor, unsigned int *ppl );Get the (runtime) version of libmilter.
|RETURN VALUES||smfi_version returns MI_SUCCESS.|
SMFI_VERSION. To extract the major and minor version as well as the current patch level from this macro, the macros
SM_LM_VRS_PLVL(v)can be used, respectively. A milter can check the
SMFI_VERSIONmacro to determine which functions to use (at compile time via C preprocessor statements). Using this macro and the
smfi_version()function, a milter can determine at runtime whether it has been (dynamically) linked against the expected libmilter version. Such a function should only compare the major and minor version, not the patch level, i.e., the libmilter library will be compatible despite different patch levels.