Re: [Bug-wget] HAVE_CARES on Windows
> From: Gisle Vanem > Date: Sat, 9 Apr 2016 21:58:18 +0200 > > I have tried building latest Wget with '-DHAVE_LIBCARES' > and all resolve attempts failed due to Gnulib's select() > is not compatible with the socket-number(s) returned from > a normal C-ares library on Windows. What is a "socket number" that libcares returns? Is it a file descriptor, a handle, or something else?
[Bug-wget] HAVE_CARES on Windows
I have tried building latest Wget with '-DHAVE_LIBCARES' and all resolve attempts failed due to Gnulib's select() is not compatible with the socket-number(s) returned from a normal C-ares library on Windows. This is what I did to fix it: --- a/host.c 2016-04-09 17:45:44 +++ b/host.c 2016-04-09 21:48:06 @@ -694,6 +694,13 @@ return al; } +/* Since GnuLib's select() (i.e. rpl_select()) cannot handle socket-numbers + * returned from C-ares, we must use the original select() from Winsock. + */ +#ifdef WINDOWS +#undef select +#endif + static void wait_ares (ares_channel channel) { --- So with a command like 'wget --dns-servers=8.8.8.8 www.vg.no' all is well. But it seems strange to me that w/o the '--dns-servers' option it falls back to good old 'gethostbyname_with_timeout_callback()' method. Shouldn't the use of C-ares's wait_ares() be default w/o this option? I must be missing something. -- --gv
Re: [Bug-wget] [PATCH] Fix python test suite
Am Samstag, 9. April 2016, 10:46:23 schrieb Giuseppe Scrivano: > Hi Tim, > > Tim Ruehsen writes: > > @@ -27,7 +28,7 @@ class BaseTest: > > Define the class-wide variables (or attributes). > > Attributes should not be defined outside __init__. > > """ > > > > -self.name = name > > +self.name = os.path.basename(os.path.realpath(sys.argv[0])) > > > > # if pre_hook == None, then {} (an empty dict object) is passed > > to > > # self.pre_configs > > self.pre_configs = pre_hook or {} > > shouldn't we remove name from __init__? That is what I meant with "This is patch 0002-... just as suggestion, to complete it we have to remove all occurrences of TEST_NAME from the python tests." I didn't want to waste my time and change code at 30+ places before I know that such a change is welcome. Regards, Tim signature.asc Description: This is a digitally signed message part.
Re: [Bug-wget] [PATCH] Fix python test suite
Hi Tim, Tim Ruehsen writes: > @@ -27,7 +28,7 @@ class BaseTest: > Define the class-wide variables (or attributes). > Attributes should not be defined outside __init__. > """ > -self.name = name > +self.name = os.path.basename(os.path.realpath(sys.argv[0])) > # if pre_hook == None, then {} (an empty dict object) is passed to > # self.pre_configs > self.pre_configs = pre_hook or {} shouldn't we remove name from __init__? Regards, Giuseppe