nasm/stdlib/snprintf.c
H. Peter Anvin 8960e1bc83 Remove #includes already provided by "compiler.h"
"compiler.h" already includes a bunch of common include files. There
is absolutely no reason to duplicate them in individual files, and in
fact it robs us of central control of how these files are used.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-12-27 12:45:44 -08:00

27 lines
380 B
C

/*
* snprintf()
*
* Implement snprintf() in terms of vsnprintf()
*/
#include "compiler.h"
#include "nasmlib.h"
#if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF)
int snprintf(char *str, size_t size, const char *format, ...)
{
va_list ap;
int rv;
va_start(ap, format);
rv = vsnprintf(str, size, format, ap);
va_end(ap);
return rv;
}
#endif