From 1035840335545f869dfb12ebfd5e5fc0f43c4fa2 Mon Sep 17 00:00:00 2001 From: frekky Date: Sun, 13 Mar 2016 13:43:34 +0800 Subject: [PATCH] Moved windows-specific syslog to windows.h (now macro) --- src/iodined.c | 17 ----------------- src/windows.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/iodined.c b/src/iodined.c index 1bac743..8fadee5 100644 --- a/src/iodined.c +++ b/src/iodined.c @@ -133,23 +133,6 @@ sigint(int sig) server_stop(); } -#ifdef WINDOWS32 -#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 -static void -syslog(int a, const char *str, ...) -{ - /* TODO: implement (add to event log), move to common.c */ - ; -} -#endif - static void print_usage() { extern char *__progname; diff --git a/src/windows.h b/src/windows.h index cb7e399..65fb619 100644 --- a/src/windows.h +++ b/src/windows.h @@ -93,6 +93,19 @@ struct ip struct in_addr ip_src, ip_dst; /* source and dest address */ }; +#ifdef WINDOWS32 +#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 +/* dummy syslog definition to prevent compile errors */ +#define syslog(...) /* TODO: implement (add to event log), move to common.c */ +#endif + /* windows gettimeofday from https://gist.github.com/ugovaretto/5875385 */ #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) #define DELTA_EPOCH_IN_MICROSECS 116444736000000000Ui64