Re: Feature branch launched: deheader

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 06 Dec 2010 02:59:11 +0000

On Sun, 5 Dec 2010 15:28:00 +0100, Kinkie <gkinkie_at_gmail.com> wrote:
> Hi all,
> Eric Raymond recently released a tool named deheader
> (http://www.catb.org/esr/deheader/) which goes through c/c++ project
> looking for unneeded includes.
> It does so by trying to compile each source file after removing one
> #include statement at a time, and seeing if it builds.
> I tried it on squid, and the result was unexpected: it seems that the
> c++ sources for squid contain up to 915 unneeded #include directives
> (on an Ubuntu box, with all build options enabled).
>
> The estimate is of course not realistic, as it can't account for other
> platforms or feature-includes, but it is still worth a check IMVHO.
> I've opened a feature-branch for the purpose at
> lp:~kinkie/squid/deheader with a first round of de-headerization.
>
> Thoughts? Comments?

Auditing your "first batch" commit...

 Disconnecting .cc from squid.h is fine under the current content of that
file. However when it is removed config.h always needs to be added in its
place. You will get false success results if they are both missing.
Particularly in the optional code as they are the only source of USE_* and
HAVE_* definition.

Amos
Received on Mon Dec 06 2010 - 02:59:16 MST

This archive was generated by hypermail 2.2.0 : Mon Dec 06 2010 - 12:00:05 MST