On 11/06/2010 07:49 PM, Amos Jeffries wrote:
> We currently have a policy that config.h MUST be included first so as to
> pull in the portability definitions early. It MAY be included via the
> legacy squid.h at present.
>
> This alteration to the source maintenance script validates that each .c
> and .cc file in the sources includes config.h or squid.h first in its
> include order.
>
> * an ERROR: line is produces for each violating file
> * as yet the maintenance run is not blocked so as to catch as many
> errors as possible in one run.
> * as yet there are no related code alterations performed by this script.
> It only validates.
> * trace FORMAT: informative lines are silenced to make ERROR: more visible.
>
> Unless there are objections I'll commit immediately.
>
> (see other Cleanup patch for fixes of the problems this already detects).
I think this check is too restrictive. As we discussed on a
#include-order related thread, it should be OK to not include config.h
or squid.h at all, as long as some other Squid header is included first.
This "either config.h or another Squid header" rule should prevent the
same kind of problems with less ink and fewer CPU build cycles.
Alex.
Received on Mon Nov 08 2010 - 21:21:35 MST
This archive was generated by hypermail 2.2.0 : Tue Nov 09 2010 - 12:00:04 MST