Subject: C-ares on Cygwin [was: Using relative names]

C-ares on Cygwin [was: Using relative names]

From: René Berber <rene.berber_at_gmail.com>
Date: Fri, 22 Jun 2012 15:12:53 -0500

On 5/24/2012 4:04 PM, René Berber wrote:
> On 5/24/2012 3:24 PM, Daniel Stenberg wrote:
>
>>> Also on Windows but with a native program that uses c-ares (built with
>>> MinGW), it doesn't work. So it must be something missing (BTW I have
>>> ISC BIND running on Windows, with a split view, everything works fine
>>> -- I can 'ping' with a relative name (w.r.n.), I can ssh w.r.n. before
>>> I added resolv.conf (and after)).
>>
>> So, given all this - can you think of a suggested fix that would make
>> things work more like the way you would have expected them from the
>> start?
>
> Having to add /etc/resolv.conf to Cygwin was unexpected.

Follow up on this.

My general use of c-ares under Cygwin w/o resolv.conf was successful by
pure chance, I happen to have a DNS server running on my PC, and c-ares
uses 127.0.0.1 when it doesn't have any DNS name servers, which is the
usual case.

I also found that initialization uses some environment variables, if
present. LOCALDOMAIN is one, and it could be used to solve the relative
names problem (untested), but the general problem is not (i.e. we still
need resolv.conf).

-- 
René Berber
Received on 2012-06-22