Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Aug 1995 23:08:29 +0800 (WST)
From:      Peter Wemm <peter@haywire.dialix.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        bde@zeta.org.au, CVS-commiters@freefall.FreeBSD.org, cvs-lib@freefall.FreeBSD.org, pst@freebsd.org
Subject:   Re: cvs commit: src/lib/libc/net gethostbydns.c res_debug.c res_init.c res_mkquery.c res_query.c res_send.c
Message-ID:  <Pine.SV4.3.91.950821221014.25041H-100000@haywire.DIALix.COM>
In-Reply-To: <199508211323.XAA26477@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 Aug 1995, Bruce Evans wrote:
> >Question: should libresolv become a no-op, as it currently does the same
> >thing as libc/net/get* and libc/net/res*;
> 
> I'm not qualified to decide this.  I seem to remember Garrett saying that
> libresolv should go away.  libresolv isn't referenced by any Makefile in
> /usr/src.
>
> >OR:
> >should the libc stuff have the #define DEBUG removed so that the libc
> >version does not have the debugging printf()'s that things like dig(1)
> >need, while libresolv does...  (so dig links with libresolv)
> 
> >I suspect it was working the second way before, in which case I've broken 
> >the distinction between the two libraries..
> 
> I think you actually broke RES_DEBUG.  Previously there was no DEBUG
> flag in libc/net/*, although libresolv/Makefile defines it.  The support
> for RES_DEBUG should continue to to be independent of local debugging
> flags.

Hmm.  It looks like the original 4.4BSD-Lite1 version had #ifdef DEBUG 
code disabled in the libc/net, while having a seperately compiled copy in 
libresolv that had the #ifdef DEBUG code enabled..

Theoretically, the libc/net stuff is faster, because normal code doesn't 
define RES_DEBUG.

I dont think I broke RES_DEBUG in libc, because res_config.h #defined 
DEBUG as committed, and dig was definately working on the resolver in libc.

For things like 'dig' and 'nslookup' where lots of the output actually comes 
from enabling RES_DEBUG, they were linked with -lresolv.

I think that when Paul Traina imported 4.9.3-beta9, he must have disabled 
the distinction between the two libraries.

My thoughts - either:
libresolv goes away, and libc has the extra DEBUG code enabled (adding code 
and data space to libc);
or:
libresolv contains the resolver with RES_DEBUG enabled, and the libc 
resolver does not.

Paul?  Garrett?

> Bruce

Cheers,
-Peter




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.91.950821221014.25041H-100000>