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 'HAVE_LIBCARES'? > 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? BTW. without my patch, I get this link failure: host.obj : error LNK2019: unresolved external symbol _select_used_without_including_sys_select_h referenced in function _wait_ares Another Gnulib idiosyncrasy; #include <sys/select.h> must be included for 'WINDOWS' too if one calls 'select()'. -- --gv
