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
On Tue, Mar 7, 2023 at 5:38 AM Amos Jeffries <squ...@treenet.co.nz> wrote: > > Current Policy > < > https://wiki.squid-cache.org/DeveloperResources/SquidCodingGuidelines#file-include-guidelines > >: > " > 4. system C headers (with a .h suffix): > * mandatory HAVE_FOO_H wrapper > " > > > I propose using the C++17 "__has_include(<foo.h>)" instead of HAVE_FOO_H > whenever we can. Which is: > * all .cc and .cci files > * any .h files in the src/ and tools/ areas > > > Pros: > * less configure.ac logic, smaller build logs > * removes need to do a full bootstrap + re-configure when a > third-party library or system header is added/remove/changed > * conversion can be semi-scripted > > Cons AFAIK are all about how it cannot be a blanket requirement like > HAVE_FOO_H is: > * sometimes headers need to be forbidden include by ./configure logic > checks > * C language does not support the __has_include > > > Cheers > Amos > > _______________________________________________ > squid-dev mailing list > squid-dev@lists.squid-cache.org > http://lists.squid-cache.org/listinfo/squid-dev > -- Francesco
_______________________________________________ squid-dev mailing list squid-dev@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-dev