summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2019-11-11 14:44:34 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2019-11-11 14:44:34 +0000
commit8b5d88d25d26861c08ef261789c6fb4658459c31 (patch)
tree28a5b49a6099a453dff2911758110702d0c0c88f
parentddd15fc7507e08ec7aad7a538c5ca236435c55ca (diff)
Fix means for building dlfunc routines
Broken-by: e59797e3bd
-rw-r--r--doc/doc-docbook/spec.xfpt12
-rw-r--r--src/src/local_scan.h2
2 files changed, 10 insertions, 4 deletions
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. */