mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-15 09:09:58 +08:00
8960e1bc83
"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>
27 lines
380 B
C
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
|