Re: [xml] win32 getaddrinfo

Michael Stahl wrote:
Rob Richards wrote:
I think I finally understand what you are trying to do. You are building on Win 2003 with VS 2005 and then trying to use the lib on on Win2K or lower and it is there that it is failing to link?

well, it fails to link with vs 2005 already because libxml (using 2.6.31 here) is not linked against ws2_32.dll, so ld (or whatever msft calls its equivalent) complained that getaddrinfo and freeaddrinfo are undefined symbols.
I get it now and thought that was only an issue with VS 2008. Can you try building from SVN or even a snapshot. The lib was added just after the .31 release.
Can you try the following patch?
Index: wsockcompat.h
--- wsockcompat.h    (revision 3721)
+++ wsockcompat.h    (working copy)
@@ -21,6 +21,7 @@
/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
 #if defined(GetAddrInfo)
+#include <wspiapi.h>

ah yes, that seems to work fine here, and is obviously the cleaner way to do it.
If the build from SVN fixes the initial problem, can you try using it on w Win2K machine? It's possible that the patch might not be needed though after more research I have doubts. I'm looking around here for an old OS to test on as well. I'm pretty sure I have an old VM image lying around here somewhere.
I don't want to change the behavior for those using VC6, so only include

uhm, there are still people who have to use that pile of junk? ouch...
well i hope at least they don't use its c++ "implementation"...
Believe it or not, but quite a few of the open source projects still use it. We still build the PHP windows release using VC6, so personally, I still use it when building these libs :).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]