After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611696 - gio uses GetAddrInfo which requires special handing on windows 2k
gio uses GetAddrInfo which requires special handing on windows 2k
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
2.22.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
: 601840 (view as bug list)
Depends on:
Blocks: 610502
 
 
Reported: 2010-03-03 12:54 UTC by Jody Goldberg
Modified: 2010-04-02 22:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GResolver: fix Windows 2000 workaround (1.59 KB, patch)
2010-03-03 13:38 UTC, Dan Winship
committed Details | Review

Description Jody Goldberg 2010-03-03 12:54:01 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.
Comment 1 Dan Winship 2010-03-03 13:38:08 UTC
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.
Comment 2 Dan Winship 2010-03-03 13:39:18 UTC
*** Bug 601840 has been marked as a duplicate of this bug. ***
Comment 3 Dan Winship 2010-03-03 13:40:33 UTC
pretty sure this patch is right, but I can't easily test it...
Comment 4 Tor Lillqvist 2010-03-03 14:10:19 UTC
Review of attachment 155131 [details] [review]:

Looks OK, feel free to commit.
Comment 5 Tor Lillqvist 2010-03-03 14:11:32 UTC
(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>.)
Comment 6 Dan Winship 2010-03-03 14:53:51 UTC
Attachment 155131 [details] pushed as 9a88613 - GResolver: fix Windows 2000 workaround
Comment 7 Patrick 2010-04-02 15:51:26 UTC
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.
Comment 8 Patrick 2010-04-02 16:07:47 UTC
My apologies. The correct version of GLib -- the one that does not call freeaddrinfo() -- is 2.20.5, *not* 2.22.1.
Comment 9 Mark Roberts 2010-04-02 16:43:47 UTC
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
Comment 10 Tor Lillqvist 2010-04-02 22:36:38 UTC
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.