[Libssh] Windows patch

Aris Adamantiadis aris at 0xbadc0de.be
Fri Mar 7 03:52:22 CET 2008


Keisial a écrit :
> Aris Adamantiadis a écrit:
>>> MSDN says it's available since Windows 95, but the prototype isn't 
>>> included unless
>>> _WIN32_WINNT >= 0x0501
>>> 0x0501 means Windows Server 2003, Windows XP. Previous windows didn't 
>>> include a built-in
>>> getaddrinfo()
>>>
>>>     
>> I remember having compiled libssh under win2k some time ago, with 
>> getaddrinfo. the easier is to compile and test on w98 and 2K
>>   
> 
> Platform SDK has a check #if !defined(_WIN32_WINNT) || (_WIN32_WINNT <= 
> 0x0500)
> WspiapiGetAddrInfo is implementing by calling WspiapiLoad to obtain a 
> pointer to the function.
> WspiapiLoad is yet another inlined function which tries to locate the 
> best getaddrinfo available.
> Seems largely undocumented, see 
> http://www.developer.com/tech/article.php/10923_3382721_2
> is the best reference i see.
> 
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.

While merging your win32 code, I found a reference on gethostbyname in 
server.c. I probably forgot to make it getaddrinfo-compliant.



More information about the Libssh mailing list