GNOME Bugzilla – Bug 611696
gio uses GetAddrInfo which requires special handing on windows 2k
Last modified: 2010-04-02 22:36:38 UTC
We're getting complaints that recent win32 packages of gnumeric no longer work on windows 2k. The only reference to GetAddrInfo I can find in the source base is via gio. http://msdn.microsoft.com/en-us/library/ms738520%28VS.85%29.aspx has a comment that additional headers are required to handle that situation.
Created attachment 155131 [details] [review] GResolver: fix Windows 2000 workaround Move the <wspiapi.h> include from gwin32resolver.c to gnetworkingprivate.h, since gthreadedresolver.c needs it too.
*** Bug 601840 has been marked as a duplicate of this bug. ***
pretty sure this patch is right, but I can't easily test it...
Review of attachment 155131 [details] [review]: Looks OK, feel free to commit.
(Note that the patch won't help those using my binaries, though, as they are built with a compiler that does not come with <wspiapi.h>.)
Attachment 155131 [details] pushed as 9a88613 - GResolver: fix Windows 2000 workaround
Spoke to ender on #gimp. With his help, I discovered that the latest version of GLib that does not call getaddrinfo() / freeaddrinfo() is 2.22.1. So until Tor is provided with a "clean-room" reimplementation of the wspiapi.h header file, the only solution to this bug that I'm aware of -- if you need to go the pre-compiled route -- is to use Glib 2.22.1.
My apologies. The correct version of GLib -- the one that does not call freeaddrinfo() -- is 2.20.5, *not* 2.22.1.
Dear Tor, Tor Lillqvist wrote: > (Note that the patch won't help those using my binaries, though, as they are > built with a compiler that does not come with <wspiapi.h>.) wspiapi.h is available on the internet: http://www.google.com/codesearch?hl=en&lr=&q=wspiapi.h&sbtn=Search Mark
Much is available on the Internet. And I have never claimed that the problem would be that I wouldn't have access to any <wspiapi.h>. It is in the Windows SDK which is freely available from Microsoft. But I don't know it is OK to use it in code built with mingw. Or if it would work without some editing. In general, this is more that I want to bother with to support a dead OS. There is also a <wspiapi.h> in the mingw-w64 headers which claims to be "public domain", but it is suspiciously close to Microsoft's, so the question about how OK it is to use it still holds.