"standby clone": basic port complete

This commit is contained in:
Ian Barwick
2017-05-02 14:25:08 +09:00
parent 0a553c309b
commit 00fd8e81f8
9 changed files with 609 additions and 50 deletions

View File

@@ -26,7 +26,7 @@ xvsnprintf(char *str, size_t size, const char *format, va_list ap)
if (retval >= (int) size)
{
log_error(_("buffer of size not large enough to format entire string '%s'"),
log_error(_("buffer of specified size not large enough to format entire string '%s'"),
str);
exit(ERR_STR_OVERFLOW);
}
@@ -61,6 +61,18 @@ maxlen_snprintf(char *str, const char *format,...)
return retval;
}
int
maxpath_snprintf(char *str, const char *format,...)
{
va_list arglist;
int retval;
va_start(arglist, format);
retval = xvsnprintf(str, MAXPGPATH, format, arglist);
va_end(arglist);
return retval;
}
void
append_where_clause(PQExpBufferData *where_clause, const char *format, ...)