From: Jim Jagielski Date: Thu, 19 Sep 2019 15:50:43 +0000 (+0000) Subject: Reverse the order of the test... if clang, then use clang, because some clangs also... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cfa53dbc9434dc117e82dbcbbd76b570679af0bf;p=apache 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 --- 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 -#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 /* 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"