curl-library
Re: Errno constants conflict on VC10
Date: Fri, 30 Apr 2010 04:03:44 +0200
2010/4/29, Tanguy Fautre <tanguyf_at_aristechnologies.com>:
> Has anyone tried to compile Curl-7.20.1 on VS2010 before?
It seems that you might be the first soul to attempt this ;-)
> I'm getting loads of macro redefinition errors. It appears that VC10
> is now defining several errno constants that weren't previously
> defined.
Provide here the list of macros that get redefined, and we'll try to
fix this. Depending on how MS has broken their compiler headers this
time, and depending on each macro that gets redefined the fix will be
different.
> For example:
>
> errno.h:
> #define EWOULDBLOCK 140
>
> Unfortunately this conflicts with setup_once.h from Curl:
> #define EWOULDBLOCK WSAEWOULDBLOCK
The fix for this one will be to add a line in setup_once.h inmediately
before the one you mention undefining the errno.h defined EWOULDBLOCK.
> Setup_once.h unfortunately appears to have already naively removed the macro
> redundancy from some errno constants such as EINVAL/WSAEINVAL (there are
> a few others, and it's guaranteed their values are incompatible).
Don't take for granted that setup_once.h is the naive one here.
Provide the list of redefined macros, which header defines them in
first place and with which value and we'll adjust our headers to fix
VS2010 brokenness.
> Note 2: I've also encountered this problem with OpenSSL 1.0.0 (makes you
> wonder whether I'm the only person that has tried compiling Curl and OpenSSL
> on VC10 since the first Beta has been released).
Others have similar problems with this issue. But MS seems
sloooooooooooower fixing issues.
http://connect.microsoft.com/VisualStudio/feedback/details/509380/errno-h-socket-return-codes-now-inconsistent-with-wsagetlasterror
Even when it isn't actually a libcurl problem, we try to do our best
in providing a library and tool that can be compiled with nearly any
f*****g compiler version. So tell us the info i've requested above in
order to make libcurl compilable out of the box even with VS2010.
-- -=[Yang]=- ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-04-30