Fix means for building dlfunc routines
authorJeremy Harris <jgh146exb@wizmail.org>
Mon, 11 Nov 2019 14:44:34 +0000 (14:44 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Mon, 11 Nov 2019 14:44:34 +0000 (14:44 +0000)
Broken-by: e59797e3bd
doc/doc-docbook/spec.xfpt
src/src/local_scan.h

index bca6689b69e9be18ce516344723c7eec285c2133..6b2d97b1718570deb4aed8d9d6aad9f9f8e7bfa6 100644 (file)
@@ -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).
 
 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
 are also available for dynamically loaded functions. The function itself
 must have the following type:
 .code
index c1e1f9bc161467c65621aee35de4a2247f851341..41a17a35cd576053b55e0cc675fcb8d470650245 100644 (file)
@@ -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);
 
        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. */
 /* 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. */