Removal of bogus gethostbyaddr_r()

Terry Lambert tlambert2 at mindspring.com
Wed Jun 18 23:34:59 PDT 2003


Daniel Eischen wrote:
> On Wed, 18 Jun 2003, Terry Lambert wrote:
> > Daniel Eischen wrote:
> > > On Wed, 18 Jun 2003, Kris Kennaway wrote:
> > > > Any objections?
> > >
> > > Why is this bogus?  Do we have another gethostbyaddr_r hiding
> > > somewhere?
> >
> > It lies?  (_r).
> 
> If that's true, then it's a bug and eventually should
> be fixed.

Yes. It's not thread-safe, and it's not reentrant, as implied
by the name.  I have no idea how it made it in past all the
reviewing.


> Additionally, you can't go around removing
> public interfaces without bumping library versions
> (unless said interface hasn't seen a release yet).

That's a good point; but you'd hope that the binding of
shared library symbols would be RTLD_NOW at compile time
and RTLD_LAZY at runtime, so the only thing that would
break are programs that actually used the symbol.  And
those programs are broken anyway, since if they depend on
the thing working, they're broken.

Maybe we could just declare an "void *" by that name that
was equal to zero...  8-).

But if no one is going to fix it before the next release,
it should be diked out, because it's fooling "configure"
prgorams (and unfortunately, just diking it out of the
header files isn't enough, because they look by linking,
rather than by looking).

Makes you want minor version numbres back...

-- Terry


More information about the freebsd-threads mailing list