From df92b047912b261858e0368cbbc435aa05c4c98d Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Mon, 3 Feb 2020 14:19:20 +0000 Subject: [PATCH 1/1] Local_scan: more guards in included files --- src/src/local_scan.h | 4 ++++ src/src/mytypes.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/src/local_scan.h b/src/src/local_scan.h index 7243f6afc..206a843ec 100644 --- a/src/src/local_scan.h +++ b/src/src/local_scan.h @@ -10,6 +10,10 @@ source for the local_scan.c() function. It contains definitions that are made available for use in that function, and which are documented. That source should first #define LOCAL_SCAN +Not every definition that becomes available to the compiler by the inclusion +of this file is part of the local_scan API. The "Adding a local scan function +to Exim" chapter in the documentation is definitive. + This API is also used for functions called by the ${dlfunc expansion item. Source for those should first #define DLFUNC_IMPL and then include this file. Coders of dlfunc routines should read the notes on tainting at the start of diff --git a/src/src/mytypes.h b/src/src/mytypes.h index 6d2f169b7..a3496a298 100644 --- a/src/src/mytypes.h +++ b/src/src/mytypes.h @@ -124,7 +124,7 @@ functions that are called quite often; for other calls to external libraries #define Ustrtoul(s,t,b) strtoul(CCS(s),CSS(t),b) #define Uunlink(s) unlink(CCS(s)) -#ifdef EM_VERSION_C +#if defined(EM_VERSION_C) || defined(LOCAL_SCAN) || defined(DLFUNC_IMPL) # define Ustrcat(s,t) strcat(CS(s), CCS(t)) # define Ustrcpy(s,t) strcpy(CS(s), CCS(t)) # define Ustrncat(s,t,n) strncat(CS(s), CCS(t), n) -- 2.30.2