cURL / Mailing Lists / curl-library / Single Mail


Re: Errno constants conflict on VC10

From: Daniel Stenberg <>
Date: Fri, 30 Apr 2010 00:11:15 +0200 (CEST)

On Thu, 29 Apr 2010, Tanguy Fautre wrote:

> Has anyone tried to compile Curl-7.20.1 on VS2010 before? I'm getting loads
> of macro redefinition errors. It appears that VC10 is now defining several
> errno constants that weren't previously defined. For example:
> errno.h:
> #define EWOULDBLOCK 140

> Note 1: I wonder if using errno instead of GetLastError() would work with
> the new errno constants on VC10.

Can't you make a little test program and check? Or possibly the socket-related
functions have this documented...

> is there any reason why GetLastError is being used instead of
> WSAGetLastError?

I don't know. I found this quote[*], but I can't tell how accurate it is:

"From page 23 of the Winsock 2.2.2 API manual:" ...

"Instead, error codes are accessed by using the WSAGetLastError() function
described in section 102. This function is implemented in WinSock 2 as an
alias for the Win32 function GetLastError()"

[*] =

List admin:
Received on 2010-04-30