Code

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 223119504be740141fd9a27850148f58bac93f10..0558aa400696183a42e9bac546b56e73e019656c 100644 (file)
 #include <sys/param.h>
 #endif
 
-#if HAVE_KSTAT_H
-#include <kstat.h>
-#endif
-
 #ifndef PACKAGE_NAME
 #define PACKAGE_NAME "collectd"
 #endif
index bde7eb222cd58654c85b257329029a2b1676d2e7..b720cd88e5b8c59ca806cb5e2454c783b8fb7575 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 58700316343e4142f9d29ddc2755b1239793e503..b4eb5f6fefdd1637fed75791d7b40f1bbeae3faf 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 4f877e0ecb2f3407b8e475f99768facc12df03da..095d662f0b83a35eb800b295782132a7a234b9d6 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