Re: two xasserts in squid3

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Mon, 11 Feb 2008 07:47:13 -0700

On Mon, 2008-02-11 at 10:15 +1300, Amos Jeffries wrote:

> I think a better approach to this would be:
>
> 1) do we actually need it anyway?

Yes, we need a common assert-like macro.

> 2) where is it supposed to be defined?

IMO:

include/xassert.h if xassert is used outside of src/

src/xassert.h otherwise, until we get something like src/base/ or
src/misc for general-purpose commonly used things that do not fit
anywhere else.

> I'm willing to commit time to that if we can agree on the 'old' files
> that need removing and the scope of the remining ones.
> I have seen a few things that made me think squid.h and defines.h may
> need to (merge?) stick around under a better definition of content.

I would welcome such cleanup, especially after we switch to a VCS that
does file renaming.

IMO, there needs to be one header file like squid.h that is guaranteed
to be the first one included by all other source files in src/. That
file should only contain things needed by 99.9% of the code base. This
is usually limited to hacks that change some global system or compiler
effects. The rest should have their own purpose-specific header files.

If the source code needs something used by others, it needs to include
something.h.

There is also a question of whether some lib/ stuff needs to be moved to
src/, but that is a separate debate and we need a better VCS for that as
well.

HTH,

Alex.
Received on Mon Feb 11 2008 - 07:47:23 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST