diff options
Diffstat (limited to 'include/syslog.h')
-rw-r--r-- | include/syslog.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/syslog.h b/include/syslog.h new file mode 100644 index 0000000..f61e33b --- /dev/null +++ b/include/syslog.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Public domain | ||
3 | * syslog.h compatibility shim | ||
4 | */ | ||
5 | |||
6 | #ifndef LIBCRYPTOCOMPAT_SYSLOG_H | ||
7 | #define LIBCRYPTOCOMPAT_SYSLOG_H | ||
8 | |||
9 | #ifndef _WIN32 | ||
10 | #include_next <syslog.h> | ||
11 | #else | ||
12 | |||
13 | /* priorities */ | ||
14 | #define LOG_EMERG 0 | ||
15 | #define LOG_ALERT 1 | ||
16 | #define LOG_CRIT 2 | ||
17 | #define LOG_ERR 3 | ||
18 | #define LOG_WARNING 4 | ||
19 | #define LOG_NOTICE 5 | ||
20 | #define LOG_INFO 6 | ||
21 | #define LOG_DEBUG 7 | ||
22 | |||
23 | /* facility codes */ | ||
24 | #define LOG_KERN (0<<3) | ||
25 | #define LOG_USER (1<<3) | ||
26 | #define LOG_DAEMON (3<<3) | ||
27 | |||
28 | /* flags for openlog */ | ||
29 | #define LOG_PID 0x01 | ||
30 | #define LOG_CONS 0x02 | ||
31 | |||
32 | extern void openlog(const char *ident, int option, int facility); | ||
33 | extern void syslog(int priority, const char *fmt, ...) | ||
34 | __attribute__ ((__format__ (__printf__, 2, 3))); | ||
35 | extern void closelog (void); | ||
36 | #endif | ||
37 | |||
38 | #endif /* LIBCRYPTOCOMPAT_SYSLOG_H */ | ||