From: Andreas Metzler Date: Sat, 26 Oct 2019 17:06:09 +0000 (+0100) Subject: Fix local-scan ABI. Bug 2458 X-Git-Tag: exim-4.93-RC1~8 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=276f020fb7d0ce2740e90a749b3a49d0d5f74d3d;p=exim.git Fix local-scan ABI. Bug 2458 --- diff --git a/src/exim_monitor/em_log.c b/src/exim_monitor/em_log.c index 1e1dc7c04..348f0642f 100644 --- a/src/exim_monitor/em_log.c +++ b/src/exim_monitor/em_log.c @@ -365,9 +365,8 @@ if (log_datestamping) { uschar log_file_wanted[256]; /* Do *not* use "%s" here, we need the %D datestamp in the log_file string to - be expanded. The trailing NULL arg is to quieten preprocessors that need at - least one arg for a variadic set in a macro. */ - string_format(log_file_wanted, sizeof(log_file_wanted), CS log_file, NULL); + be expanded. */ + string_format(log_file_wanted, sizeof(log_file_wanted), CS log_file); if (Ustrcmp(log_file_wanted, log_file_open) != 0) { if (LOG != NULL) diff --git a/src/src/functions.h b/src/src/functions.h index 3b3a12b18..37bca23e3 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -520,7 +520,8 @@ extern uschar *string_localpart_utf8_to_alabel(const uschar *, uschar **); #endif #define string_format(buf, siz, fmt, ...) \ - string_format_trc(buf, siz, US __FUNCTION__, __LINE__, fmt, __VA_ARGS__) + string_format_trc(buf, siz, US __FUNCTION__, __LINE__, \ + fmt __VA_OPT__(,) __VA_ARGS__) extern BOOL string_format_trc(uschar *, int, const uschar *, unsigned, const char *, ...) ALMOST_PRINTF(5,6); @@ -531,7 +532,8 @@ extern gstring *string_vformat_trc(gstring *, const uschar *, unsigned, unsigned, unsigned, const char *, va_list); #define string_open_failed(eno, fmt, ...) \ - string_open_failed_trc(eno, US __FUNCTION__, __LINE__, fmt, __VA_ARGS__) + string_open_failed_trc(eno, US __FUNCTION__, __LINE__, \ + fmt __VA_OPT__(,) __VA_ARGS__) extern uschar *string_open_failed_trc(int, const uschar *, unsigned, const char *, ...) PRINTF_FUNCTION(4,5); @@ -831,11 +833,11 @@ if (g) store_release_above_3(g->s + (g->size = g->ptr + 1), file, line); #define string_fmt_append(g, fmt, ...) \ string_fmt_append_f_trc(g, US __FUNCTION__, __LINE__, \ - SVFMT_EXTEND|SVFMT_REBUFFER, fmt, __VA_ARGS__) + SVFMT_EXTEND|SVFMT_REBUFFER, fmt __VA_OPT__(,) __VA_ARGS__) #define string_fmt_append_f(g, flgs, fmt, ...) \ string_fmt_append_f_trc(g, US __FUNCTION__, __LINE__, \ - flgs, fmt, __VA_ARGS__) + flgs, fmt __VA_OPT__(,) __VA_ARGS__) static inline gstring * string_fmt_append_f_trc(gstring * g, const uschar * func, unsigned line, diff --git a/src/src/local_scan.h b/src/src/local_scan.h index fb878591e..be263227e 100644 --- a/src/src/local_scan.h +++ b/src/src/local_scan.h @@ -99,7 +99,7 @@ each time a new feature is added (in a way that doesn't break backward compatibility). */ #define LOCAL_SCAN_ABI_VERSION_MAJOR 2 -#define LOCAL_SCAN_ABI_VERSION_MINOR 0 +#define LOCAL_SCAN_ABI_VERSION_MINOR 1 #define LOCAL_SCAN_ABI_VERSION \ LOCAL_SCAN_ABI_VERSION_MAJOR.LOCAL_SCAN_ABI_VERSION_MINOR @@ -190,7 +190,7 @@ extern void smtp_printf(const char *, BOOL, ...) PRINTF_FUNCTION(1,3); extern void smtp_vprintf(const char *, BOOL, va_list); #define string_sprintf(fmt, ...) \ - string_sprintf_trc(fmt, US __FUNCTION__, __LINE__, __VA_ARGS__) + string_sprintf_trc(fmt, US __FUNCTION__, __LINE__ __VA_OPT__(,) __VA_ARGS__) extern uschar *string_sprintf_trc(const char *, const uschar *, unsigned, ...) ALMOST_PRINTF(1,4); #ifdef LOCAL_SCAN @@ -203,8 +203,8 @@ with the original name. */ # 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 *); +extern uschar * string_copyn_function(const uschar *, int n); +extern uschar * string_copy_taint_function(const uschar *, BOOL tainted); #endif /* End of local_scan.h */