Cleanup some defines and includes.
authorcampbellsean@google.com <campbellsean@google.com>
Fri, 6 Oct 2017 17:47:45 +0000 (13:47 -0400)
committercampbellsean@google.com <campbellsean@google.com>
Fri, 6 Oct 2017 17:47:45 +0000 (13:47 -0400)
src/daemon/collectd.h
src/daemon/globals.c
src/daemon/globals.h
src/daemon/plugin.h

index 2231195..0558aa4 100644 (file)
 #include <sys/param.h>
 #endif
 
-#if HAVE_KSTAT_H
-#include <kstat.h>
-#endif
-
 #ifndef PACKAGE_NAME
 #define PACKAGE_NAME "collectd"
 #endif
index bde7eb2..b720cd8 100644 (file)
 
 #include "common.h"
 #include "globals.h"
-#include "plugin.h"
 
 void hostname_set(char const *hostname) {
   sstrncpy(hostname_g, hostname, sizeof(hostname_g));
 }
 
+/*
+ * Global variables
+ */
 char *hostname_g;
 cdtime_t interval_g;
-int  pidfile_from_cli = 0;
 int  timeout_g;
-#if HAVE_LIBKSTAT
 kstat_ctl_t *kc;
-#endif /* HAVE_LIBKSTAT */
+
index 5870031..b4eb5f6 100644 (file)
 
 #include <inttypes.h>
 
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
+#ifndef DATA_MAX_NAME_LEN
+#define DATA_MAX_NAME_LEN 128
+#endif
+
 /* Type for time as used by "utils_time.h" */
 typedef uint64_t cdtime_t;
 
index 4f877e0..095d662 100644 (file)
 
 #include <pthread.h>
 
-#ifndef DATA_MAX_NAME_LEN
-#define DATA_MAX_NAME_LEN 128
-#endif
-
 #define DS_TYPE_COUNTER 0
 #define DS_TYPE_GAUGE 1
 #define DS_TYPE_DERIVE 2