Mercurial > notdcc
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dcclib/vsyslog.c Tue Mar 10 13:49:58 2009 +0100 @@ -0,0 +1,17 @@ +/* compatibility hack for old systems that don't have vsyslog() */ + +#include "dcc_config.h" + +#include <stdio.h> +#include <stdarg.h> +#include <syslog.h> + +/* this is not thread safe */ +void +dcc_vsyslog(int pri, const char *fmt, va_list args) +{ + char buf[512]; + + vsnprintf(buf, sizeof(buf), fmt, args); + syslog(pri, "%s", buf); +}