From cccdd689e39b51af02b156229e5236a2a69dcdcb Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 19 Nov 2014 07:43:07 -0600 Subject: add minimal winsock->BSD networking header shims also add license header to existing shims --- include/syslog.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 include/syslog.h (limited to 'include/syslog.h') 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 @@ +/* + * Public domain + * syslog.h compatibility shim + */ + +#ifndef LIBCRYPTOCOMPAT_SYSLOG_H +#define LIBCRYPTOCOMPAT_SYSLOG_H + +#ifndef _WIN32 +#include_next +#else + +/* priorities */ +#define LOG_EMERG 0 +#define LOG_ALERT 1 +#define LOG_CRIT 2 +#define LOG_ERR 3 +#define LOG_WARNING 4 +#define LOG_NOTICE 5 +#define LOG_INFO 6 +#define LOG_DEBUG 7 + +/* facility codes */ +#define LOG_KERN (0<<3) +#define LOG_USER (1<<3) +#define LOG_DAEMON (3<<3) + +/* flags for openlog */ +#define LOG_PID 0x01 +#define LOG_CONS 0x02 + +extern void openlog(const char *ident, int option, int facility); +extern void syslog(int priority, const char *fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +extern void closelog (void); +#endif + +#endif /* LIBCRYPTOCOMPAT_SYSLOG_H */ -- cgit v1.2.3-55-g6feb