Re: More on glibc-1.99

Steven N. Hirsch (shirsch@ibm.net)
Sat, 28 Dec 1996 21:58:47 -0500

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



Feedback | Store | News | Support | Product Errata | About Us | Linux Info | Search | JumpWords
No Frames | Show Frames

Copyright © 1995-1997 Red Hat Software. Legal notices