Re: Strange TODO
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Thus spake Frediano: > How to fix all these problems?? > - we have no safe source for servent_data (private libc header is not > installed). - we can implement a thread-safe getservbyname locking > _servent_mutex directly and call getservbyname_r (not that clean) and > endservent_r (avoid leaks). - use getaddrinfo, is it thread-safe under > NetBSD ?? It turns out we're going about this all wrong. Instead of getservbyname_r et al., we should be using getnameinfo/getaddrinfo. Those should be threadsafe on any platform, and are standard. Do you think it's feasible to abandon getservbyname_r? Do we support any platform on which getservbyname_r is implemented but getaddrinfo is not? --jkl Begin forwarded message: Date: Wed, 23 Jul 2008 19:04:35 +0000 (UTC) From: [email protected] (Christos Zoulas) To: [email protected] Subject: Re: getservbyname_r In article <[email protected]>, James K. Lowden <[email protected]> wrote: >What is the status of getservbyname_r? There's no man page, but it seems >to be referenced in netdb.c. > >I'm trying to determine if FreeTDS can be run in threadsafe mode on >NetBSD. It requires the usual suite of reentrant networking functions. It is not documented because it is an ugly api and non-standard. Why don't you use getnameinfo/getaddrinfo? christos