cURL / Mailing Lists / curl-library / Single Mail

curl-library

MSVC and socklen_t and PSDK again, and now also include/curl/curl.h

From: Yang Tse <yangsita_at_gmail.com>
Date: Tue, 23 Oct 2007 16:55:52 +0200

This issue affects upcoming release.

Some facts:

Bare bones msvc 6.0 installation lacks definition of socklen_t.
If PSDK feb 2003 edition is properly installed then socklen_t is
defined in ws2tcpip.h and can be used with msvc 6.0.

Trying to build any reliable software with just a bare bones msvc 6.0
installation is almost a joke.

This change http://cool.haxx.se/cvs.cgi/curl/lib/config-win32.h.diff?r1=1.52&r2=1.53
breaks all msvc builds which have PSDK properly installed and are
using a compiler previous to VS2005.

Of course that in order to get libcurl built with a msvc compiler
which lacks soklen_t it is enough to make the proper definition with a
good test/guess relative to the availability of PSDK. But before
trying to fix this there's another consideration.

Since http://cool.haxx.se/cvs.cgi/curl/include/curl/curl.h.diff?r1=1.327&r2=1.328
the interface of the library requires socklen_t being already defined
since it is exposing struct curl_sockaddr.

So the real question when using msvc is if libcurl should stop
providing a socklen_t replacement or otherwise also provide it in
inlude/curl/curl.h if not available for Windows target builds.

I hope this makes sense to someone.

Comments please.

-- 
-=[Yang]=-
Received on 2007-10-23