diff options
author | Thomas Quinot <quinot@adacore.com> | 2008-08-08 14:58:36 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-08-08 14:58:36 +0200 |
commit | 9fd03ecdc2ba6e9663ab20804182286759ca3410 (patch) | |
tree | 661f5c0c5d599f2851b4ec8de25479e2210285d6 | |
parent | 35e546dc65e821dc8a41585cbe4937286d77fbf9 (diff) | |
download | gcc-9fd03ecdc2ba6e9663ab20804182286759ca3410.zip gcc-9fd03ecdc2ba6e9663ab20804182286759ca3410.tar.gz gcc-9fd03ecdc2ba6e9663ab20804182286759ca3410.tar.bz2 |
gsocket.h: On Windows...
2008-08-08 Thomas Quinot <quinot@adacore.com>
* gsocket.h:
On Windows, include <errno.h> and redefine only selected errno values
from their <winsock2.h> definitions.
From-SVN: r138874
-rw-r--r-- | gcc/ada/gsocket.h | 124 |
1 files changed, 78 insertions, 46 deletions
diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h index b98da05..58c4abb 100644 --- a/gcc/ada/gsocket.h +++ b/gcc/ada/gsocket.h @@ -60,6 +60,7 @@ #endif #include <limits.h> +#include <errno.h> #if defined(__vxworks) #include <vxWorks.h> @@ -78,48 +79,83 @@ #include <winsock2.h> #include <ws2tcpip.h> -#define EACCES WSAEACCES -#define EADDRINUSE WSAEADDRINUSE -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#define EALREADY WSAEALREADY -#define EBADF WSAEBADF -#define ECONNABORTED WSAECONNABORTED -#define ECONNREFUSED WSAECONNREFUSED -#define ECONNRESET WSAECONNRESET -#define EDESTADDRREQ WSAEDESTADDRREQ -#define EFAULT WSAEFAULT -#define EHOSTDOWN WSAEHOSTDOWN -#define EHOSTUNREACH WSAEHOSTUNREACH -#define EINPROGRESS WSAEINPROGRESS -#define EINTR WSAEINTR -#define EINVAL WSAEINVAL -#define EIO WSAEDISCON -#define EISCONN WSAEISCONN -#define ELOOP WSAELOOP -#define EMFILE WSAEMFILE -#define EMSGSIZE WSAEMSGSIZE -#define ENAMETOOLONG WSAENAMETOOLONG -#define ENETDOWN WSAENETDOWN -#define ENETRESET WSAENETRESET -#define ENETUNREACH WSAENETUNREACH -#define ENOBUFS WSAENOBUFS -#define ENOPROTOOPT WSAENOPROTOOPT -#define ENOTCONN WSAENOTCONN -#define ENOTSOCK WSAENOTSOCK -#define EOPNOTSUPP WSAEOPNOTSUPP -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#define ENOTSOCK WSAENOTSOCK -#define EOPNOTSUPP WSAEOPNOTSUPP -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#define EPROTOTYPE WSAEPROTOTYPE -#define ESHUTDOWN WSAESHUTDOWN -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#define ETIMEDOUT WSAETIMEDOUT -#define ETOOMANYREFS WSAETOOMANYREFS -#define EWOULDBLOCK WSAEWOULDBLOCK +#undef EACCES +#define EACCES WSAEACCES +#undef EADDRINUSE +#define EADDRINUSE WSAEADDRINUSE +#undef EADDRNOTAVAIL +#define EADDRNOTAVAIL WSAEADDRNOTAVAIL +#undef EAFNOSUPPORT +#define EAFNOSUPPORT WSAEAFNOSUPPORT +#undef EALREADY +#define EALREADY WSAEALREADY +#undef EBADF +#define EBADF WSAEBADF +#undef ECONNABORTED +#define ECONNABORTED WSAECONNABORTED +#undef ECONNREFUSED +#define ECONNREFUSED WSAECONNREFUSED +#undef ECONNRESET +#define ECONNRESET WSAECONNRESET +#undef EDESTADDRREQ +#define EDESTADDRREQ WSAEDESTADDRREQ +#undef EFAULT +#define EFAULT WSAEFAULT +#undef EHOSTDOWN +#define EHOSTDOWN WSAEHOSTDOWN +#undef EHOSTUNREACH +#define EHOSTUNREACH WSAEHOSTUNREACH +#undef EINPROGRESS +#define EINPROGRESS WSAEINPROGRESS +#undef EINTR +#define EINTR WSAEINTR +#undef EINVAL +#define EINVAL WSAEINVAL +#undef EIO +#define EIO WSAEDISCON +#undef EISCONN +#define EISCONN WSAEISCONN +#undef ELOOP +#define ELOOP WSAELOOP +#undef EMFILE +#define EMFILE WSAEMFILE +#undef EMSGSIZE +#define EMSGSIZE WSAEMSGSIZE +#undef ENAMETOOLONG +#define ENAMETOOLONG WSAENAMETOOLONG +#undef ENETDOWN +#define ENETDOWN WSAENETDOWN +#undef ENETRESET +#define ENETRESET WSAENETRESET +#undef ENETUNREACH +#define ENETUNREACH WSAENETUNREACH +#undef ENOBUFS +#define ENOBUFS WSAENOBUFS +#undef ENOPROTOOPT +#define ENOPROTOOPT WSAENOPROTOOPT +#undef ENOTCONN +#define ENOTCONN WSAENOTCONN +#undef ENOTSOCK +#define ENOTSOCK WSAENOTSOCK +#undef EOPNOTSUPP +#define EOPNOTSUPP WSAEOPNOTSUPP +#undef EPFNOSUPPORT +#define EPFNOSUPPORT WSAEPFNOSUPPORT +#undef EPROTONOSUPPORT +#define EPROTONOSUPPORT WSAEPROTONOSUPPORT +#undef EPROTOTYPE +#define EPROTOTYPE WSAEPROTOTYPE +#undef ESHUTDOWN +#define ESHUTDOWN WSAESHUTDOWN +#undef ESOCKTNOSUPPORT +#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT +#undef ETIMEDOUT +#define ETIMEDOUT WSAETIMEDOUT +#undef ETOOMANYREFS +#define ETOOMANYREFS WSAETOOMANYREFS +#undef EWOULDBLOCK +#define EWOULDBLOCK WSAEWOULDBLOCK + #define SHUT_RD SD_RECEIVE #define SHUT_WR SD_SEND #define SHUT_RDWR SD_BOTH @@ -138,10 +174,6 @@ #endif -#ifndef __MINGW32__ -#include <errno.h> -#endif - #ifdef __vxworks #include <sys/times.h> #else |