From: Pierre Ossman Date: Fri, 29 May 2015 14:54:21 +0000 (+0200) Subject: Fix Winsock errno code overlap X-Git-Tag: v1.4.90~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=500cb6ef11a52345bf49e751976bff386e6e09ef;p=tigervnc.git Fix Winsock errno code overlap Some Winsock errno:s conflict with the standard ones. Try to restrict the redefines to things relevant for sockets. --- diff --git a/common/os/winerrno.h b/common/os/winerrno.h index aebbdbe7..052d4de2 100644 --- a/common/os/winerrno.h +++ b/common/os/winerrno.h @@ -2,21 +2,9 @@ /* Generated with: cat /usr/i686-pc-mingw32/sys-root/mingw/include/winerror.h \ | awk '/#define WSAE.*WSABASE/{gsub("WSA", ""); print "#undef " $2 "\n#define " $2 " WSA" $2}' \ - | egrep -v '_QOS|PROVIDER|PROCTABLE' + | egrep -v 'EINTR|EBADF|EACCES|EFAULT|EINVAL|EMFILE|_QOS|PROVIDER|PROCTABLE' */ -#undef EINTR -#define EINTR WSAEINTR -#undef EBADF -#define EBADF WSAEBADF -#undef EACCES -#define EACCES WSAEACCES -#undef EFAULT -#define EFAULT WSAEFAULT -#undef EINVAL -#define EINVAL WSAEINVAL -#undef EMFILE -#define EMFILE WSAEMFILE #undef EWOULDBLOCK #define EWOULDBLOCK WSAEWOULDBLOCK #undef EINPROGRESS diff --git a/common/rdr/FdInStream.cxx b/common/rdr/FdInStream.cxx index 22433a1b..9f35c9fb 100644 --- a/common/rdr/FdInStream.cxx +++ b/common/rdr/FdInStream.cxx @@ -22,6 +22,7 @@ #include #include +#include #ifdef _WIN32 #include #ifndef _WIN32_WCE @@ -34,7 +35,6 @@ #include #else #include -#include #include #include #endif diff --git a/common/rdr/FdOutStream.cxx b/common/rdr/FdOutStream.cxx index 83360d64..75131a64 100644 --- a/common/rdr/FdOutStream.cxx +++ b/common/rdr/FdOutStream.cxx @@ -23,6 +23,7 @@ #include #include +#include #ifdef _WIN32 #include #define write(s,b,l) send(s,(const char*)b,l,0) @@ -31,7 +32,6 @@ #include #else #include -#include #include #include #endif