Mercurial > notdcc
annotate dcclib/vsyslog.c @ 0:c7f6b056b673
First import of vendor version
author | Peter Gervai <grin@grin.hu> |
---|---|
date | Tue, 10 Mar 2009 13:49:58 +0100 |
parents | |
children |
rev | line source |
---|---|
0 | 1 /* compatibility hack for old systems that don't have vsyslog() */ |
2 | |
3 #include "dcc_config.h" | |
4 | |
5 #include <stdio.h> | |
6 #include <stdarg.h> | |
7 #include <syslog.h> | |
8 | |
9 /* this is not thread safe */ | |
10 void | |
11 dcc_vsyslog(int pri, const char *fmt, va_list args) | |
12 { | |
13 char buf[512]; | |
14 | |
15 vsnprintf(buf, sizeof(buf), fmt, args); | |
16 syslog(pri, "%s", buf); | |
17 } |