make tools question & symbol versioning
Daniel Eischen
deischen at freebsd.org
Mon Mar 6 03:46:00 PST 2006
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
More information about the freebsd-arch
mailing list