Alex Rousskov wrote:
On Sun, 2008-03-09 at 22:23 +0100, Henrik Nordstrom wrote:

Or we could consider squid.h the dirty one, moving out the little
tweaks which is there to config.h or better places.

IMO, at the end of the cleanup, "squid.h" should be the file that all
sources are guaranteed to include first simply because it is called
squid.h. Config.h has, by name, a much narrower scope.

I realize that this is subjective and that very few people care about
things like that in Squid so if, for whatever reason, Amos wants to
remove squid.h from most files and leave config.h instead, I am not
going to object since I am not the person doing the cleanup leg work,
and since the functional effect will be the same.

The little tweaks that are not global in nature should be moved out to
specific headers and wrappers, of course. The
guaranteed-to-be-included-first.h file should eventually be almost
empty. Its primary value is the guarantee itself, which becomes a useful
tool for [usually temporary] hacks.

With the testheaders.sh every .h now has guaranteed-to-be-included-at-earliest-actual-need.

This has the side-effect of giving config.h a guaranteed-to-be-included due to most .h or .cc files using #if HAVE... syntax to system includes. Even if its not included explicitly in the local .h

The hacks should be localized to the object(s) they are hacking anyway and not affect the entire Squid + sub-programs + linked-programs + helpers + unit-tests + tools.

If they do you would be:
  - hacking a system include
       (which requires config.h for the wrapping!)
  - hacking an objects behaviour
       (which gets linked/included everywhere its used anyway!)

Amos
--
Please use Squid 2.6STABLE17+ or 3.0STABLE1+
There are serious security advisories out on all earlier releases.

Reply via email to