nasm/lib/snprintf.c
H. Peter Anvin fe501957c0 Portability fixes
Concentrate compiler dependencies to compiler.h; make sure compiler.h
is included first in every .c file (since some prototypes may depend
on the presence of feature request macros.)

Actually use the conditional inclusion of various functions (totally
broken in previous releases.)
2007-10-02 21:53:51 -07:00

27 lines
375 B
C

/*
* snprintf()
*
* Implement snprintf() in terms of vsnprintf()
*/
#include "compiler.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "nasmlib.h"
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;
}