27 #include <sys/types.h>
34 vsyslog(
int pri,
const char* fmt, va_list ap)
36 char tbuf[2048], fmt_cpy[1024];
41 for (cp = fmt_cpy; c = *fmt; ++fmt) {
42 if (c ==
'%' && fmt[1] ==
'm') {
45 for (dp = strerror(errno); *cp = *dp++; ++cp)
51 (void) vsnprintf(tbuf,
sizeof(tbuf), fmt_cpy, ap);
52 (void) syslog(pri,
"%s", tbuf);