X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcollectd.h;h=c0994d19276e501a1170ed2cfde979c112eece79;hb=178db08806318e0b01de2e7a9261f18d6f7ca72d;hp=957654bc0abcc446fd03c94fdc06b69de27878af;hpb=67e4e517f58dac2a7b0e63b80256231480bfa59d;p=collectd.git diff --git a/src/collectd.h b/src/collectd.h index 957654bc..c0994d19 100644 --- a/src/collectd.h +++ b/src/collectd.h @@ -56,21 +56,6 @@ #if HAVE_STDINT_H # include #endif -#if HAVE_STDBOOL_H -# include -#else -# ifndef HAVE__BOOL -# ifdef __cplusplus -typedef bool _Bool; -# else -# define _Bool signed char -# endif -# endif -# define bool _Bool -# define false 0 -# define true 1 -# define __bool_true_false_are_defined 1 -#endif #if HAVE_UNISTD_H # include #endif @@ -112,6 +97,12 @@ typedef bool _Bool; # define assert(...) /* nop */ #endif +#if !defined(HAVE__BOOL) || !HAVE__BOOL +typedef int _Bool; +# undef HAVE__BOOL +# define HAVE__BOOL 1 +#endif + #if NAN_STATIC_DEFAULT # include /* #endif NAN_STATIC_DEFAULT*/ @@ -227,10 +218,6 @@ typedef bool _Bool; # include #endif -#if HAVE_SENSORS_SENSORS_H -# include -#endif - #ifndef PACKAGE_NAME #define PACKAGE_NAME "collectd" #endif @@ -271,6 +258,10 @@ typedef bool _Bool; # define COLLECTD_GRP_NAME "collectd" #endif +#ifndef COLLECTD_DEFAULT_INTERVAL +# define COLLECTD_DEFAULT_INTERVAL 10.0 +#endif + #define STATIC_ARRAY_LEN(array) (sizeof (array) / sizeof ((array)[0])) /* Remove GNU specific __attribute__ settings when using another compiler */ @@ -298,7 +289,11 @@ typedef bool _Bool; # endif #endif -extern char hostname_g[]; -extern int interval_g; +/* Type for time as used by "utils_time.h" */ +typedef uint64_t cdtime_t; + +extern char hostname_g[]; +extern cdtime_t interval_g; +extern int timeout_g; #endif /* COLLECTD_H */