From: Nick Kew Date: Fri, 27 Jan 2006 22:10:38 +0000 (+0000) Subject: Joe's fix to avoid feeding C99 to C++ compilers X-Git-Tag: 2.2.1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e8f01b795880d8a0650486cdbd53c6a802c9f6e;p=thirdparty%2Fapache%2Fhttpd.git Joe's fix to avoid feeding C99 to C++ compilers git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@373005 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 5dc336cfdf6..1a3b8b0505b 100644 --- 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 f0cec1f4f04..adfa84ccd63 100644 --- 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 diff --git a/configure.in b/configure.in index 2a3d1d94a13..52a2630f996 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/include/ap_config.h b/include/ap_config.h index a580e67b499..767c6123ca4 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -252,4 +252,12 @@ #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 */