Support for older Windows versions

Tobias Krause Tobias.Krause at Sun.COM
Fri Aug 22 06:16:29 EDT 2008


The patch doesn't affect higher Windows versions with native support of 
"getnameinfo".

Regards,
Tobias

Joe Orton wrote:
> On Thu, Aug 21, 2008 at 12:05:08PM +0200, Tobias Krause wrote:
>> Hi Joe,
>>
>> I've attached a simple patch to support older Windows version.
>>
>>
>> (see http://msdn.microsoft.com/en-us/library/ms738532(VS.85).aspx)
> 
> Hi, thanks for the patch.  Just to be sure whether I read that correctly 
> - does this affect the build for versions of Windows >= Windows XP, or 
> not?
> 
> Regards, Joe
> 
>> "Support for getnameinfo on older versions of Windows
>>
>> The getnameinfo function was added to the Ws2_32.dll on Windows XP and 
>> later. If you want to execute an application using this function on 
>> earlier versions of Windows (Windows 2000, Windows NT, and Windows 
>> Me/98/95), then you need to include the Ws2tcpip.h file and also include 
>> the Wspiapi.h file. When the Wspiapi.h include file is added, the 
>> getnameinfo function is defined to the WspiapiGetNameInfo inline 
>> function in the Wspiapi.h file. At runtime, the WspiapiGetNameInfo 
>> function is implemented in such a way that if the Ws2_32.dll or the 
>> Wship6.dll (the file containing getnameinfo in the IPv6 Technology 
>> Preview for Windows 2000) does not include getnameinfo, then a version 
>> of getnameinfo 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 getnameinfo function."
>>
>> Regards,
>> Tobias
>>
>>
>>
>> *** Patch
>>
>> --- misc/neon-0.26.3/src/ne_socket.c	2006-10-30 14:18:51.000000000 +0100
>> +++ misc/build/neon-0.26.3/src/ne_socket.c	2008-07-16 13:32:11.022546400 
>> +0200
>> @@ -60,6 +60,7 @@
>>   #include <stddef.h>
>>   #ifdef USE_GETADDRINFO
>>   #include <ws2tcpip.h>
>> +#include <Wspiapi.h>
>>   #endif
>>   #endif
>>
>> *** End
>>
>>
>> _______________________________________________
>> neon mailing list
>> neon at lists.manyfish.co.uk
>> http://lists.manyfish.co.uk/mailman/listinfo/neon

-- 
-----------------------------------------------------------------------
Tobias Krause                     	Fon   : +49 40 251523 719
Software Engineer	                Fax   : +49 40 256811
Sun Microsystems GmbH
Nagelsweg 55
20097 Hamburg                           mailto:Tobias.Krause at sun.com
-----------------------------------------------------------------------
Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht München: HRB 161028
Geschäftsführer: Thomas Schröder, Wolfgang Engels, Dr. Roland Bömer
Vorsitzender des Aufsichtsrates: Martin Häring



More information about the neon mailing list