cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how to specify single threaded dns resolver

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 30 Nov 2010 11:01:07 -0800

On Tue, Nov 30, 2010 at 09:41:55AM +0100, Kamil Dudka wrote:
> On Tuesday 30 November 2010 08:25:05 Vishakha Vaidya wrote:
> > Yes I am talking about Curl_getaddrinfo_ex(). I am compiling the library on
> > Mac and win.
>
> Then I'll be not much helpful as I am focused mainly on Linux.
>
> > On windows I use the vcproj, while on mac I use the configure script and
> > here are the CFLAGS I set - CFLAGS="-arch i386" ./configure
> > --with-ssl=$PWD/../openssl --without-zlib --without-libidn
> > --without-libssh2 --without-krb4 --without-gssapi --without-spnego
> > --disable-ares --enable-ipv6 --disable-static --disable-ldap
> > --disable-ldaps
> >
> > As far as I understand, I am disabling ares, still I see a lot of thread
> > trying to call Curl_getaddrinfo_ex(). What am I missing ?
>
> Nope, it's the other way around. We use c-ares in order to avoid threading
> in libcurl. c-ares makes it possible to implemente DNS lookup timeout
> without using threads. But as I said, I don't know well the situation
> on Mac and Win.

I believe that Windows, at least, uses (the equivalent of)
--enable-threaded-resolver by default. You'll probably have to manually
unset CURLRES_THREADED in some Windows config file to use the single-threaded
resolver without c-ares.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-30