From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24655 invoked from network); 7 Sep 2000 22:16:41 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Sep 2000 22:16:41 -0000 Received: (qmail 16600 invoked by alias); 7 Sep 2000 22:16:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12774 Received: (qmail 16593 invoked from network); 7 Sep 2000 22:16:25 -0000 Date: Thu, 7 Sep 2000 18:16:22 -0400 From: Will Day To: ZSH workers mailing list Subject: Re: PATCH: test for network libraries (for test only)/problems with name resolution Message-ID: <20000907181622.A21515@rom.oit.gatech.edu> Reply-To: Will Day References: <1000822170232.ZM7764@candle.brasslantern.com> <000e01c01675$897932a0$21c9ca95@mow.siemens.ru> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="5mCyUwZo2JvN/JJP"; micalg=pgp-md5; protocol="application/pgp-signature" User-Agent: Mutt/1.1.2i In-Reply-To: <000e01c01675$897932a0$21c9ca95@mow.siemens.ru>; from Andrej.Borsenkow@mow.siemens.ru on Mon, Sep 04, 2000 at 05:39:23PM +0400 X-no-archive: yes --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable A short time ago, at a computer terminal far, far away, Andrej Borsenkow wr= ote: >As I got no reply, if it really fixed the bug it was supposed to, I was ab= out >to renounce this one. But somebody (Peter?) silently committed it (without >ChangeLog) :-) > >I would really prefer to leave it out for a while. So far there was a sing= le >complaint and no responce if it works now, but this patch broke too much h= ere. > >If anybody else complaints we can return to it. Sorry I wasn't around sooner; I just yesterday got around to updating my 3.1.6 with 3.1.9. :) I tried the patch, and it works okay for inet_aton and inet_pton, but still complains about gethostbyname2, configure having not found it (#undef HAVE_GETHOSTBYNAME2 in config.h). This is under Solaris 2.7, with C5.0. Looking at libresolv (on 2.7 as well as 2.8), it looks to me like the problem is that it's defined in the headers (netdb.h), but isn't actually available in the libraries. On 2.7, libresolv includes: [141] | 55276| 400|FUNC |LOCL |0 |12 |gethostbyname2 but this is local, so we can't call it (is my understanding). On 2.8, libresolv includes: [1093] | 51916| 404|FUNC |GLOB |0 |9 |res_gethostbyname2 but this is "res_gethostbyname2" not "gethostbyname2". Yet both define it in /usr/include/netdb.h: struct hostent *gethostbyname2(const char *, int); So, configure will never be able to find "gethostbyname2", as the link will never succeed, yet zsh can't use its own definition, as the "static" keyword in zsh's declaration: static struct hostent*gethostbyname2 _((char const*name,int af)); causes the compiler to reject it as a conflict: "./zftp.pro", line 11: identifier redeclared: gethostbyname2 current : static function(pointer to const char, int) returning poin= ter to struct hostent {pointer to char h_name, pointer to pointer ... previous: function(pointer to const char, int) returning pointer to = struct hostent {pointer to char h_name, pointer to pointer to char... : "/u= sr/include/netdb.h", line 225 "zftp.c", line 1189: cannot recover from previous errors Personally, this seems to me like a bug in solaris (declared in the headers but not available in the libraries), and I've submitted a bug report with sunsolve; we'll see if that goes anywhere. :P In the meantime, I dunno. If I remove the "static" from the zftp.c declaration, it should work fine, but I'm not sure what problems that might introduce. --=20 Will Day OIT / O&E / Technical Support willday@rom.oit.gatech.edu Georgia Tech, Atlanta 30332-0715 -> Opinions expressed are mine alone and do not reflect OIT policy <- Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. Benjamin Franklin, Pennsylvania Assembly, Nov. 11, 1755 --5mCyUwZo2JvN/JJP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.2 (Solaris) Comment: http://rom.oit.gatech.edu/~willday/pubkey.asc iQCVAwUBObgTthDHlOdPw2ZdAQE3vAP8DTks2qtPaRjZyLPYW/g4/cy2YujbtNIF 5yggaiOYTYli0DXbB5QjtI7fEbp3HMTyNqeksAqPyYgavovAxfep2c2YhWYjiQ7y CchViWvg78FNUEeXK+mVHXhRU+GCzcDj4IgOKv25H/9OtT0odkts5hHffwTQeKB6 K5LeFAlIF8k= =JJvC -----END PGP SIGNATURE----- --5mCyUwZo2JvN/JJP--