[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] HAVE_CARES on Windows

From: Tim Ruehsen
Subject: Re: [Bug-wget] HAVE_CARES on Windows
Date: Mon, 11 Apr 2016 12:51:41 +0200
User-agent: KMail/4.14.10 (Linux/4.4.0-1-amd64; KDE/4.14.14; x86_64; ; )

On Monday 11 April 2016 11:30:45 Gisle Vanem wrote:
> Tim Rühsen wrote:
> > As Eli, I would like to know a few more details.
> > Is it possible to make c-ares return the 'native' socket numbers to not
> > get in conflict with gnulib ?
> As Eli pointed out, it's vice-versa; C-ares *do* return 'native'
> socket numbers. While Gnulib's socket(), select() etc. creates and
> expects 'file descriptors'. Normally in the range >= 3 (?). (I assume
> this has something to POSIX compliance. Winsock's socket() never returns
> such low numbers).
> Eli> However, converting a handle into a
> Eli> file descriptor and vise versa involves using 2 simple functions,
> I'm not sure what those functions are since I'm not so much into Gnulib.
> My intuition told me the 'rpl_select()' was the cause for the resolve-
> failure, hence this 'undef'. And since the host.c 'select()' is used only
> for 'HAVE_LIBCARES' code, I felt it won't hurt do '#undef select' in
> host.c.
> But I'm open to alternatives. Eli, can you try building with

Unless anybody complains (or has a better solution) I'm going to apply your 

> > It was not my intention to replace all 'the good old' methods, as long as
> > they work. C-ares is just used for functionality that libc (and/or
> > libresolv) does not provide. Wget is still an official GNU tool and that
> > implies that we try to use as much GNU software/libraries/code as
> > possible.
> Okay. But I feel that C-ares should *not* need to be told what DNS-server(s)
> to use. It is smart enough to figure out that for it self. Hence I feel
> it's strange and a bit confusing (for new users of Wget) that only a
> '--dns-servers' option will force the use of C-ares. IMHO it should be
> default; from a 'wget -V', it says '+cares'. Or am I still missing
> something?

--dns-servers only comes into play when you want to specify a non-standard DNS 
server (only available with +cares, as documented). If you leave it away, 
everything works 'as expected'. So even when built with c-ares, the normal 
user doesn't have to use this option. Maybe just for a small bunch of  
'expert' users.

>   Another Gnulib idiosyncrasy; #include <sys/select.h> must be included for
>   'WINDOWS' too if one calls 'select()'.

sys/select.h seems to be included implicitly in hosts.c. IMO, it would be 
corrected to an explicit include. If you think there is (also ?) a gnulib bug, 
do you mind telling the gnulib maintainers ?


Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]