bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: incorrect return value in gethostbyname_r() ?


From: Greg Herlein
Subject: Re: incorrect return value in gethostbyname_r() ?
Date: Sat, 28 Oct 2000 12:38:47 -0700 (PDT)

OK fine, slam away.  

But the docs suck.  It's stupid to discuss the internals of the
nss library in a document that programmers are going to go to in
order to look up how to use a funtion.  There's no man page,
and some of us don't like the info interface.  The html libc
manual is my refernece...  and the ONLY reference to
gethostbyname_r in that doc shows a function prototype that I
mistook to be the interface.

OK, I was wrong.  But I got here by trying to fix a bug in
someone else's library, who WAS in fact looking for a non-zero
return value based on the libc docs.  I've coded for 10+ years
and that's the way *I* read the doc too.  It's not written
clearly enough to make it EVIDENT that it's not about the user
interface to the functions.

I'm willing to contribute some documentation to help.  I want to
learn.  I want to help others learn.  I am a bit above the
"slightest clue" level, thank you very much.

Did you catch that?  I am willing to help.

Separate subject:  If your only answer to why glibc's
gethostbyname_r interface is different than on other unixes is to
tell me to go away, I'm sad for you.  But I'll persist:  is there
a good reason?  Where on earth would I read about it if there
were?  Point me at books, or docs, or other mail lists, or
whatever.  I think it's a *valid* question.  I'm not saying
glibc's way is wrong - in fact, it's probably superior, if the
rest of the library is an example - but I'm asking why it's
different.  That's all.

But that's not really the issue I want to argue - I'd rather
spend my time helping to get the docs better so other programmers
won't stumble over this problem too.  If I write up some content
on this function family, will you fold it into the doc?

Greg


On 28 Oct 2000, Ulrich Drepper wrote:

> Greg Herlein <address@hidden> writes:
> 
> > This is pretty clear, to me.  It's not discussing the
> > "internal" nss function if it's directly comparing it to the
> > normal (non-reentrant) gethostbyname.
> 
> Crap.  This whole section is about the internal NSS functions and the
> paragraphs you quoted describe why the NSS function interface is as it
> is.  You've been told that before so stop it now.  (I've written both,
> the code and the documentation, so don't even think about arguing with
> me.)
> 
> > Also, why is the glibc gethostbyname_r() so radically different
> > than on other unixes?  From the man page from a Solaris box:
> 
> You don't have the slightest clue and nevertheless come here and try
> to question the designed.  Get lost.  The interfaces are as they are
> and they are much more consistent then what Solaris does.  Just take a
> standard and look for similar interfaces and compare them.
> 
> -- 
> ---------------.                          ,-.   1325 Chesapeake Terrace
> Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
> Red Hat          `--' drepper at redhat.com   `------------------------
> 

/**************************************************************
Greg Herlein                                   address@hidden
Herlein Engineering                             www.herlein.com
***************************************************************/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]