Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Steven N. Hirsch <shirsch@ibm.net>
Subject: Re: More on glibc-1.99
Date: Sat, 28 Dec 1996 21:58:47 -0500	[thread overview]
Message-ID: <e22fac101cb36c1777afef369ebe7efb.axp-list@archive.invalid> (raw)

This is a multi-part message in MIME format.

--------------2840A77130064A4045292347
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Steven N. Hirsch wrote:
> 
> All,
> 
> I'm not sure who to report this to, but I have verified a problem with
> 'gethostbyname' in the newest glibc-1.99 for Alpha.  Using the simplest
> program possible (attached below), and without a 'host:' line in
> nsswitch.conf, it works properly when given either a resolvable
> namestring or dotted-quad IP address.
> 
> However, if you place a 'host:' clause in nsswitch.conf with ANYTHING as
> an arguement (even db and/or files!), gethostbyname() fails when given a
> dotted-quad address.
> 
> Definitely a bug in my book.  If anyone knows who might be interested in
> this, would you please forward it to same?  Many thanks.
> 
> Steve
> 
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

<groan>  I forgot the attachment..

--------------2840A77130064A4045292347
Content-Type: text/plain; charset=us-ascii; name="test.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="test.c"

#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
     
main (int argc, char **argv)
{
  struct hostent *hostinfo;

  hostinfo = gethostbyname (argv[1]);
  if (hostinfo == NULL)
    {
      fprintf (stderr, "Unknown host %s.\n", argv[1]);
      exit (EXIT_FAILURE);
    }

  fprintf (stdout, "Name: %s, Address: %ld\n", 
	   hostinfo->h_name,
	   *(struct in_addr *) hostinfo->h_addr);
}

--------------2840A77130064A4045292347--

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

             reply	other threads:[~1996-12-29  2:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-29  2:58 Steven N. Hirsch [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-12-28 23:57 More on glibc-1.99 Steven N. Hirsch
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox