aboutsummaryrefslogtreecommitdiff
path: root/include/compat/syslog.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/compat/syslog.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/compat/syslog.h b/include/compat/syslog.h
new file mode 100644
index 0000000..f400ff6
--- /dev/null
+++ b/include/compat/syslog.h
@@ -0,0 +1,37 @@
1/*
2 * Public domain
3 * syslog.h compatibility shim
4 */
5
6#ifndef _WIN32
7#include_next <syslog.h>
8#endif
9
10#ifndef LIBCRYPTOCOMPAT_SYSLOG_H
11#define LIBCRYPTOCOMPAT_SYSLOG_H
12
13#ifndef HAVE_SYSLOG_R
14
15#include <stdarg.h>
16
17#ifdef _WIN32
18#define LOG_INFO 6 /* informational */
19#define LOG_USER (1<<3) /* random user-level messages */
20#define LOG_LOCAL2 (18<<3) /* reserved for local use */
21#endif
22
23struct syslog_data {
24 int log_stat;
25 const char *log_tag;
26 int log_fac;
27 int log_mask;
28};
29
30#define SYSLOG_DATA_INIT {0, (const char *)0, LOG_USER, 0xff}
31
32void syslog_r(int, struct syslog_data *, const char *, ...);
33void vsyslog_r(int, struct syslog_data *, const char *, va_list);
34
35#endif
36
37#endif