On 1/29/2013 1:00 AM, Jan Nijtmans wrote:
> 2013/1/27 Edward Berner <[email protected]>:
>> I had been just commenting out the offending code, but finally got
around
>> implementing a better fix. The attached patch modifies winhttp.c to
load
>> the offending functions at run time and only call them if they actually
>> exist. I tested the patch with mingw32 and a few different versions of
>> MSVC, and verified that the "fossil winsrv" command still works. (I
sent in
>> a contributor agreement earlier this month.)
>
> Your patch is now in the "berner-nt4" branch, for anyone who finds
this useful.
Thanks, and thanks for the feedback.
>
> I have no objections merging this to trunk, but I have three remarks:
> - The FreeLibrary at the end is not necessary, as fossil.exe is already
> linked with advapi32.dll so it will never be freed actually
True. It just seemed cleaner to include the FreeLibrary call anyway.
> - The error-handling is more complicated than necessary. If any of
> the two functions is NULL, you just can bail out early.
Actually I don't think I can, if I understand you correctly. On NT4,
the function pointers being NULL is the expected case but everything
else in the function works okay, so I just call the functions if they're
available and otherwise skip 'em.
> - On win64, all of this is not necessary, so I would expect a
> #ifndef __WIN64 around the changed parts. This will also
> make it easy to remove the code when no-one uses NT4 any more.
Oh. I didn't even think about win64. I'll look into it.
later,
Edward
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users