Re: Question about xrename function

From: Adrian Chadd <adrian@dont-contact.us>
Date: Tue, 1 May 2001 20:48:36 +0800

On Mon, Apr 30, 2001, Alex Rousskov wrote:
> On Mon, 30 Apr 2001, Guido Serassio wrote:
>
> > OK, put it in a separate file.
> >
> > And what about put xrename in debug.c ? I checked Makefile, and
> > tools.o seems to be referenced only from main squid executable, so
> > this must work. I understand that this is a non elegant solution.
>
> Yes, it should work simply because xrename() uses debug.c, rename(2),
> and nothing else. I put xrename in tools.c just because it belongs
> there as a "generally useful tool/function".
>
> I do not know what the "right thing to do" is. I can only offer
> alternatives. Let's hope that somebody from the Squid core team will
> tell you how to proceed.

The solution (to me) is to move the debug code into lib/ .

Have a function pointer in the debug code which is linked into the logging
code for squid, and into say a printf() wrapper by default. This way
different code modules can use debug() ..

The same could be said for quite a bit in tools.c, but I digress..

Adrian

-- 
Adrian Chadd			"Two hundred and thirty-three thousand
<adrian@creative.net.au>	  times the speed of light.
			 	   Dear holy fucking shit."
Received on Tue May 01 2001 - 06:52:08 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:54 MST