hier.7: Document some recently added directories.
[dragonfly.git] / contrib / tcp_wrappers / myvsyslog.c
blobf46ad8051efd6c4c823944c6e9fcdaeee181a4db
1 /*
2 * vsyslog() for sites without. In order to enable this code, build with
3 * -Dvsyslog=myvsyslog. We use a different name so that no accidents will
4 * happen when vsyslog() exists. On systems with vsyslog(), syslog() is
5 * typically implemented in terms of vsyslog().
6 *
7 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
8 */
10 #ifndef lint
11 static char sccsid[] = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
12 #endif
14 #ifdef vsyslog
16 #include <stdarg.h>
17 #include <stdio.h>
19 #include "tcpd.h"
21 extern char *percent_m();
23 myvsyslog(severity, format, ap)
24 int severity;
25 char *format;
26 va_list ap;
28 char fbuf[BUFSIZ];
29 char obuf[3 * STRING_LENGTH];
31 vsprintf(obuf, percent_m(fbuf, format), ap);
32 syslog(severity, "%s", obuf);
35 #endif