From: Jeremy Harris Date: Sat, 19 Oct 2019 18:55:39 +0000 (+0100) Subject: Fix HAVE_LOCAL_SCAN build. Bug 2457 X-Git-Tag: exim-4_94_RC0~240^2~35 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0b2719ad1b302f9bfb25d6c29b6541e7d8a392ef;p=exim.git Fix HAVE_LOCAL_SCAN build. Bug 2457 Broken-by: f3ebb786e4 (cherry picked from commits d48326c00b, 1352e600b8) --- diff --git a/src/src/local_scan.h b/src/src/local_scan.h index 235812ada..fb878591e 100644 --- a/src/src/local_scan.h +++ b/src/src/local_scan.h @@ -199,10 +199,12 @@ we can use an inlined implementation in the compiles of the main Exim files, with the original name. */ # define string_copy(s) string_copy_function(s) -# define string_copyn(s, n) string_copyn_function(s, n) +# define string_copyn(s, n) string_copyn_function((s), (n)) +# define string_copy_taint(s, t) string_copy_taint_function((s), (t)) extern uschar * string_copy_function(const uschar *); extern uschar * string_copyn_function(const uschar *); +extern uschar * string_copy_taint_function(const uschar *); #endif /* End of local_scan.h */ diff --git a/src/src/string.c b/src/src/string.c index a95439651..ced1ad8c7 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -411,7 +411,7 @@ return ss; -#ifdef HAVE_LOCAL_SCAN +#if defined(HAVE_LOCAL_SCAN) && !defined(MACRO_PREDEF) && !defined(COMPILE_UTILITY) /************************************************* * Copy and save string * *************************************************/ @@ -432,7 +432,7 @@ As above, but explicitly specifying the result taint status */ uschar * -string_copy_taint(const uschar * s, BOOL tainted) +string_copy_taint_function(const uschar * s, BOOL tainted) { int len = Ustrlen(s) + 1; uschar *ss = store_get(len, tainted); diff --git a/test/runtest b/test/runtest index 49ff84535..c78cabf4b 100755 --- a/test/runtest +++ b/test/runtest @@ -1280,6 +1280,10 @@ RESET_AFTER_EXTRA_LINE_READ: # TLS resumption is not always supported by the build next if /in tls_resumption_hosts\?/; + # Most builds are without HAVE_LOCAL_SCAN + next if /^calling local_scan(); timeout=300$/; + next if /^local_scan() returned 0 NULL$/; + # Platform differences in errno strings s/ SMTP\(Operation timed out\)<