Gitweb:
https://git.exim.org/exim.git/commitdiff/c4efe382b151f36a90213f8a3e629d4290ea22a8
Commit: c4efe382b151f36a90213f8a3e629d4290ea22a8
Parent: 276f020fb7d0ce2740e90a749b3a49d0d5f74d3d
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Oct 26 19:11:41 2019 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Sat Oct 26 19:11:41 2019 +0100
Revert "Fix local-scan ABI. Bug 2458"
Too many older platforms have compilers do not support __VA_OPT__().
This reverts commit 276f020fb7d0ce2740e90a749b3a49d0d5f74d3d.
---
src/exim_monitor/em_log.c | 5 +++--
src/src/functions.h | 10 ++++------
src/src/local_scan.h | 8 ++++----
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/exim_monitor/em_log.c b/src/exim_monitor/em_log.c
index 348f064..1e1dc7c 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 37bca23..3b3a12b 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 be26322..fb87859 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 */