From: Jeremy Harris Date: Mon, 11 Nov 2019 14:44:34 +0000 (+0000) Subject: Fix means for building dlfunc routines X-Git-Tag: exim-4.93-RC3~12 X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=commitdiff_plain;h=8b5d88d25d26861c08ef261789c6fb4658459c31 Fix means for building dlfunc routines Broken-by: e59797e3bd --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index bca6689b6..6b2d97b17 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -9485,9 +9485,15 @@ set in &_Local/Makefile_&. Once loaded, Exim remembers the dynamically loaded object so that it doesn't reload the same object file in the same Exim process (but of course Exim does start new processes frequently). -There may be from zero to eight arguments to the function. When compiling -a local function that is to be called in this way, &_local_scan.h_& should be -included. The Exim variables and functions that are defined by that API +There may be from zero to eight arguments to the function. + +.new +When compiling +a local function that is to be called in this way, +first &_DLFUNC_IMPL_& should be defined, +and second &_local_scan.h_& should be included. +.wen +The Exim variables and functions that are defined by that API are also available for dynamically loaded functions. The function itself must have the following type: .code diff --git a/src/src/local_scan.h b/src/src/local_scan.h index c1e1f9bc1..41a17a35c 100644 --- a/src/src/local_scan.h +++ b/src/src/local_scan.h @@ -193,7 +193,7 @@ extern void smtp_vprintf(const char *, BOOL, va_list); string_sprintf_trc(fmt, US __FUNCTION__, __LINE__, __VA_ARGS__) extern uschar *string_sprintf_trc(const char *, const uschar *, unsigned, ...) ALMOST_PRINTF(1,4); -#ifdef LOCAL_SCAN +#if defined(LOCAL_SCAN) || defined(DLFUNC_IMPL) /* When compiling a local_scan() file we want to rename a published API, so that we can use an inlined implementation in the compiles of the main Exim files, with the original name. */