Although this code is in contrib/ there is no active upstream. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36047
31 lines
738 B
C
31 lines
738 B
C
/*
|
|
* vsyslog() for sites without. In order to enable this code, build with
|
|
* -Dvsyslog=myvsyslog. We use a different name so that no accidents will
|
|
* happen when vsyslog() exists. On systems with vsyslog(), syslog() is
|
|
* typically implemented in terms of vsyslog().
|
|
*
|
|
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
|
*/
|
|
|
|
#ifndef lint
|
|
static char sccsid[] = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
|
|
#endif
|
|
|
|
#ifdef vsyslog
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "tcpd.h"
|
|
#include "mystdarg.h"
|
|
|
|
myvsyslog(int severity, char *format, va_list ap)
|
|
{
|
|
char fbuf[BUFSIZ];
|
|
char obuf[3 * STRING_LENGTH];
|
|
|
|
vsprintf(obuf, percent_m(fbuf, format), ap);
|
|
syslog(severity, "%s", obuf);
|
|
}
|
|
|
|
#endif
|