From cfa53dbc9434dc117e82dbcbbd76b570679af0bf Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 19 Sep 2019 15:50:43 +0000 Subject: [PATCH] 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 --- modules/filters/mod_proxy_html.c | 14 +++++++------- modules/filters/mod_xml2enc.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/filters/mod_proxy_html.c b/modules/filters/mod_proxy_html.c index 0151bf9dd0f..588535b9342 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 -#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 aa1551b18db..667ccc160e2 100644 --- a/modules/filters/mod_xml2enc.c +++ b/modules/filters/mod_xml2enc.c @@ -24,25 +24,25 @@ #include /* 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 -#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" -- 2.47.3