You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/06/12 12:40:17 UTC
svn commit: r1134906 - in /httpd/httpd/trunk/include: ap_config.h
http_protocol.h http_request.h util_cookies.h util_filter.h util_script.h
Author: sf
Date: Sun Jun 12 10:40:17 2011
New Revision: 1134906
URL: http://svn.apache.org/viewvc?rev=1134906&view=rev
Log:
Avoid "`sentinel' attribute directive ignored" warning with gcc 3.x
Modified:
httpd/httpd/trunk/include/ap_config.h
httpd/httpd/trunk/include/http_protocol.h
httpd/httpd/trunk/include/http_request.h
httpd/httpd/trunk/include/util_cookies.h
httpd/httpd/trunk/include/util_filter.h
httpd/httpd/trunk/include/util_script.h
Modified: httpd/httpd/trunk/include/ap_config.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_config.h?rev=1134906&r1=1134905&r2=1134906&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_config.h (original)
+++ httpd/httpd/trunk/include/ap_config.h Sun Jun 12 10:40:17 2011
@@ -173,4 +173,13 @@
#define AP_HAVE_DESIGNATED_INITIALIZER
#endif
+#ifndef __has_attribute /* check for supported attributes on clang */
+#define __has_attribute(x) 0
+#endif
+#if (defined(__GNUC__) && __GNUC__ >= 4) || __has_attribute(sentinel)
+#define ap_func_attr_sentinel __attribute__((sentinel))
+#else
+#define ap_func_attr_sentinel
+#endif
+
#endif /* AP_CONFIG_H */
Modified: httpd/httpd/trunk/include/http_protocol.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/http_protocol.h?rev=1134906&r1=1134905&r2=1134906&view=diff
==============================================================================
--- httpd/httpd/trunk/include/http_protocol.h (original)
+++ httpd/httpd/trunk/include/http_protocol.h Sun Jun 12 10:40:17 2011
@@ -346,7 +346,7 @@ static inline int ap_rputs(const char *s
* @return The number of bytes sent
*/
AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...)
- __attribute__((sentinel));
+ ap_func_attr_sentinel;
/**
* Output data to the client in a printf format
Modified: httpd/httpd/trunk/include/http_request.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/http_request.h?rev=1134906&r1=1134905&r2=1134906&view=diff
==============================================================================
--- httpd/httpd/trunk/include/http_request.h (original)
+++ httpd/httpd/trunk/include/http_request.h Sun Jun 12 10:40:17 2011
@@ -285,7 +285,7 @@ AP_DECLARE(void) ap_update_mtime(request
* @return None.
*/
AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...)
- __attribute__((sentinel));
+ ap_func_attr_sentinel;
/**
* Add one or more methods to the list permitted to access the resource.
Modified: httpd/httpd/trunk/include/util_cookies.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/util_cookies.h?rev=1134906&r1=1134905&r2=1134906&view=diff
==============================================================================
--- httpd/httpd/trunk/include/util_cookies.h (original)
+++ httpd/httpd/trunk/include/util_cookies.h Sun Jun 12 10:40:17 2011
@@ -68,7 +68,7 @@ typedef struct {
AP_DECLARE(apr_status_t) ap_cookie_write(request_rec * r, const char *name,
const char *val, const char *attrs,
long maxage, ...)
- __attribute__((sentinel));
+ ap_func_attr_sentinel;
/**
* Write an RFC2965 compliant cookie.
@@ -85,7 +85,7 @@ AP_DECLARE(apr_status_t) ap_cookie_write
AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2,
const char *val, const char *attrs2,
long maxage, ...)
- __attribute__((sentinel));
+ ap_func_attr_sentinel;
/**
* Remove an RFC2109 compliant cookie.
@@ -99,7 +99,7 @@ AP_DECLARE(apr_status_t) ap_cookie_write
*/
AP_DECLARE(apr_status_t) ap_cookie_remove(request_rec * r, const char *name,
const char *attrs, ...)
- __attribute__((sentinel));
+ ap_func_attr_sentinel;
/**
* Remove an RFC2965 compliant cookie.
@@ -113,7 +113,7 @@ AP_DECLARE(apr_status_t) ap_cookie_remov
*/
AP_DECLARE(apr_status_t) ap_cookie_remove2(request_rec * r, const char *name2,
const char *attrs2, ...)
- __attribute__((sentinel));
+ ap_func_attr_sentinel;
/**
* Read a cookie called name, placing its value in val.
Modified: httpd/httpd/trunk/include/util_filter.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/util_filter.h?rev=1134906&r1=1134905&r2=1134906&view=diff
==============================================================================
--- httpd/httpd/trunk/include/util_filter.h (original)
+++ httpd/httpd/trunk/include/util_filter.h Sun Jun 12 10:40:17 2011
@@ -547,10 +547,7 @@ AP_DECLARE(apr_status_t) ap_fflush(ap_fi
AP_DECLARE_NONSTD(apr_status_t) ap_fputstrs(ap_filter_t *f,
apr_bucket_brigade *bb,
...)
-#if defined(__GNUC__) && __GNUC__ >= 4
- __attribute__((sentinel))
-#endif
-;
+ ap_func_attr_sentinel;
/**
* Output data to the filter in printf format
Modified: httpd/httpd/trunk/include/util_script.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/util_script.h?rev=1134906&r1=1134905&r2=1134906&view=diff
==============================================================================
--- httpd/httpd/trunk/include/util_script.h (original)
+++ httpd/httpd/trunk/include/util_script.h Sun Jun 12 10:40:17 2011
@@ -27,6 +27,7 @@
#define APACHE_UTIL_SCRIPT_H
#include "apr_buckets.h"
+#include "ap_config.h"
#ifdef __cplusplus
extern "C" {
@@ -123,7 +124,7 @@ AP_DECLARE_NONSTD(int) ap_scan_script_he
char *buffer,
const char **termch,
int *termarg, ...)
- __attribute__((sentinel));
+ ap_func_attr_sentinel;
/**
* Read headers output from a script, ensuring that the output is valid. If