[squid-dev] src/forward.h

Alex Rousskov rousskov at measurement-factory.com
Tue Jun 20 14:58:57 UTC 2017


On 06/20/2017 03:39 AM, Amos Jeffries wrote:
> On 20/06/17 21:06, Christos Tsantilas wrote:
>> Στις 20/06/2017 01:59 πμ, ο Alex Rousskov έγραψε:
>>>> revno: 15212
>>>> committer: Amos Jeffries <squid3 at treenet.co.nz>
>>>> branch nick: 5
>>>> timestamp: Tue 2017-06-20 01:53:03 +1200
>>>> message:
>>>>    Fix build errors with automake after rev.15194
>>>>       We cannot name files in src/ the same as files in
>>>> sub-directories due to
>>>>    certain automake still implicitly using -I. for search paths.
>>>
>>>
>>> Aggregating frequently used forward declarations for src/ code is a good
>>> idea IMO. If we cannot use a src/forward.h name, then we should use
>>> another name to implement that idea (rather than to kill the idea
>>> itself). I can suggest:
>>>
>>> 1. src/fwd.h (sufficient but should not be replicated to other dirs)
>>> 2. src/forward_.h (emphasizes that we are working around a problem)
>>> 3. src/src_fwd.h (lowers the chance of replication in other dirs)
>>
>> We can use the $topdir/include/forward.h
> 
> Nope.

Agreed. src/ names should not be visible in ../src/include/


> For the general case of all src/*.h definitions having some code
> duplication on the pre-defines is not too terrible.

I am surprised you prefer "not too terrible" to "good", but I have no
time to fight for this improvement.


> FYI: Now that the build is working consistently again I am testing
> whether MasterXaction can be moved into libbase, which was defined as
> being the subdir for these type of widespread things without a clear
> component.

Please do not move MasterXaction to src/base/. The base directory should
not contain things that know too much about high-level Squid code.

Alex.


More information about the squid-dev mailing list