Opened 15 years ago
Last modified 15 years ago
#1532 closed Patch
socket.cpp and win2000 compatibility problem
|Reported by:||paolozambotti||Owned by:|
|Keywords:||Cc:||paolozambotti, Tim Kosse|
|Component version:||Operating system type:|
|Operating system version:|
I've seen the workaround you placed on top of socket.cpp ( MinGW needs this for getaddrinfo) in order to have filezilla compiling under mingw. Unfortunately this is only an half workaround, I mean, in this way the program compiles perfectly but it doesn't work under win2000; defining _WIN32_WINNT
as 0x501 means WinXP. On win2000 WS2_32.dll doesn't include function getaddrinfo and freeaddrinfo so, when you try to run filezilla you only got en error window telling you that getaddrinfo is not available in WS2_32.dll.
Here is a patch (based on rev. 2434) that adds an include file (wspiapi.h) that redefines the functions that are unavailable under win2000.
Change History (5)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
by , 15 years ago
Win2000 compatibility patch from rev 2530
comment:3 by , 15 years ago
My coding ability and my spare time are not enough to write my own patch from scratch so I take some time to look around for some GPLed files. I found them in the gnulib package and, with few modifications (mainly defines, include and related config stuff) I was able to fit them in Filezilla code. I'm not totally sure my modifications will work in every situation but I tested them on Win2k and WinXP (with and without IPv6), they compile and Filezilla works fine. I attach the patch based on revision 2530.
File Added: filezilla_2530.patch
comment:4 by , 15 years ago
Please try the upcoming 2008-08-04 build from http://filezilla-project.org/nightly.php
To keep things simple I've written some tiny loader and a bit of fallback code. Both wspiapi and your second patch were way too large, adding lots of useless code. My version is less than 180 new source lines.
Personally I don't mind dropping Windows 2000 support.
I cannot include that file, it is not GPL-compatible. You need to forget about this file.
You need to write a patch using only the publicly available API documentation that loads getaddrinfo dynamically using wxDynamicLibrary.