summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de0fdb2)
raw | patch | inline | side by side (parent: de0fdb2)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 4 May 2009 14:46:02 +0000 (16:46 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 4 May 2009 14:46:02 +0000 (16:46 +0200) |
diff --git a/src/bind.c b/src/bind.c
index c0b18323651c719d56edbfc671194731a8901d0e..587403d07727341fcb23e10ae1c9ba92ffa2f0e9 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
* Florian Forster <octo at verplant.org>
**/
-/* Set to C99 and POSIX code */
-#ifndef _ISOC99_SOURCE
-# define _ISOC99_SOURCE
-#endif
-#ifndef _POSIX_SOURCE
-# define _POSIX_SOURCE
-#endif
-#ifndef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200112L
-#endif
-#ifndef _REENTRANT
-# define _REENTRANT
-#endif
-#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 600
-#endif
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
#include "collectd.h"
#include "common.h"
diff --git a/src/collectd-nagios.c b/src/collectd-nagios.c
index 8f4a41054ab55efbf0e79bf4d2a51b3da0e9244e..0c480a06ea90fe5a823bc2d77b31fd1338ccb8c7 100644 (file)
--- a/src/collectd-nagios.c
+++ b/src/collectd-nagios.c
* Florian octo Forster <octo at verplant.org>
**/
-/* Set to C99 and POSIX code */
-#ifndef _ISOC99_SOURCE
-# define _ISOC99_SOURCE
-#endif
-#ifndef _POSIX_SOURCE
-# define _POSIX_SOURCE
-#endif
-#ifndef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200112L
-#endif
-#ifndef _REENTRANT
-# define _REENTRANT
+#if HAVE_CONFIG_H
+# include "config.h"
#endif
-/* Disable non-standard extensions */
-#ifdef _BSD_SOURCE
-# undef _BSD_SOURCE
-#endif
-#ifdef _SVID_SOURCE
-# undef _SVID_SOURCE
-#endif
-#ifdef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
+/* Set to C99 and POSIX code */
+#if COLLECT_STANDARDS
+# include "standards.h"
+#endif /* COLLECT_STANDARDS */
#if !defined(__GNUC__) || !__GNUC__
# define __attribute__(x) /**/
#endif
-#include "config.h"
-
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
diff --git a/src/filter_chain.c b/src/filter_chain.c
index 01688ee2d397b8cb3f1ee14f73bbac560b2d7c46..c777fac1555985e5849d9dba62356b351c2eef8a 100644 (file)
--- a/src/filter_chain.c
+++ b/src/filter_chain.c
* Florian octo 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 "configfile.h"
#include "plugin.h"
index 1c67ab72530f1551769810c6797cda064d36eb3b..134a5c4d52cf012d2c570294e7eb6c59de00f390 100644 (file)
* Florian octo Forster <octo at verplant.org>
**/
-/* Set to C99 and POSIX code */
-#ifndef _ISOC99_SOURCE
-# define _ISOC99_SOURCE
-#endif
-#ifndef _POSIX_SOURCE
-# define _POSIX_SOURCE
-#endif
-#ifndef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200112L
-#endif
-#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 600
-#endif
-#ifndef _REENTRANT
-# define _REENTRANT
+#if HAVE_CONFIG_H
+# include "config.h"
#endif
-/* Disable non-standard extensions */
-#ifdef _BSD_SOURCE
-# undef _BSD_SOURCE
-#endif
-#ifdef _SVID_SOURCE
-# undef _SVID_SOURCE
-#endif
-#ifdef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
+/* Set to C99 and POSIX code */
+#if COLLECT_STANDARDS
+# include "standards.h"
+#endif /* COLLECT_STANDARDS */
#if !defined(__GNUC__) || !__GNUC__
# define __attribute__(x) /**/
#endif
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include "lcc_features.h"
#include <stdlib.h>
diff --git a/src/meta_data.c b/src/meta_data.c
index 1412f7effe92a5369995113959025987fc949994..2c085e39408016fed9c2d7dfa6f32ebfbdfc7901 100644 (file)
--- a/src/meta_data.c
+++ b/src/meta_data.c
* Florian octo 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 "plugin.h"
#include "meta_data.h"
index 9ee1518a09e7791a89ee535a94a7b7da79ffa69b..96598afd76fd53500948e34dda8bf516726e4371 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"
diff --git a/src/target_replace.c b/src/target_replace.c
index 3f983c860b0df520862940aca61c9f9b183cfc82..9a9affb4d3e6ba3841f33f0be7d3d47effade175 100644 (file)
--- a/src/target_replace.c
+++ b/src/target_replace.c
* 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"
diff --git a/src/target_set.c b/src/target_set.c
index 19ff7b92ada29a39a1ed4da799515b0a57b525d1..8a014c3cd50caa156649f6de3093eda7cd7cac77 100644 (file)
--- a/src/target_set.c
+++ b/src/target_set.c
* 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"