Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2006 06:45:58 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Peter Wemm <peter@wemm.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: make tools question & symbol versioning
Message-ID:  <Pine.GSO.4.43.0603060635040.29520-100000@sea.ntplx.net>
In-Reply-To: <200603051937.35717.peter@wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 5 Mar 2006, Peter Wemm wrote:

> On Tuesday 28 February 2006 07:06 am, Daniel Eischen wrote:
> > On Tue, 28 Feb 2006, Hajimu UMEMOTO wrote:
> >
> > > deischen> I'll remove gethostbyname_r.  If you find others that
> > > deischen> shouldn't be there, please let me know.
> > >
> > > Please remove the functions listed in netdb_private.h.
> >
> > Will do.
>
> These are real exported functions.  The netdb_private.h thing is a hack
> to force people to do the correct #includes.  People got tired of folks
> using ancient code with bogus manual 'extern' declarations with bogus
> structs and wondering why it didn't work correctly.
>
> I think they should be versioned, and the netdb_private.h stuff adjusted
> if necessary.

It looks like these functions:

   __endhostent_r
   __endnetent_r
   __endprotoent_r
   __endservent_r
   __gethostbyaddr_r
   __gethostbyname_r
   __gethostbyname2_r
   __gethostent_r
   __getnetbyaddr_r
   __getnetbyname_r
   __getnetent_r
   __getprotobyname_r
   __getprotobynumber_r
   __getprotoent_r
   __getservbyname_r
   __getservbyport_r
   __getservent_r
   __sethostent_r
   __setnetent_r
   __setprotoent_r
   __setservent_r

were added relatively recently (April 05) to make the library
thread-safe.  They are not in the POSIX spec, nor are they
in any of our standard headers.  Of the above, only the following
are visible/global in Solaris 8 (libsocket):

   getnetbyaddr_r
   getnetbyname_r
   getnetent_r
   getprotobyname_r
   getprotobynumber_r
   getprotoent_r
   getservbyname_r
   getservbyport_r
   getservent_r

and there are no setfoo_r() functions.

I don't think our functions are meant to be (at least yet)
visible to applications and have only been in the tree for
a year, as well as being prefixed with "__".

-- 
DE




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0603060635040.29520-100000>