diff options
-rw-r--r-- | hugin.c | 4 | ||||
-rw-r--r-- | hugin.h | 14 | ||||
-rw-r--r-- | hugin_syslog.c | 4 | ||||
-rw-r--r-- | hugin_syslog.h | 4 |
4 files changed, 26 insertions, 0 deletions
@@ -27,6 +27,8 @@ */ #include "hugin.h" +#ifndef DISABLE_HUGIN + #include <stdio.h> #include <stdarg.h> #include <time.h> @@ -382,3 +384,5 @@ done: return result; } + +#endif/*DISABLE_HUGIN*/ @@ -28,6 +28,18 @@ #ifndef __HUGIN_HUGIN_H__ #define __HUGIN_HUGIN_H__ +#ifdef DISABLE_HUGIN + +#define ERR(ch, fmt...) +#define WARN(ch, fmt...) +#define INFO(ch, fmt...) +#define DEBUG(ch, fmt...) +typedef int hug_status_t; +#define hug_init(...) 0 +#define hug_close() + +#else/*DISABLE_HUGIN*/ + enum HUG_FLAG { // Features #ifdef WITH_HUG_THREAD @@ -166,4 +178,6 @@ int __debug(const char *func, const int line, enum __debug_class cl, #define INFO(ch, fmt...) __DEBUG(_info, ch, fmt) #define DEBUG(ch, fmt...) __DEBUG(_debug, ch, fmt) +#endif/*DISABLE_HUGIN*/ + #endif/*__HUGIN_HUGIN_H__*/ diff --git a/hugin_syslog.c b/hugin_syslog.c index 44c0f19..81a852f 100644 --- a/hugin_syslog.c +++ b/hugin_syslog.c @@ -27,6 +27,8 @@ */ #include "hugin_syslog.h" +#ifndef DISABLE_HUGIN + #include <stdio.h> #include <string.h> #include <time.h> @@ -272,6 +274,8 @@ void hug_syslog_close() { #endif } +#endif/*DISABLE_HUGIN*/ + #ifdef TEST_HUGIN_SYSLOG //Additional dependency files //deps: diff --git a/hugin_syslog.h b/hugin_syslog.h index c3c05fd..b5e8b04 100644 --- a/hugin_syslog.h +++ b/hugin_syslog.h @@ -28,10 +28,14 @@ #ifndef __HUGIN_HUGIN_SYSLOG_H__ #define __HUGIN_HUGIN_SYSLOG_H__ +#ifndef DISABLE_HUGIN + void hug_syslog_init(const char* host, int port); void hug_syslog_output(char* msg); void hug_syslog_close(); +#endif/*DISABLE_HUGIN*/ + #endif/*__HUGIN_HUGIN_SYSLOG_H__*/ |