3 #include "choke-me: no vprintf and no snprintf"
6 #if defined(HAVE_STDARG_H)
9 # define VA_START(a, f) va_start(a, f)
10 # define VA_END(a) va_end(a)
11 # endif /* VA_START */
12 # define SNV_USING_STDARG_H
14 #elif defined(HAVE_VARARGS_H)
17 # define VA_START(a, f) va_start(a)
18 # define VA_END(a) va_end(a)
19 # endif /* VA_START */
20 # undef SNV_USING_STDARG_H
23 # include "must-have-stdarg-or-varargs"
27 snprintf(char *str, size_t n, char const *fmt, ...)
32 #ifdef VSPRINTF_CHARSTAR
35 rp = vsprintf(str, fmt, ap);
41 rval = vsprintf(str, fmt, ap);
46 fprintf(stderr, "snprintf buffer overrun %d > %d\n", rval, (int)n);
53 vsnprintf( char *str, size_t n, char const *fmt, va_list ap )
55 #ifdef VSPRINTF_CHARSTAR
56 return (strlen(vsprintf(str, fmt, ap)));
58 return (vsprintf(str, fmt, ap));