Code

core: Changed internal API to allow for per-plugin intervals.
[collectd.git] / src / target_replace.c
index 3f983c860b0df520862940aca61c9f9b183cfc82..e0722fffcde92f6f65ec247602bdfbd199cf56f6 100644 (file)
  *   Florian Forster <octo at verplant.org>
  **/
 
-/*
- * First tell the compiler to stick to the C99 and POSIX standards as close as
- * possible.
- */
-#ifndef __STRICT_ANSI__ /* {{{ */
-# define __STRICT_ANSI__
-#endif
-
-#ifndef _ISOC99_SOURCE
-# define _ISOC99_SOURCE
-#endif
-
-#ifdef _POSIX_C_SOURCE
-# undef _POSIX_C_SOURCE
-#endif
-#define _POSIX_C_SOURCE 200112L
-
-#if 0
-/* Single UNIX needed for strdup. */
-#ifdef _XOPEN_SOURCE
-# undef _XOPEN_SOURCE
-#endif
-#define _XOPEN_SOURCE 500
-#endif
-
-#ifndef _REENTRANT
-# define _REENTRANT
-#endif
-
-#ifndef _THREAD_SAFE
-# define _THREAD_SAFE
-#endif
-
-#ifdef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* }}} */
-
 #include "collectd.h"
 #include "common.h"
 #include "filter_chain.h"
@@ -379,10 +341,12 @@ static int tr_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */
   return (FC_TARGET_CONTINUE);
 } /* }}} int tr_invoke */
 
-void module_register (void)
+void module_register (plugin_loaddata_t *data)
 {
        target_proc_t tproc;
 
+    PLUGIN_INIT_INTERVAL (data);
+
        memset (&tproc, 0, sizeof (tproc));
        tproc.create  = tr_create;
        tproc.destroy = tr_destroy;