summaryrefslogtreecommitdiff
path: root/modules/filters
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2019-09-19 15:50:43 +0000
committerJim Jagielski <jim@apache.org>2019-09-19 15:50:43 +0000
commitcfa53dbc9434dc117e82dbcbbd76b570679af0bf (patch)
treedbc5eaad9f1187f6daaf92fc32af0d1ad18e8f03 /modules/filters
parentbd3988c073e545091d5cb454e7c838e93d26bed5 (diff)
downloadhttpd-cfa53dbc9434dc117e82dbcbbd76b570679af0bf.tar.gz
Reverse the order of the test... if clang, then use clang, because some clangs also represent as GNUC.
This fixes breaking the macOS builds due to r1864435 under maint-mode git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1867183 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/filters')
-rw-r--r--modules/filters/mod_proxy_html.c14
-rw-r--r--modules/filters/mod_xml2enc.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/modules/filters/mod_proxy_html.c b/modules/filters/mod_proxy_html.c
index 0151bf9dd0..588535b934 100644
--- a/modules/filters/mod_proxy_html.c
+++ b/modules/filters/mod_proxy_html.c
@@ -30,25 +30,25 @@
#endif
/* libxml2 includes unicode/[...].h files which uses C++ comments */
-#if defined(__GNUC__)
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic warning "-Wcomment"
+#elif 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 defined(__clang__)
+#pragma clang diagnostic pop
+#elif 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"
diff --git a/modules/filters/mod_xml2enc.c b/modules/filters/mod_xml2enc.c
index aa1551b18d..667ccc160e 100644
--- a/modules/filters/mod_xml2enc.c
+++ b/modules/filters/mod_xml2enc.c
@@ -24,25 +24,25 @@
#include <ctype.h>
/* libxml2 includes unicode/[...].h files which uses C++ comments */
-#if defined(__GNUC__)
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic warning "-Wcomment"
+#elif 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 defined(__clang__)
+#pragma clang diagnostic pop
+#elif 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"