X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.h;h=89153f9335dddd22ee9667a2ae66f5aedbdcf379;hb=6fe070310d30dfc486bd5b27dc361f1f339aa1ce;hp=7f163bd51e24ee8024db416381301d79df3147cb;hpb=cc0d31d626faaedad019aa9a68bea64cbeefc7e2;p=collectd.git diff --git a/src/collectd.h b/src/collectd.h index 7f163bd5..89153f93 100644 --- a/src/collectd.h +++ b/src/collectd.h @@ -35,8 +35,8 @@ # include #endif #if STDC_HEADERS -#include -#include +# include +# include #else # if HAVE_STDLIB_H # include @@ -95,6 +95,12 @@ # endif #endif +#if HAVE_ASSERT_H +# include +#else +# define assert(...) /* nop */ +#endif + #if HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) @@ -118,6 +124,9 @@ #if HAVE_CTYPE_H # include #endif +#if HAVE_SYS_PARAM_H +# include +#endif #if HAVE_SYSLOG # define syslog(...) syslog(__VA_ARGS__) @@ -137,31 +146,21 @@ # define closelog(...) /**/ #endif -#ifndef HAVE_RRD_H -#undef HAVE_LIBRRD +#if HAVE_KSTAT_H +# include #endif -#ifdef HAVE_LIBRRD -#include -#endif /* HAVE_LIBRRD */ - -/* Won't work without the header file */ -#ifndef HAVE_KSTAT_H -#undef HAVE_LIBKSTAT +#if HAVE_RRD_H +# include #endif - -#ifdef HAVE_LIBKSTAT -#include -#include -#endif /* HAVE_LIBKSTAT */ - -/* Won't work without the header file */ -#ifndef HAVE_STATGRAB_H -#undef HAVE_LIBSTATGRAB +#if HAVE_PTH_H +# include #endif - -#ifdef HAVE_LIBSTATGRAB -#include +#if HAVE_STATGRAB_H +# include +#endif +#if HAVE_SENSORS_SENSORS_H +# include #endif #ifndef PACKAGE_NAME @@ -188,15 +187,24 @@ #define PIDFILE PREFIX "/var/run/" PACKAGE_NAME ".pid" #endif +#ifndef LOGFILE +#define LOGFILE PREFIX"/var/log/"PACKAGE_NAME"/"PACKAGE_NAME".log" +#endif + #ifndef PLUGINDIR #define PLUGINDIR PREFIX "/lib/" PACKAGE_NAME #endif #define MODE_SERVER 0x01 #define MODE_CLIENT 0x02 -#define MODE_LOCAL 0x03 +#define MODE_LOCAL 0x04 extern time_t curtime; + +#ifdef HAVE_LIBRRD extern int operating_mode; +#endif + +/* int main (int argc, char **argv); */ #endif /* COLLECTD_H */