]> granicus.if.org Git - apache/commitdiff
Merge r1292043:
authorStefan Fritsch <sf@apache.org>
Mon, 27 Feb 2012 14:03:31 +0000 (14:03 +0000)
committerStefan Fritsch <sf@apache.org>
Mon, 27 Feb 2012 14:03:31 +0000 (14:03 +0000)
Add AP_HAVE_C99 to make correct check for C99 less onerous
Using __STDC_VERSION__ without checking if it is defined causes warnings
on C89.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1294162 13f79535-47bb-0310-9956-ffa450edef68

STATUS
include/ap_config.h
include/ap_mmn.h
include/http_log.h

diff --git a/STATUS b/STATUS
index c2455fa65d284675fe00e45b787eb857f6d056e7..27afbe8ec4ca612bc466fc5672345a102415f93f 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -88,13 +88,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * Add AP_HAVE_C99 to make correct check for C99 less onerous
-    Using __STDC_VERSION__ without checking if it is defined causes warnings
-    on C89.
-    Trunk patches: http://svn.apache.org/viewvc?view=revision&revision=1292043
-    2.4.x patch: http://people.apache.org/~sf/AP_HAVE_C99.diff
-    +1: sf, minfrin, trawick
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index b65b75157b5b263ccf561b9afe9fdcba1d3ff55c..944b16afe9a1a3e4ddc597649a0734ffdb161cbe 100644 (file)
 #define AP_HAVE_RELIABLE_PIPED_LOGS TRUE
 #endif
 
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define AP_HAVE_C99
+#endif
+
 /* Presume that the compiler supports C99-style designated
  * initializers if using GCC (but not G++), or for any other compiler
  * which claims C99 support. */
-#if (defined(__GNUC__) && !defined(__cplusplus))                \
-     || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+#if (defined(__GNUC__) && !defined(__cplusplus)) || defined(AP_HAVE_C99)
 #define AP_HAVE_DESIGNATED_INITIALIZER
 #endif
 
index 31bfbc4e07599f4b75a0708ca4a2f650a3143c08..96eb3837967b858c2beec44fd89e84514c06b933 100644 (file)
  *                         move core_net rec definition to http_core.h;
  *                         add insert_network_bucket hook, AP_DECLINED
  * 20120211.0 (2.4.1-dev)  Change re_nsub in ap_regex_t from apr_size_t to int.
+ * 20120211.1 (2.4.2)      Add AP_HAVE_C99
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20120211
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 0                   /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 1                   /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
index 66ed59ca7d95fbc8206c90991fa23fea05e98f1a..922500f1e16c9c7f01044aacab9e681c13baef6e 100644 (file)
@@ -358,7 +358,7 @@ AP_DECLARE(void) ap_log_error(const char *file, int line, int module_index,
                               int level, apr_status_t status,
                               const server_rec *s, const char *fmt, ...);
 #else
-#if __STDC_VERSION__ >= 199901L
+#ifdef AP_HAVE_C99
 /* need additional step to expand APLOG_MARK first */
 #define ap_log_error(...) ap_log_error__(__VA_ARGS__)
 /* need server_rec *sr = ... for the case if s is verbatim NULL */
@@ -401,7 +401,7 @@ AP_DECLARE(void) ap_log_perror(const char *file, int line, int module_index,
                                int level, apr_status_t status, apr_pool_t *p,
                                const char *fmt, ...);
 #else
-#if __STDC_VERSION__ >= 199901L && defined(APLOG_MAX_LOGLEVEL)
+#if defined(AP_HAVE_C99) && defined(APLOG_MAX_LOGLEVEL)
 /* need additional step to expand APLOG_MARK first */
 #define ap_log_perror(...) ap_log_perror__(__VA_ARGS__)
 #define ap_log_perror__(file, line, mi, level, status, p, ...)            \
@@ -443,7 +443,7 @@ AP_DECLARE(void) ap_log_rerror(const char *file, int line, int module_index,
                                int level, apr_status_t status,
                                const request_rec *r, const char *fmt, ...);
 #else
-#if __STDC_VERSION__ >= 199901L
+#ifdef AP_HAVE_C99
 /* need additional step to expand APLOG_MARK first */
 #define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
 #define ap_log_rerror__(file, line, mi, level, status, r, ...)              \
@@ -487,7 +487,7 @@ AP_DECLARE(void) ap_log_cerror(const char *file, int line, int module_index,
                                int level, apr_status_t status,
                                const conn_rec *c, const char *fmt, ...);
 #else
-#if __STDC_VERSION__ >= 199901L
+#ifdef AP_HAVE_C99
 /* need additional step to expand APLOG_MARK first */
 #define ap_log_cerror(...) ap_log_cerror__(__VA_ARGS__)
 #define ap_log_cerror__(file, line, mi, level, status, c, ...)              \
@@ -534,7 +534,7 @@ AP_DECLARE(void) ap_log_cserror(const char *file, int line, int module_index,
                                 const conn_rec *c, const server_rec *s,
                                 const char *fmt, ...);
 #else
-#if __STDC_VERSION__ >= 199901L
+#ifdef AP_HAVE_C99
 /* need additional step to expand APLOG_MARK first */
 #define ap_log_cserror(...) ap_log_cserror__(__VA_ARGS__)
 #define ap_log_cserror__(file, line, mi, level, status, c, s, ...)  \