zsh-workers
 help / color / mirror / code / Atom feed
From: Will Day <willday@rom.oit.gatech.edu>
To: ZSH workers mailing list <zsh-workers@sunsite.auc.dk>
Subject: Re: PATCH: test for network libraries (for test only)/problems with name resolution
Date: Thu, 7 Sep 2000 18:16:22 -0400	[thread overview]
Message-ID: <20000907181622.A21515@rom.oit.gatech.edu> (raw)
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

[-- Attachment #1: Type: text/plain, Size: 2929 bytes --]

A short time ago, at a computer terminal far, far away, Andrej Borsenkow wrote:
>As I got no reply, if it really fixed the bug it was supposed to, I was about
>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 single
>complaint and no responce if it works now, but this patch broke too much here.
>
>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 pointer 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... : "/usr/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.

-- 
Will Day     <PGP mail preferred>     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

[-- Attachment #2: Type: application/pgp-signature, Size: 360 bytes --]

  parent reply	other threads:[~2000-09-07 22:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20000821092904.A32199@lorien.emufarm.org>
2000-08-22 13:15 ` Andrej Borsenkow
2000-08-22 13:43   ` Roland Jesse
2000-08-22 17:02   ` Bart Schaefer
2000-08-23  6:55     ` Andrej Borsenkow
2000-09-04 13:39     ` Andrej Borsenkow
2000-09-06 15:52       ` Removed " Andrej Borsenkow
2000-09-07 22:16       ` Will Day [this message]
2000-09-08  4:14         ` Bart Schaefer
2000-09-08  6:05           ` Andrej Borsenkow
2000-09-08  6:39             ` Will Day
2000-09-08  7:28             ` OT: " Andrej Borsenkow
2000-09-08 20:31             ` Zefram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000907181622.A21515@rom.oit.gatech.edu \
    --to=willday@rom.oit.gatech.edu \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).