Gitweb:
https://git.exim.org/exim.git/commitdiff/8b5d88d25d26861c08ef261789c6fb4658459c31
Commit: 8b5d88d25d26861c08ef261789c6fb4658459c31
Parent: ddd15fc7507e08ec7aad7a538c5ca236435c55ca
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Mon Nov 11 14:44:34 2019 +0000
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Mon Nov 11 14:44:34 2019 +0000
Fix means for building dlfunc routines
Broken-by: e59797e3bd
---
doc/doc-docbook/spec.xfpt | 12 +++++++++---
src/src/local_scan.h | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index bca6689..6b2d97b 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 c1e1f9b..41a17a3 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. */