More potential cruft

Eric S. Raymond esr at thyrsus.com
Wed Sep 18 10:31:25 UTC 2019


Hal Murray <hmurray at megapathdsl.net>:
> 
> in ntp_debug.h, there is a TPRINT macro.
> 
>  * TPRINT is used where the logger needs to remain even when DEBUG is off.
> 
> TPRINT is not used in ntpd/, DPRINT is not used in libntp/
> 
> I assume the idea is that a library would always be built with debugging built 
> in.  If you used the library, you could provide your own way to adjust debug 
> level.
> 
> This is tangled up with two copies of declcond.h one in ntpd/ and the other in 
> include/
> 
> -------
> 
> There was cleanup in this area a while ago.  I suspect the TPRINT/DPRINT split 
> preserved the old way without understanding why it was needed.
> 
> My vote would be to nuke TPRINT, change all (6.5) references to it to use 
> DPRINT
> and eliminate both copies of declcond.h by moving the one critical line to 
> ntp_debug.h
> (The 0.5 is a comment.)
> 
> This seems like the sort of thing you would have done if you had noticed, but 
> maybe there is something going on that I don't understand yet.

It is exactly the sort of thing that I would have ddone had I noticed it.

> Do you have serious plans to export libntp?  Does it need debugging?  ...

I have no plans to export libntp at all.  I can imagine it needing debugging
in the future, but don't expect it to need  a different debug level tham the
rest of the codebase.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>




More information about the devel mailing list