collectdctl: Reorder includes and set strict C99/POSIX mode.
[collectd.git] / src / collectdctl.c
index fe11881..bb7cfca 100644 (file)
  *   Sebastian "tokkee" Harl <sh@tokkee.org>
  **/
 
+#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
+
 #if HAVE_CONFIG_H
 # include "config.h"
 #endif
 
-#include "libcollectdclient/client.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <strings.h>
 
 #include <assert.h>
-
 #include <errno.h>
-
-#include <getopt.h>
-
 #include <math.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "libcollectdclient/client.h"
 
-#include <unistd.h>
 
 #define DEFAULT_SOCK LOCALSTATEDIR"/run/"PACKAGE_NAME"-unixsock"