diff options
author | Stefan Fritsch <sf@apache.org> | 2012-01-09 13:06:18 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2012-01-09 13:06:18 +0000 |
commit | 75dad9d44fced370f7fe1cc63522654594ed0cc0 (patch) | |
tree | 42ce2fb14d918f301c930ca903da6dc202bd8754 /include/ap_config.h | |
parent | d00d15ac35f404ab163683729638829052a3e716 (diff) | |
download | httpd-75dad9d44fced370f7fe1cc63522654594ed0cc0.tar.gz |
Rename ap_func_attr_* macros to AP_FN_ATTR_*
Add macro for attribute alloc_size on newer gcc's
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1229134 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_config.h')
-rw-r--r-- | include/ap_config.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/ap_config.h b/include/ap_config.h index 4f0500368e..a560817a34 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -223,17 +223,27 @@ #define __has_attribute(x) 0 #endif #if (defined(__GNUC__) && __GNUC__ >= 4) || __has_attribute(sentinel) -#define ap_func_attr_sentinel __attribute__((sentinel)) +#define AP_FN_ATTR_SENTINEL __attribute__((sentinel)) #else -#define ap_func_attr_sentinel +#define AP_FN_ATTR_SENTINEL #endif #if ( defined(__GNUC__) && \ (__GNUC__ >= 4 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4))) \ || __has_attribute(warn_unused_result) -#define ap_func_attr_warn_unused_result __attribute__((warn_unused_result)) +#define AP_FN_ATTR_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -#define ap_func_attr_warn_unused_result +#define AP_FN_ATTR_WARN_UNUSED_RESULT +#endif + +#if ( defined(__GNUC__) && \ + (__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)) \ + || __has_attribute(alloc_size) +#define AP_FN_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) +#define AP_FN_ATTR_ALLOC_SIZE2(x,y) __attribute__((alloc_size(x,y))) +#else +#define AP_FN_ATTR_ALLOC_SIZE(x) +#define AP_FN_ATTR_ALLOC_SIZE2(x,y) #endif #endif /* AP_CONFIG_H */ |