Kurosu | 10 Oct 09:33 2008
Picon

Re: [Wormux-cvs] r5238 - /trunk/src/network/network.cpp

Hi,

Matthieu Fertré a écrit :
> can you have a look at the change implied by this commit ? As far as I 
> understand, getaddrinfo is available on Windows XP and there is some 
> workaround for older version of Windows to make it work.

It's unavailable under Windows 2000, but I don't know how many users 
that is. There are troublesome workarounds though, see for instance:
http://www.mail-archive.com/pan-devel-qX2TKyscuCcdnm+yROfE0A <at> public.gmane.org/msg00040.html

I hope to look into it this weekend.

Regards,
Kurosu
Matthieu Fertré | 10 Oct 09:42 2008
Picon

Re: [Wormux-cvs] r5238 - /trunk/src/network/network.cpp

Hi,

Kurosu a écrit :
> Hi,
>
> Matthieu Fertré a écrit :
>   
>> can you have a look at the change implied by this commit ? As far as I 
>> understand, getaddrinfo is available on Windows XP and there is some 
>> workaround for older version of Windows to make it work.
>>     
>
> It's unavailable under Windows 2000, but I don't know how many users 
> that is. There are troublesome workarounds though, see for instance:
> http://www.mail-archive.com/pan-devel <at> nongnu.org/msg00040.html
>   

 From this webpage, it seems that Microsoft provided a header file that 
can make it avaible for older systems too.
http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx

"The *getaddrinfo* 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 *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 
(Continue reading)

Kurosu | 11 Oct 01:07 2008
Picon

Re: [Wormux-cvs] r5238 - /trunk/src/network/network.cpp

Matthieu Fertré a écrit :

>  From this webpage, it seems that Microsoft provided a header file that 
> can make it avaible for older systems too.
> http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx

The trouble would be, mingw and visual studio are different beasts. A 
minimal fix already requires ugly code to detect we're using mingw.

> 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."

I guess, only if built by visual studio, as mingw doesn't have wspiapi.h 
  afaik. I no longer can test w2k unfortunately.

At least compilation is fixed for both mingw and visual studio in r5247.

Best regards,
Kurosu

_______________________________________________
Wormux-dev mailing list
Wormux-dev <at> gna.org
https://mail.gna.org/listinfo/wormux-dev
(Continue reading)

Kurosu | 13 Oct 00:09 2008
Picon

Re: [Wormux-cvs] r5238 - /trunk/src/network/network.cpp

Kurosu a écrit :
> I guess, only if built by visual studio, as mingw doesn't have wspiapi.h 
>   afaik. I no longer can test w2k unfortunately.

Well, I managed to, so here are the results:
- visual studio build properly starts, but crashes immediately as the 
game starts (box2d problem probably)
- mingw throws as expected an "getaddrinfo symbol not found in some 
dll", as it is missing under Win2K

I've tried building under mingw with a copy of wspiapi.h found in the 
free (as in beer) Microsoft Platform SDK, and after patching (_inline 
and __inline are unknown to gcc, while inline is known) the header, 
wormux built and ran fine.

So either we require people willing to build wormux under mingw (so far, 
that's only me) to get a 600MB-like download* for a 30K unredistribuable 
header file they'd have to patch afterwards, or we indeed leave a 
win32-only procedure, as you suggested.

*if they don't simply get one of the various versions floating around on 
the intarweb, see:
http://www.koders.com/c/fid275FEAF57FA3E640A9425FB3A46D988E1F72B61D.aspx
http://pf.itd.nrl.navy.mil/mdp/dox/html/wspiapi_8h-source.html
http://www.intevation.de/roundup/kolab/file843/WSPiApi.h
or properly limit the web install to the required 20MB from the windows 
site:
http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en

Best regards,
(Continue reading)

Matthieu Fertré | 13 Oct 23:30 2008
Picon

Re: [Wormux-cvs] r5238 - /trunk/src/network/network.cpp

Kurosu a écrit :
> Kurosu a écrit :
>   
>> I guess, only if built by visual studio, as mingw doesn't have wspiapi.h 
>>   afaik. I no longer can test w2k unfortunately.
>>     
>
>   

For 0.8.2, I do in another way, look at revision 5261. I hope it's 
better for Windows version.

http://svn.gna.org/viewcvs/wormux?rev=5261&view=rev

If so, we should do the same in the trunk.

Regards,

Matt (gentildemon)

> Well, I managed to, so here are the results:
> - visual studio build properly starts, but crashes immediately as the 
> game starts (box2d problem probably)
> - mingw throws as expected an "getaddrinfo symbol not found in some 
> dll", as it is missing under Win2K
>
> I've tried building under mingw with a copy of wspiapi.h found in the 
> free (as in beer) Microsoft Platform SDK, and after patching (_inline 
> and __inline are unknown to gcc, while inline is known) the header, 
> wormux built and ran fine.
(Continue reading)


Gmane