freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Patrick Welche <prlw1 AT newn.cam.ac.uk>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] threadsafe
- Date: Mon, 3 Sep 2007 12:55:35 +0100
On Tue, Aug 29, 2006 at 08:44:29PM +0200, Frediano Ziglio wrote:
> Il giorno mar, 29/08/2006 alle 12.41 +0100, Patrick Welche ha scritto:
> > On Wed, Aug 23, 2006 at 09:59:05PM +0200, Frediano Ziglio wrote:
> > > Now I understand. You suggested to use getaddrinfo instead of
> > > gethostbyname_r if not available. I though you means why we test for
> > > getaddrinfo in configure... I think that one of the reasons why I didn't
> > > use getaddrinfo is that on *BSD (where it is helpful to use it) this
> > > function is not thread-safe...
> >
> > getaddrinfo is thread-safe on, yes it is NetBSD :-) , but the jury is out
> > for getnameinfo..
> >
> > Cheers,
> >
>
> >From official manual
> http://netbsd.gw.com/cgi-bin/man-cgi?getaddrinfo++NetBSD-3.99.21
> seems not thread-safe...
> It seems that in very recent versions of *BSD all lookup functions use
> tls (thread locale storage) so even gethostbyname is thread-safe but in
> former one getaddrinfo was not thread-safe (well.. I didn't checked but
> I assume that all mans are right...)
Just adding to a very old thread - NetBSD tree:
RCS file: /cvsroot/src/lib/libc/net/getaddrinfo.3,v
revision 1.44
date: 2006/07/18 14:00:40; author: christos; state: Exp; lines: +2 -6
Remove comments that do not reflect reality anymore.
that's when the BUGS "danger not threadsafe" section disappeared...
(I just tried to compile freetds-current on netbsd-current
checking whether pthreads work with -pthread... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking threadsafety... enabled
and as before
threadsafe.c:393:2: error: #error gethostbyname_r style unknown
threadsafe.c: In function 'tds_getservbyname_r':
threadsafe.c:469: warning: implicit declaration of function 'getservbyname_r'
new:
bsqlodbc.c:49:17: error: sql.h: No such file or directory
bsqlodbc.c:50:20: error: sqlext.h: No such file or directory
quibble: in src/odbc/Makefile.am is the gnu make specific pattern
%.res: %.rc really necessary?)
Cheers,
Patrick
- Re: [freetds] threadsafe, Patrick Welche, 09/03/2007
Archive powered by MHonArc 2.6.24.