Skip to Content.
Sympa Menu

freetds - Re: [freetds] Strange TODO

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: TDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Strange TODO
  • Date: Fri, 25 Jul 2008 10:18:55 -0400

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: christos AT astron.com (Christos Zoulas)
To: netbsd-users AT netbsd.org
Subject: Re: getservbyname_r


In article <20080723144255.3b05284b.jklowden AT schemamania.org>,
James K. Lowden <netbsd-users AT NetBSD.org> 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





Archive powered by MHonArc 2.6.24.

Top of Page