From: Stefan Eissing Date: Tue, 6 Aug 2019 08:22:28 +0000 (+0000) Subject: Merged /httpd/httpd/trunk:r1864435,1864438,1864450-1864451,1864464 from trunk: X-Git-Tag: 2.4.41~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cb888207576ab979d7d9fdda34213971a9ad899;p=thirdparty%2Fapache%2Fhttpd.git Merged /httpd/httpd/trunk:r1864435,1864438,1864450-1864451,1864464 from trunk: *) modules/filters: PR 63633: Fix broken compilation when using old GCC (<4.2.x). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1864469 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 2eb761d8f24..6afb2eff52c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.4.41 + *) modules/filters: PR 63633: Fix broken compilation when using old GCC (<4.2.x). + [Rainer Jung, Joe Orton] + Changes with Apache 2.4.40 *) core, mod_rewrite: Set PCRE_DOTALL by default. Revert via diff --git a/STATUS b/STATUS index b30470a0728..35171a95c0a 100644 --- a/STATUS +++ b/STATUS @@ -128,28 +128,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) modules/filters: PR 63633: Fix broken compilation when using old GCC (<4.2.x). - The above line could be used as CHANGES item. - The GCC flag "-Wno-error=comment" introduced by r1855446 - and r1850745 (backported in r1856931) is only known since GCC 4.2. - Since it gets set unconditionally, this breaks compilation with old GCC - even when not using maintainer mode. - Make the fix for maintainer mode more specific by using - a version dependent pragma in the relevant two C files - only switching off error status for comment warnings. - The original maintainer mode problem seems to happen only - on certain platforms (observed on MacOS) or clang, because I could - not reproduce with GCC on Linux and Solaris. So not fixing the maintainer - mode problem for ancient GCC before 4.6 might be OK. more important is not - to break normal compilation on old platforms. - trunk patch: http://svn.apache.org/r1864435 - http://svn.apache.org/r1864438 - http://svn.apache.org/r1864450 - http://svn.apache.org/r1864451 - http://svn.apache.org/r1864464 - 2.4.x patch: svn merge -c 1864435,1864438,1864450,1864451,1864464 ^/httpd/httpd/trunk . - +1: jorton, rjung, icing - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/filters/config.m4 b/modules/filters/config.m4 index 4723fc403f0..810f0d7e745 100644 --- a/modules/filters/config.m4 +++ b/modules/filters/config.m4 @@ -114,10 +114,6 @@ AC_DEFUN([FIND_LIBXML2], [ if test -n "${xml2_path}" ; then ac_cv_libxml2=yes XML2_INCLUDES="${xml2_path}" - dnl libxml2 includes unicode/*.h files which uses C++ comments - if test "$GCC" = "yes"; then - APR_ADDTO(MOD_CPPFLAGS, ["-Wno-error=comment"]) - fi else ac_cv_libxml2=no fi diff --git a/modules/filters/mod_proxy_html.c b/modules/filters/mod_proxy_html.c index ea6bf03c470..6fb83215355 100644 --- a/modules/filters/mod_proxy_html.c +++ b/modules/filters/mod_proxy_html.c @@ -29,9 +29,28 @@ #define VERBOSEB(x) if (verbose) {x} #endif +/* libxml2 includes unicode/[...].h files which uses C++ comments */ +#if defined(__GNUC__) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wcomment" +#endif +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic warning "-Wcomment" +#endif + /* libxml2 */ #include +#if defined(__GNUC__) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#pragma GCC diagnostic pop +#endif +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + #include "http_protocol.h" #include "http_config.h" #include "http_log.h" diff --git a/modules/filters/mod_xml2enc.c b/modules/filters/mod_xml2enc.c index 05a4e9a9a49..24047b0e989 100644 --- a/modules/filters/mod_xml2enc.c +++ b/modules/filters/mod_xml2enc.c @@ -23,9 +23,28 @@ #include +/* libxml2 includes unicode/[...].h files which uses C++ comments */ +#if defined(__GNUC__) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wcomment" +#endif +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic warning "-Wcomment" +#endif + /* libxml2 */ #include +#if defined(__GNUC__) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#pragma GCC diagnostic pop +#endif +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + #include "http_protocol.h" #include "http_config.h" #include "http_log.h"