From: Jeremy Harris Date: Sat, 26 Oct 2019 18:11:41 +0000 (+0100) Subject: Revert "Fix local-scan ABI. Bug 2458" X-Git-Tag: exim-4.93-RC1~7 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c4efe382b151f36a90213f8a3e629d4290ea22a8;p=exim.git Revert "Fix local-scan ABI. Bug 2458" Too many older platforms have compilers do not support __VA_OPT__(). This reverts commit 276f020fb7d0ce2740e90a749b3a49d0d5f74d3d. --- diff --git a/src/exim_monitor/em_log.c b/src/exim_monitor/em_log.c index 348f0642f..1e1dc7c04 100644 --- a/src/exim_monitor/em_log.c +++ b/src/exim_monitor/em_log.c @@ -365,8 +365,9 @@ 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. */ - string_format(log_file_wanted, sizeof(log_file_wanted), CS log_file); + 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); 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 37bca23e3..3b3a12b18 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -520,8 +520,7 @@ 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_OPT__(,) __VA_ARGS__) + string_format_trc(buf, siz, US __FUNCTION__, __LINE__, fmt, __VA_ARGS__) extern BOOL string_format_trc(uschar *, int, const uschar *, unsigned, const char *, ...) ALMOST_PRINTF(5,6); @@ -532,8 +531,7 @@ 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_OPT__(,) __VA_ARGS__) + string_open_failed_trc(eno, US __FUNCTION__, __LINE__, fmt, __VA_ARGS__) extern uschar *string_open_failed_trc(int, const uschar *, unsigned, const char *, ...) PRINTF_FUNCTION(4,5); @@ -833,11 +831,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_OPT__(,) __VA_ARGS__) + SVFMT_EXTEND|SVFMT_REBUFFER, fmt, __VA_ARGS__) #define string_fmt_append_f(g, flgs, fmt, ...) \ string_fmt_append_f_trc(g, US __FUNCTION__, __LINE__, \ - flgs, fmt __VA_OPT__(,) __VA_ARGS__) + flgs, fmt, __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 be263227e..fb878591e 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 1 +#define LOCAL_SCAN_ABI_VERSION_MINOR 0 #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_OPT__(,) __VA_ARGS__) + 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 @@ -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 *, int n); -extern uschar * string_copy_taint_function(const uschar *, BOOL tainted); +extern uschar * string_copyn_function(const uschar *); +extern uschar * string_copy_taint_function(const uschar *); #endif /* End of local_scan.h */