[Libssh] Windows patch

Keisial keisial at gmail.com
Fri Mar 7 22:05:23 CET 2008


Aris Adamantiadis a écrit:
> Hmm i'm that good with win32 :(
> Does that mean libssh won't run on w2k ? Can I recommend a dll that 
> implements getaddrinfo ?
> Going back to gethostbyname doesn't look like a good solution.
>   
It only means you're statingthat you want it to work from subsequent 
version and don't care about previous.
Trying to run in on previous platforms may work or not, depending on the 
imports. On this case it's only
getaddrinfo. If you run it on a Windows whose ws2_32.dll has that call, 
it will work. Else, it will refuse
to load the executable. As msdn says it's available since Windows95 it 
_could work_. Probably the only
way to really know is to try it.

> While merging your win32 code, I found a reference on gethostbyname in 
> server.c. I probably forgot to make it getaddrinfo-compliant.
Yeah, it's a bit odd, because if you don't have gethostbyname (is that 
really an option?)
 it will compile but will always fail at runtime. A #error or just 
leaving the linking error would be better.
Unless you weren't going to use bind_socket(). Still, i would prefer to 
detect that issue without having to debug
into library code.




More information about the Libssh mailing list