Aligned definition of LOCAL_SCAN and DLFUNC_IMPL with exim local_scan API version

This commit is contained in:
Heiko Reese
2021-08-22 01:37:20 +02:00
parent f4b89286b7
commit e89e5d453d

View File

@ -8,31 +8,31 @@
#include <sys/types.h>
#include <unistd.h>
#define LOCAL_SCAN
#define DLFUNC_IMPL
/* Exim4 dlfunc API header */
#include <exim4/local_scan.h>
/*
* This is a set of workarounds for the different exim local_scan ABI versions, distribution patches and missing
* definitions which prevent late binding.
* This is a set of workarounds for the different exim local_scan ABI versions and distribution patches.
*
* List of local_scan ABI versions per distribution:
*
* 2.0 Debian 10 (Buster)
* 4.1 Debian 11 (Bullseye)
* 2.0 Ubuntu 18-04 (Bionic)
* 2.0 Debian 10 (Buster)
* 3.1 Ubuntu 20-04 (Focal)
* 4.1 Debian 11 (Bullseye)
*/
#if LOCAL_SCAN_VERSION < 3
#define LOCAL_SCAN
#include <exim4/local_scan.h>
#define store_get_untainted(size) (store_get(size))
#define store_get_tainted(size) (store_get(size))
#elif LOCAL_SCAN_VERSION >= 3
#define DLFUNC_IMPL
#include <exim4/local_scan.h>
#define store_get_untainted(size) (store_get(size, FALSE))
#define store_get_tainted(size) (store_get(size, TRUE))
#else
#error "exim4 local version"
#error "exim local_scan API version unknown"
#endif
/*