cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Errno constants conflict on VC10

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 30 Apr 2010 12:47:45 +0200 (CEST)

On Fri, 30 Apr 2010, Tanguy Fautre wrote:

> All the newly defined posix constants are located in errno.h, located
> between line 91 and 132.
>
> /* POSIX SUPPLEMENT */
> #define EADDRINUSE 100
> #define EADDRNOTAVAIL 101
> #define EAFNOSUPPORT 102

Why on earth do they define all these errno values when there's nothing in
winsock that uses them?

It seems we have to (for VS2010 builds) #undef all errno defines we use and
#define them ourselves unconditionally to their WSA* equivalents. Don't you
guys agree?

The current setup_once.h seems to allow the compiler's errno.h values to have
precedence over our own definitions, do we need to keep that or can we just
#undef + #define all errnos independently of VS version?

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