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 
23 struct 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 
32 void syslog_r(int, struct syslog_data *, const char *, ...);
33 void vsyslog_r(int, struct syslog_data *, const char *, va_list);
34 
35 #endif
36 
37 #endif
38