*BSD News Article 93165


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!msunews!news.mtu.edu!newsxfer.itd.umich.edu!newsxfer3.itd.umich.edu!news-peer.sprintlink.net!news-peer.sprintlink.net!news.sprintlink.net!sprint!news-peer.gsl.net!news-hk.gsl.net!news.gsl.net!newsgate.cuhk.edu.hk!news.cuhk.edu.hk!ktso
From: ktso@dcns.csc.cuhk.edu.hk (SO Kwok Tsun)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: 2.2.1 libresolv.a - gethostbyname() always return NULL
Date: 8 Apr 1997 15:23:37 GMT
Organization: The Chinese University of Hong Kong
Lines: 31
Message-ID: <5idntp$aee@hpg30a.csc.cuhk.edu.hk>
References: <5id2rj$75a@hpg30a.csc.cuhk.edu.hk>
Reply-To: ktso@cuhk.edu.hk
NNTP-Posting-Host: ktso%@hp712c.csc.cuhk.edu.hk
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38770

SO Kwok Tsun (ktso@dcns.csc.cuhk.edu.hk) wrote:
: As subject, I have upgraded one of our FreeBSD box from 2.1.7 to
: 2.2.1.  I notice a problem with the following program:
: #include <netdb.h>
: #include <stdio.h>
: main(){
:     if (gethostbyname("cuhk.edu.hk")==NULL)
:         printf("Null\n");
: }
: and I compile it using "cc dns.c -lresolv".  It always return "Null".
: Anyone met the same problem?

Summary:

Upgrading to 2.2.1 does not remove old library in 2.1.7.  There is no
libresolv.a in 2.2.1 anymore.  The following old library can be removed
so that it won't confuse autoconf anymore:

-r--r--r--  1 bin  bin   12756 Feb 20 06:42 libgnumalloc.a
-r--r--r--  1 bin  bin   15806 Feb 20 06:42 libgnumalloc_p.a
-r--r--r--  1 bin  bin   14056 Feb 20 06:41 libresolv_p.a
-r--r--r--  1 bin  bin   12842 Feb 20 06:41 libresolv.a

If you have installed the compat lib for 2.2.1 or if you don't have
old programs requiring 2.1.7 lib, you can remove those old shared
library too.

Special thanks to Shawn Carey <smc@servtech.com>, Kenneth Furge
<kennethf@ehusa.com> and others for providing us the answers.

So K T, CUHK