]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Joe's fix to avoid feeding C99 to C++ compilers
authorNick Kew <niq@apache.org>
Fri, 27 Jan 2006 22:10:38 +0000 (22:10 +0000)
committerNick Kew <niq@apache.org>
Fri, 27 Jan 2006 22:10:38 +0000 (22:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@373005 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
configure.in
include/ap_config.h

diff --git a/CHANGES b/CHANGES
index 5dc336cfdf6f7b6ff499cea22a0f973cb3ca7f5a..1a3b8b0505bbd7a4355edc5f65b51b982f5b27b7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.1
 
+  *) Fix to avoid feeding C99 to C++ compilers [Joe Orton]
+
   *) SECURITY: CVE-2005-3357 (cve.mitre.org)
      mod_ssl: Fix a possible crash during access control checks if a
      non-SSL request is processed for an SSL vhost (such as the
diff --git a/STATUS b/STATUS
index f0cec1f4f04e06d0e787942cc622417a3bc3fa52..adfa84ccd63e619801077c091b605f10acec58bb 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -95,12 +95,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
       Message-ID: <4395A056.2070000@web.turner.com>
       +1: jerenkrantz, jim, wrowe
 
-    * Fix for AP_HAVE_DESIGNATED_INITIALIZER vs C++ compilers
-         http://svn.apache.org/viewcvs?rev=356234&view=rev
-       + http://svn.apache.org/viewcvs?rev=356248&view=rev
-       = http://people.apache.org/~jorton/httpd-2.2.0-cppheader.patch
-      +1: jorton, wrowe, niq
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
 
     * mod_dbd: When threaded, create a private pool in child_init
index 2a3d1d94a13a46539dc1d8ccaa814320276bcc9a..52a2630f9966afa0e44c121bdaf6552bfee4ef7c 100644 (file)
@@ -360,10 +360,6 @@ AC_HEADER_SYS_WAIT
 dnl ## Check for typedefs, structures, and compiler characteristics.
 
 AC_C_CONST
-if test "x$GCC" = "xyes"; then
-  AC_DEFINE([AP_HAVE_DESIGNATED_INITIALIZER], 1,
-            [Define if the compiler supports designated initializers])
-fi
 
 dnl ## Check for library functions
 AC_SEARCH_LIBS(sqrt, m)
index a580e67b4995a5126583d17b854a70f6f85f8359..767c6123ca4be8b2a69c80b894e6c57e2f546233 100644 (file)
 #define AP_HAVE_RELIABLE_PIPED_LOGS TRUE
 #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)
+#define AP_HAVE_DESIGNATED_INITIALIZER
+#endif
+
 #endif /* AP_CONFIG_H */