cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: VS2008 build issues

From: Ruslan Gazizov <ruslan_ufa_at_rambler.ru>
Date: Tue, 20 Apr 2010 17:26:06 +0400

* Yang Tse <yangsita_at_gmail.com> [Tue, 20 Apr 2010 14:38:47 +0200]:

> IOW, ok to replace 'wsock32.lib' string with 'ws2_32.lib' string in
> following three files:
> lib/Makefile.vc6 src/Makefile.vc6 and Makefile.dist

Yes, excluding Makefile.dist

>
> libcurl's MSVC project files have been using ws2_32.lib instead of
> wsock32.lib for a long time.
>

Never tried them neither want to. I like building in a console just like
in Linux

> Funny looking hunk. Condition missing for elif statement.

OOPS, sorry ;-(.

> In any case,hunk not needed if wsock32.lib is changed to ws2_32.lib.

The meaning of this branch is "what if we are under Windows earlier than
XP/Server2003?. Then, as the MSDN for freeaddrinfo states,
(get|free)addrinfo are implemented through wspiapi.h. As I said, I
intend to test it on Windows 2000.

> Ruslan, can you provide updated 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 19:08:53.056000000
+0600
@@ -476,6 +476,12 @@
 # define HAVE_GETADDRINFO 1
 # define HAVE_GETADDRINFO_THREADSAFE 1
 # define HAVE_GETNAMEINFO 1
+# elif defined(_WIN32_WINNT)
+# include <wspiapi.h>
+# define HAVE_FREEADDRINFO 1
+# define HAVE_GETADDRINFO 1
+# define HAVE_GETADDRINFO_THREADSAFE 1
+# define HAVE_GETNAMEINFO 1
 # endif
 #endif

diff -ur curl/src/Makefile.vc6 curlmod/src/Makefile.vc6
--- curl/src/Makefile.vc6 2010-04-07 16:57:27.111085100 +0600
+++ curlmod/src/Makefile.vc6 2010-04-20 19:10:37.201000000 +0600
@@ -225,8 +225,8 @@
 !ENDIF

-LINKLIBS = $(LINKLIBS) wsock32.lib wldap32.lib
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) wsock32.lib wldap32.lib
+LINKLIBS = $(LINKLIBS) ws2_32.lib wldap32.lib
+LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib

 all : release

diff -ur curl/src/config-win32.h curlmod/src/config-win32.h
--- curl/src/config-win32.h 2010-04-07 16:57:27.115085100 +0600
+++ curlmod/src/config-win32.h 2010-04-20 19:08:51.771000000
+0600
@@ -357,6 +357,12 @@
 # define HAVE_GETADDRINFO 1
 # define HAVE_GETADDRINFO_THREADSAFE 1
 # define HAVE_GETNAMEINFO 1
+# elif defined(_WIN32_WINNT)
+# include <wspiapi.h>
+# define HAVE_FREEADDRINFO 1
+# define HAVE_GETADDRINFO 1
+# define HAVE_GETADDRINFO_THREADSAFE 1
+# define HAVE_GETNAMEINFO 1
 # endif
 #endif

Thanks!

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