RFC: policy change for header #includes
Amos Jeffries <[email protected]> Tue, 7 Mar 2023 18:38:30 +1300
| Newsgroups | gmane.comp.web.squid.devel |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected] http://lists.squid-cache.org/listinfo/squid-dev