getaddrinfo is supported from win 2000, which version is 0x0500. See
Earnie said that in mingw headers, this function is guarded by WINVER = 0x0501.
Maybe other functions like getaddrinfo should be cheked too.
According to the cited MSDN reference:
> The getaddrinfo function was added to the Ws2_32.dll
> on Windows XP and later.
From this, I deduce that, in spite of the suggestion that the minimum supported client is Win2K Pro, the WINVER == 0x0501 guard may, in fact, be correct. The reference goes on to say:
> To execute an application that uses this function on earlier
> versions of Windows, then you need to include the Ws2tcpip.h
> and Wspiapi.h files. When the Wspiapi.h include file is added,
> the getaddrinfo function is defined to the WspiapiGetAddrInfo
> inline function in the Wspiapi.h file. At runtime, the
> WspiapiGetAddrInfo function is implemented in such a way that
> if the Ws2_32.dll or the Wship6.dll (the file containing
> getaddrinfo in the IPv6 Technology Preview for Windows 2000)
> does not include getaddrinfo, then a version of getaddrinfo is
> implemented inline based on code in the Wspiapi.h header file.
> This inline code will be used on older Windows platforms that
> do not natively support the getaddrinfo function.
This implies that this -- if indeed, it is broken -- should *not* be "fixed" by changing to a WINVER == 0x0500 guard, but rather that an alternative inline implementation should be provided in in wspiapi.h, such that getaddrinfo() is called on WinXP and later, but is emulated on earlier windows versions.
In the event that such emulation is not currently provided, or isn't working correctly, I no longer have access to any Win2K system for development or testing of a possible solution.
Vincent, are you able to test this on a Win2K Pro version of MSVCRT?
@Earnie: sorry, i have no such Windows version
Hmm, The document pointed to states
Minimum supported client Windows 2000 Professional
Minimum supported server Windows 2000 Server
However, GetAddrInfoW is only supported on
Minimum supported client Windows Vista, Windows XP with SP2
Minimum supported server Windows Server 2003
>According to the cited MSDN reference:
>> The getaddrinfo function was added to the Ws2_32.dll
>> on Windows XP and later.
I see that, I'll see what I can do later.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.