#include "wrapper.h"
#if defined(_MSC_VER) && _MSC_VER < 1900
int RS_vsnprintf_va_copy(
char *buffer,
size_t count,
const char *format,
va_list args)
{
int result = -1;
if (count)
{
va_list args_copied;
va_copy(args_copied, args);
result = _vsnprintf_s(buffer, count, _TRUNCATE, format, args_copied);
}
if (result < 0)
{
va_list args_copied;
va_copy(args_copied, args);
result = _vscprintf(format, args_copied);
}
return result;
}
#else
int RS_vsnprintf_va_copy(
char *buffer,
size_t count,
const char *format,
va_list args)
{
va_list args_copied;
va_copy(args_copied, args);
int result = vsnprintf(buffer, count, format, args_copied);
return result;
}
#endif
void RS_vsnprintf_va_end(va_list args)
{
va_end(args);
}
const void *const RS_UA_EMPTY_ARRAY_SENTINEL = UA_EMPTY_ARRAY_SENTINEL;