diff --git a/src/collectdctl.c b/src/collectdctl.c
index f16a70dd94285861bc5d8bac19debfc66a4f74f0..2329285371281e849e5bf82994111912201d2036 100644 (file)
--- a/src/collectdctl.c
+++ b/src/collectdctl.c
# include "config.h"
#endif
# include "config.h"
#endif
-#ifndef _ISOC99_SOURCE
-# define _ISOC99_SOURCE
-#endif
-
-#ifndef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200112L
-#endif
-
-#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 600
-#endif
-
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
#include <errno.h>
#include <assert.h>
#include <errno.h>
-#include <math.h>
-#include "libcollectdclient/collectd/client.h"
+#if NAN_STATIC_DEFAULT
+# include <math.h>
+/* #endif NAN_STATIC_DEFAULT*/
+#elif NAN_STATIC_ISOC
+# ifndef __USE_ISOC99
+# define DISABLE_ISOC99 1
+# define __USE_ISOC99 1
+# endif /* !defined(__USE_ISOC99) */
+# include <math.h>
+# if DISABLE_ISOC99
+# undef DISABLE_ISOC99
+# undef __USE_ISOC99
+# endif /* DISABLE_ISOC99 */
+/* #endif NAN_STATIC_ISOC */
+#elif NAN_ZERO_ZERO
+# include <math.h>
+# ifdef NAN
+# undef NAN
+# endif
+# define NAN (0.0 / 0.0)
+# ifndef isnan
+# define isnan(f) ((f) != (f))
+# endif /* !defined(isnan) */
+# ifndef isfinite
+# define isfinite(f) (((f) - (f)) == 0.0)
+# endif
+# ifndef isinf
+# define isinf(f) (!isfinite(f) && !isnan(f))
+# endif
+#endif /* NAN_ZERO_ZERO */
+#include "libcollectdclient/collectd/client.h"
#define DEFAULT_SOCK LOCALSTATEDIR"/run/"PACKAGE_NAME"-unixsock"
#define DEFAULT_SOCK LOCALSTATEDIR"/run/"PACKAGE_NAME"-unixsock"
"No error is returned if the specified identifier does not exist.\n"
"\n"PACKAGE" "VERSION", http://collectd.org/\n"
"No error is returned if the specified identifier does not exist.\n"
"\n"PACKAGE" "VERSION", http://collectd.org/\n"
- "by Florian octo Forster <octo@verplant.org>\n"
+ "by Florian octo Forster <octo@collectd.org>\n"
"for contributions see `AUTHORS'\n"
, name);
exit (status);
"for contributions see `AUTHORS'\n"
, name);
exit (status);
while (value != 0) {
char *dot, *endptr;
while (value != 0) {
char *dot, *endptr;
- tmp = strchr (argv[i], (int)':');
+ tmp = strchr (value, (int)':');
if (tmp != NULL) {
*tmp = '\0';
if (tmp != NULL) {
*tmp = '\0';