lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.11k stars 162 forks source link

Native Windows version #431

Open ghost opened 6 years ago

ghost commented 6 years ago

I see that Cygwin version is available - but is a native version - for example built with x86_64-w64-mingw32-gcc - Found first error:

https://github.com/lavv17/lftp/blob/b934dbba0cb3a2b367549d0e17131538b90acbc5/lib/hstrerror.c#L24

is not valid for native windows - should be something like this:

#ifdef __MINGW64_VERSION_MAJOR
#include <winsock2.h>
#else
#include <netdb.h>
#endif

http://github.com/Alexpux/MINGW-packages/blob/a05bdb7/mingw-w64-git/0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch

I am giving up on this one until some more progress is made on this repo - if anyone is interested my LFTP recipe is here

http://github.com/svnpenn/glade/tree/79a08c4/lftp

briancline commented 6 years ago

Have you considered running the Linux-native lftp under WSL instead of cygwin?

ghost commented 6 years ago

@briancline that is a workaround - not a solution. as ive clearly demonstrated - the code currently has bugs with regard to windows portability

briancline commented 6 years ago

Wow, alright. Well, the original question was about a native binary, presumably so you may use it on Windows in a more performant way than what Cygwin can offer under its userland POSIX layer, but I surmise the answer is that running lftp under WSL does not fit your use case.

I looked at this issue out of interest in helping you improve this compatibility, particularly if @lavv17 sees this as a desirable direction for lftp even in light of WSL's ELF binary compatibility -- was only trying to help you out with an alternative for the short term. ;-)