Re: [Bug-wget] [PATCH] MinGW compatibility fixes
Giuseppe Scrivano gscriv...@gnu.org writes: In my understanding, all new general patches should go into 'master', those regarding metalink/multithreading should go into (experimental) 'parallel- wget' for later merging with 'master'. obviously it has to be into master too, thanks to have reported it. I am going to cherry-pick from parallel-wget into master. I have checked it, but I don't think that master needs this fix (the patch includes also an improvement, but nothing blocking to be on master ASAP). Can you confirm this? -- Giuseppe
Re: [Bug-wget] [PATCH] MinGW compatibility fixes
Am Sonntag, 16. Juni 2013 schrieb Giuseppe Scrivano: Giuseppe Scrivano gscriv...@gnu.org writes: In my understanding, all new general patches should go into 'master', those regarding metalink/multithreading should go into (experimental) 'parallel- wget' for later merging with 'master'. obviously it has to be into master too, thanks to have reported it. I am going to cherry-pick from parallel-wget into master. I have checked it, but I don't think that master needs this fix (the patch includes also an improvement, but nothing blocking to be on master ASAP). Can you confirm this? Some people stumbled upon the _PC_NAME_MAX stuff when compiling for Windows. Just search the last 2 months for '_PC_NAME_MAX'. I wondered why Bykov Aleksey recommends ' Replace _PC_NAME_MAX with 256 in url.c:1620. Then run ...' (12th June). Since Rays patch should handle that. I'm shure I also send (at least one) patch regarding this issue, but I think it/they got lost or something. However, it boils up and up again, but it is not a blocker that needs to be fixed ASAP. It's just annoying. Regards, Tim
Re: [Bug-wget] [PATCH] MinGW compatibility fixes
What about Rays patch ? I just did a 'git pull', but still can't see it ... Am Wednesday 22 May 2013 schrieb Giuseppe Scrivano: Ray Satiro raysat...@yahoo.com writes: +2013-05-21 Ray Satiro raysat...@yahoo.com + + * http.c (create_authorization_line): Fix syntax error in calls to NTLM + functions. + * url.c (url_file_name): Use MAX_PATH in Windows. + wonderful! I am going to push it after I tweak the commit message a bit. Thanks again for your contribution.
Re: [Bug-wget] [PATCH] MinGW compatibility fixes
What about Rays patch ? I just did a 'git pull', but still can't see it ... It is pushed in the wget-parallel branch. Switch to it and pull. Maybe this patch should be merged to origin/master? -- Thanking You, Darshit Shah
[Bug-wget] [PATCH] MinGW compatibility fixes
src/ChangeLog src/http.c src/url.c @ src/http.c: - (create_authorization_line) Fix syntax error in calls to NTLM functions. @ src/url.c: - (url_file_name) Use MAX_PATH in Windows. --- src/ChangeLog | 6 ++ src/http.c| 12 +--- src/url.c | 19 +++ 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index eaa82ae..1738e76 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-05-21 Ray Satiro raysat...@yahoo.com + + * http.c (create_authorization_line): Fix syntax error in calls to NTLM + functions. + * url.c (url_file_name): Use MAX_PATH in Windows. + 2013-05-19 Giuseppe Scrivano gscriv...@gnu.org * Makefile.am (EXTRA_DIST): Add iri.c multi.c multi.h metalink.c metalink.h. diff --git a/src/http.c b/src/http.c index afc89b3..fba66e2 100644 --- a/src/http.c +++ b/src/http.c @@ -4186,22 +4186,20 @@ create_authorization_line (const char *au, const char *user, #if defined ENABLE_NTLM defined ENABLE_THREADS case 'N': /* NTLM */ - if (!ntlm_input (pconn.ntlm, au)) + if (!ntlm_input (pconn-ntlm, au)) { *finished = true; return NULL; } - return ntlm_output (pconn.ntlm, user, passwd, finished); -#endif - -#ifdef ENABLE_NTLM + return ntlm_output (pconn-ntlm, user, passwd, finished); +#elif defined ENABLE_NTLM case 'N': /* NTLM */ - if (!ntlm_input (pconn-ntlm, au)) + if (!ntlm_input (pconn.ntlm, au)) { *finished = true; return NULL; } - return ntlm_output (pconn-ntlm, user, passwd, finished); + return ntlm_output (pconn.ntlm, user, passwd, finished); #endif default: /* We shouldn't get here -- this function should be only called diff --git a/src/url.c b/src/url.c index f200467..36a9630 100644 --- a/src/url.c +++ b/src/url.c @@ -1618,7 +1618,26 @@ url_file_name (const struct url *u, char *replaced_filename) append_char ('\0', temp_fnres); /* Check that the length of the file name is acceptable. */ +#ifdef WINDOWS + if (MAX_PATH (fnres.tail + CHOMP_BUFFER + 2)) +{ + max_length = MAX_PATH - (fnres.tail + CHOMP_BUFFER + 2); + /* FIXME: In Windows a filename is usually limited to 255 characters. + To really be accurate you could call GetVolumeInformation() to get + lpMaximumComponentLength + */ + if (max_length 255) +{ + max_length = 255; +} +} + else +{ + max_length = 0; +} +#else max_length = get_max_length (fnres.base, fnres.tail, _PC_NAME_MAX) - CHOMP_BUFFER; +#endif if (max_length 0 strlen (temp_fnres.base) max_length) { logprintf (LOG_NOTQUIET, The name is too long, %lu chars total.\n, -- 1.8.1.msysgit.1