#endif
extern dns_address *dns_address_from_rr(dns_answer *, dns_record *);
extern int dns_basic_lookup(dns_answer *, const uschar *, int);
-extern void dns_build_reverse(const uschar *, uschar *);
-extern time_t dns_expire_from_soa(dns_answer *);
+extern uschar *dns_build_reverse(const uschar *);
+extern time_t dns_expire_from_soa(dns_answer *, int);
extern void dns_init(BOOL, BOOL, BOOL);
extern BOOL dns_is_aa(const dns_answer *);
extern BOOL dns_is_secure(const dns_answer *);
#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);
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);
#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,
if (diff->tv_sec >= 5 || !LOGGING(millisec))
return readconf_printtime((int)diff->tv_sec);
-sprintf(CS buf, "%u.%03us", (uint)diff->tv_sec, (uint)diff->tv_usec/1000);
+snprintf(CS buf, sizeof(buf), "%u.%03us", (uint)diff->tv_sec, (uint)diff->tv_usec/1000);
return buf;
}