]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merged /httpd/httpd/trunk:r1864435,1864438,1864450-1864451,1864464 from trunk:
authorStefan Eissing <icing@apache.org>
Tue, 6 Aug 2019 08:22:28 +0000 (08:22 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 6 Aug 2019 08:22:28 +0000 (08:22 +0000)
  *) 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

CHANGES
STATUS
modules/filters/config.m4
modules/filters/mod_proxy_html.c
modules/filters/mod_xml2enc.c

diff --git a/CHANGES b/CHANGES
index 2eb761d8f24f517ea4c67db6dab3eb804c7b7677..6afb2eff52c88427d3b324164eb32096a50abcc5 100644 (file)
--- 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 b30470a0728573862a38be5e5b963dbd7d693155..35171a95c0afdfa9d6f7e37e111881ff729a5a67 100644 (file)
--- 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 ]
index 4723fc403f06288b2299fcbcc34bbbc8b80d6b47..810f0d7e7456f552eaea22562b92e74872881099 100644 (file)
@@ -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
index ea6bf03c4704e269760b44a04f85414515e9926e..6fb832153551afba16125ef0bc62bb6db05f2d1d 100644 (file)
 #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 <libxml/HTMLparser.h>
 
+#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"
index 05a4e9a9a4901a2b26e7e4667123391ec9feba57..24047b0e989d0581e7be355e31708c46419dd0d6 100644 (file)
 
 #include <ctype.h>
 
+/* 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 <libxml/encoding.h>
 
+#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"