<div dir="ltr">I like this idea; I would also complement it with the directive to use header <cXXXXX> instead of <XXXXX.h> whenever possible - this could also be automatically enforced<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 7, 2023 at 5:38 AM Amos Jeffries <<a href="mailto:squid3@treenet.co.nz">squid3@treenet.co.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Current Policy <br>
<<a href="https://wiki.squid-cache.org/DeveloperResources/SquidCodingGuidelines#file-include-guidelines" rel="noreferrer" target="_blank">https://wiki.squid-cache.org/DeveloperResources/SquidCodingGuidelines#file-include-guidelines</a>>:<br>
"<br>
4. system C headers (with a .h suffix):<br>
* mandatory HAVE_FOO_H wrapper<br>
"<br>
<br>
<br>
I propose using the C++17 "__has_include(<foo.h>)" instead of HAVE_FOO_H <br>
whenever we can. Which is:<br>
* all .cc and .cci files<br>
* any .h files in the src/ and tools/ areas<br>
<br>
<br>
Pros:<br>
* less <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> logic, smaller build logs<br>
* removes need to do a full bootstrap + re-configure when a <br>
third-party library or system header is added/remove/changed<br>
* conversion can be semi-scripted<br>
<br>
Cons AFAIK are all about how it cannot be a blanket requirement like <br>
HAVE_FOO_H is:<br>
* sometimes headers need to be forbidden include by ./configure logic <br>
checks<br>
* C language does not support the __has_include<br>
<br>
<br>
Cheers<br>
Amos<br>
<br>
_______________________________________________<br>
squid-dev mailing list<br>
<a href="mailto:squid-dev@lists.squid-cache.org" target="_blank">squid-dev@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-dev" rel="noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-dev</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"> Francesco</div>