* Bill Hoffman <bill.hoffman_at_kitware.com> [Mon, 29 Mar 2010 23:05:12
> I guess my question was directed at "Tetetest" who provided the patch.
> If he could try git master, and it works for him, then there should be
> no need for the patch.
First of all, thanks for the excellent job you did! Your patch fixes
most of the problems.
You even handle the situation when libldap is present, but ldap.h is
absent, and you
do it elegantly.
Still, there are a couple of problems still to be fixed, and I am
working on them now.
1. (fixed) Problem with curlbuild.h: when building in-source, it is not
refreshed by CMake;
when building out-of-source, curl/curl.h includes the wrong
'curlbuild.h' file. The solution
is simple: remove the file that comes with distribution prior to
generating the new one.
Thanks to Yang Tse for clarifying on this issue.
2. (well, somewhat fixed) Problem with CURL_PULL_*_H definitions that
are never set in
CMake build. As the result, no headers are included by curlbuild.h,
compile errors on OpenSolaris. My solution is simple, straightforward,
dumb: if the header is present in the system, it is pulled. Not quite
smart, but it works.
3. The problem I am trying to tackle now: windows.h, winsock2.h and
Here is it:
- When using MS Visual Stuidio 2008 compiler, 'socklen_t' is detected in
w32tcpip.h. So it is logical to pull this header (and winsock2.h) into
- Here comes the problem: VS2008 does not allow simultaneous inclusion
winsock.h and winsock2.h. If you do so, you will see a long list of
about incompatible DLL linkage specifications, redefined macros and the
By default, windows.h includes winsock.h (unless you define
If you then include winsock2.h, you are doomed (rumours say it works
when you include
winsock2.h first, but I did not bother to test).
Almost all windows applications include windows.h. We cannot guarantee
curl/curl.h is included before windows.h. We cannot demand that
be defined for all the applications that use libcurl. Also, tricks like
this don't work:
/* Yes, we define the magic here, but what if windows.h has already been
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <winsock2.h>
# include <ws2tcpip.h>
It looks like the only "truly VS2008-compatible" solution is to fall
back to 'int'(pretending we didn't find socklen_t). Sounds disgusting.
So, I am a bit stuck. Can anybody give me a piece of advice?
List admin: http://cool.haxx.se/list/listinfo/curl-library
Received on 2010-03-30