From: Florian Forster Date: Sat, 25 Apr 2009 22:33:09 +0000 (+0200) Subject: Add _XOPEN_SOURCE=600 to all .c files with standards compliance defines. X-Git-Tag: collectd-4.7.0~26 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7e13312699a59f246ddb90078ccf8bb46963cb6a;p=collectd.git Add _XOPEN_SOURCE=600 to all .c files with standards compliance defines. This should hopefully give us strerror_r and strdup and similar neat functions. --- diff --git a/src/filter_chain.c b/src/filter_chain.c index 01688ee2..713a3548 100644 --- a/src/filter_chain.c +++ b/src/filter_chain.c @@ -36,13 +36,10 @@ #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 +#define _XOPEN_SOURCE 600 #ifndef _REENTRANT # define _REENTRANT diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index f62994c6..1c67ab72 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -29,6 +29,9 @@ #ifndef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200112L #endif +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 600 +#endif #ifndef _REENTRANT # define _REENTRANT #endif diff --git a/src/meta_data.c b/src/meta_data.c index 1412f7ef..0c0d8dba 100644 --- a/src/meta_data.c +++ b/src/meta_data.c @@ -36,13 +36,10 @@ #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 +#define _XOPEN_SOURCE 600 #ifndef _REENTRANT # define _REENTRANT diff --git a/src/target_notification.c b/src/target_notification.c index 9ee1518a..2c92652a 100644 --- a/src/target_notification.c +++ b/src/target_notification.c @@ -36,13 +36,10 @@ #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 +#define _XOPEN_SOURCE 600 #ifndef _REENTRANT # define _REENTRANT diff --git a/src/target_replace.c b/src/target_replace.c index 3f983c86..8502c9d0 100644 --- a/src/target_replace.c +++ b/src/target_replace.c @@ -36,13 +36,10 @@ #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 +#define _XOPEN_SOURCE 600 #ifndef _REENTRANT # define _REENTRANT diff --git a/src/target_set.c b/src/target_set.c index 19ff7b92..61b50b64 100644 --- a/src/target_set.c +++ b/src/target_set.c @@ -36,13 +36,10 @@ #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 +#define _XOPEN_SOURCE 600 #ifndef _REENTRANT # define _REENTRANT diff --git a/src/utils_match.h b/src/utils_match.h index a39c8694..a32a6fe0 100644 --- a/src/utils_match.h +++ b/src/utils_match.h @@ -133,7 +133,7 @@ int match_apply (cu_match_t *obj, const char *str); * * DESCRIPTION * Returns the pointer passed to `match_create_callback' or a pointer to the - * `cu_match_value_t' structure allocated by `match_create_callback'. + * `cu_match_value_t' structure allocated by `match_create_simple'. */ void *match_get_user_data (cu_match_t *obj);