Gitweb:
https://git.exim.org/exim.git/commitdiff/276f020fb7d0ce2740e90a749b3a49d0d5f74d3d
Commit: 276f020fb7d0ce2740e90a749b3a49d0d5f74d3d
Parent: 11ce40d8d043155bc87a5f564c9064e06fc4f184
Author: Andreas Metzler <ametzler@???>
AuthorDate: Sat Oct 26 18:06:09 2019 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Sat Oct 26 18:06:58 2019 +0100
Fix local-scan ABI. Bug 2458
---
src/exim_monitor/em_log.c | 5 ++---
src/src/functions.h | 10 ++++++----
src/src/local_scan.h | 8 ++++----
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/exim_monitor/em_log.c b/src/exim_monitor/em_log.c
index 1e1dc7c..348f064 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 3b3a12b..37bca23 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 fb87859..be26322 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 */