* Daniel Stenberg <[email protected]> [Mon, 12 Apr 2010 10:28:21 +0200 (CEST)]:
On Thu, 8 Apr 2010, Ruslan Gazizov wrote:

> I agree about messy ;-). Yet I think I have a solution. For these
> (get|free)addrinfo, a great info is in the MSDN article -

Given all this, can you please provide a patch with your suggested
change(s) ?

YES! I made it through this mess. I did some testing and now I am sure of suggested changes. 1. Considering that WinXP hold 64% share of OSes (Vista-16%,7-10%), it should be primary target for us Windows developers. 2. On WinXP+VS2005+WinSDK5.2 libcurl builds without this patch, but fails to build with any later SDK. As I said, maybe there is some workaround that was later removed. 3. With this patch, libcurl builds on any SDK on XP/Vista. I didn't tested on Win7, but it should build too (Vista ad 7 do not differ much). 4. #include <wspiapi.h> should help build libcurl on systems older than XP (I believe its mostly 2000 and NT 4.0 servers), as written here http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx. I'll try when I get near one.

I compiled libcurl with "nmake vc-dll".
Here is suggested patch -
--------------
diff -ur curl/lib/Makefile.vc6 curlmod/lib/Makefile.vc6
--- curl/lib/Makefile.vc6       2010-04-16 23:46:26.879000000 +0600
+++ curlmod/lib/Makefile.vc6    2010-04-20 15:35:22.482000000 +0600
@@ -101,7 +101,7 @@
SSLLIBS    = libeay32.lib ssleay32.lib
ZLIBLIBSDLL= zdll.lib
ZLIBLIBS   = zlib.lib
-WINLIBS    = wsock32.lib wldap32.lib
+WINLIBS    = ws2_32.lib wldap32.lib
CFLAGS     = $(CFLAGS)

CFGSET     = FALSE
diff -ur curl/lib/config-win32.h curlmod/lib/config-win32.h
--- curl/lib/config-win32.h     2010-04-07 16:57:26.674085100 +0600
+++ curlmod/lib/config-win32.h 2010-04-20 15:35:05.481000000 +0600
@@ -476,6 +476,12 @@
#    define HAVE_GETADDRINFO            1
#    define HAVE_GETADDRINFO_THREADSAFE 1
#    define HAVE_GETNAMEINFO            1
+#  elif
+#    include <wspiapi.h>
+#    define HAVE_FREEADDRINFO           1
+#    define HAVE_GETADDRINFO            1
+#    define HAVE_GETADDRINFO_THREADSAFE 1
+#    define HAVE_GETNAMEINFO            1
#  endif
#endif
--------------
Article about Windows SDKs-
http://msdn.microsoft.com/ru-ru/windowsserver/dd146047(en-us).aspx

P.S. Download link for Windows XP/Server2003 Platform SDK is old. I suggest replacing
"http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm";
with
"http://www.microsoft.com/downloads/details.aspx?familyid=E15438AC-60BE-41BD-AA14-7F1E0F19CA0D&displaylang=en";

--
Ruslan Gazizov.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to