144743Smarkm /*
244743Smarkm  * vsyslog() for sites without. In order to enable this code, build with
344743Smarkm  * -Dvsyslog=myvsyslog. We use a different name so that no accidents will
444743Smarkm  * happen when vsyslog() exists. On systems with vsyslog(), syslog() is
544743Smarkm  * typically implemented in terms of vsyslog().
644743Smarkm  *
744743Smarkm  * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
844743Smarkm  */
944743Smarkm
1044743Smarkm#ifndef lint
1144743Smarkmstatic char sccsid[] = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
1244743Smarkm#endif
1344743Smarkm
1444743Smarkm#ifdef vsyslog
1544743Smarkm
1644743Smarkm#include <stdio.h>
1744743Smarkm
1844743Smarkm#include "tcpd.h"
1944743Smarkm#include "mystdarg.h"
2044743Smarkm
2144743Smarkmmyvsyslog(severity, format, ap)
2244743Smarkmint     severity;
2344743Smarkmchar   *format;
2444743Smarkmva_list ap;
2544743Smarkm{
2644743Smarkm    char    fbuf[BUFSIZ];
2744743Smarkm    char    obuf[3 * STRING_LENGTH];
2844743Smarkm
2944743Smarkm    vsprintf(obuf, percent_m(fbuf, format), ap);
3044743Smarkm    syslog(severity, "%s", obuf);
3144743Smarkm}
3244743Smarkm
3344743Smarkm#endif
34