diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win/tclWinPort.h | 198 |
2 files changed, 87 insertions, 116 deletions
@@ -1,3 +1,8 @@ +2011-09-12 Jan Nijtmans <nijtmans@users.sf.net> + + * win/tclWinPort.h: [Bug 3407070] tclPosixStr.c won't build with + EOVERFLOW==E2BIG + 2011-09-07 Don Porter <dgp@users.sourceforge.net> * generic/tclCompExpr.c: [Bug 3401704] Allow function names like diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 6d7ffa2..2cfc715 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -92,17 +92,15 @@ * Define EINPROGRESS in terms of WSAEINPROGRESS. */ -#ifndef EINPROGRESS -# define EINPROGRESS WSAEINPROGRESS -#endif +#undef EINPROGRESS +#define EINPROGRESS WSAEINPROGRESS /* - * If ENOTSUP is not defined, define it to a value that will never occur. + * Define ENOTSUP to a value that will never occur. */ -#ifndef ENOTSUP -# define ENOTSUP -1030507 -#endif +#undef ENOTSUP +#define ENOTSUP -1030507 /* * Not all mingw32 versions have this struct. @@ -129,113 +127,86 @@ }; #endif +/* Those codes, from Visual Studio 2010, conflict with other values */ +#undef ENODATA +#undef ENOMSG +#undef ENOSR +#undef ENOSTR +#undef EPROTO + /* * The following defines redefine the Windows Socket errors as * BSD errors so Tcl_PosixError can do the right thing. */ -#ifndef EWOULDBLOCK -# define EWOULDBLOCK EAGAIN -#endif -#ifndef EALREADY -# define EALREADY 149 /* operation already in progress */ -#endif -#ifndef ENOTSOCK -# define ENOTSOCK 95 /* Socket operation on non-socket */ -#endif -#ifndef EDESTADDRREQ -# define EDESTADDRREQ 96 /* Destination address required */ -#endif -#ifndef EMSGSIZE -# define EMSGSIZE 97 /* Message too long */ -#endif -#ifndef EPROTOTYPE -# define EPROTOTYPE 98 /* Protocol wrong type for socket */ -#endif -#ifndef ENOPROTOOPT -# define ENOPROTOOPT 99 /* Protocol not available */ -#endif -#ifndef EPROTONOSUPPORT -# define EPROTONOSUPPORT 120 /* Protocol not supported */ -#endif -#ifndef ESOCKTNOSUPPORT -# define ESOCKTNOSUPPORT 121 /* Socket type not supported */ -#endif -#ifndef EOPNOTSUPP -# define EOPNOTSUPP 122 /* Operation not supported on socket */ -#endif -#ifndef EPFNOSUPPORT -# define EPFNOSUPPORT 123 /* Protocol family not supported */ -#endif -#ifndef EAFNOSUPPORT -# define EAFNOSUPPORT 124 /* Address family not supported */ -#endif -#ifndef EADDRINUSE -# define EADDRINUSE 125 /* Address already in use */ -#endif -#ifndef EADDRNOTAVAIL -# define EADDRNOTAVAIL 126 /* Can't assign requested address */ -#endif -#ifndef ENETDOWN -# define ENETDOWN 127 /* Network is down */ -#endif -#ifndef ENETUNREACH -# define ENETUNREACH 128 /* Network is unreachable */ -#endif -#ifndef ENETRESET -# define ENETRESET 129 /* Network dropped connection on reset */ -#endif -#ifndef ECONNABORTED -# define ECONNABORTED 130 /* Software caused connection abort */ -#endif -#ifndef ECONNRESET -# define ECONNRESET 131 /* Connection reset by peer */ -#endif -#ifndef ENOBUFS -# define ENOBUFS 132 /* No buffer space available */ -#endif -#ifndef EISCONN -# define EISCONN 133 /* Socket is already connected */ -#endif -#ifndef ENOTCONN -# define ENOTCONN 134 /* Socket is not connected */ -#endif -#ifndef ESHUTDOWN -# define ESHUTDOWN 143 /* Can't send after socket shutdown */ -#endif -#ifndef ETOOMANYREFS -# define ETOOMANYREFS 144 /* Too many references: can't splice */ -#endif -#ifndef ETIMEDOUT -# define ETIMEDOUT 145 /* Connection timed out */ -#endif -#ifndef ECONNREFUSED -# define ECONNREFUSED 146 /* Connection refused */ -#endif -#ifndef ELOOP -# define ELOOP 90 /* Symbolic link loop */ -#endif -#ifndef EHOSTDOWN -# define EHOSTDOWN 147 /* Host is down */ -#endif -#ifndef EHOSTUNREACH -# define EHOSTUNREACH 148 /* No route to host */ -#endif -#ifndef ENOTEMPTY -# define ENOTEMPTY 93 /* directory not empty */ -#endif -#ifndef EUSERS -# define EUSERS 94 /* Too many users (for UFS) */ -#endif -#ifndef EDQUOT -# define EDQUOT 69 /* Disc quota exceeded */ -#endif -#ifndef ESTALE -# define ESTALE 151 /* Stale NFS file handle */ -#endif -#ifndef EREMOTE -# define EREMOTE 66 /* The object is remote */ -#endif +#undef EWOULDBLOCK +#define EWOULDBLOCK EAGAIN +#undef EALREADY +#define EALREADY 149 /* operation already in progress */ +#undef ENOTSOCK +#define ENOTSOCK 95 /* Socket operation on non-socket */ +#undef EDESTADDRREQ +#define EDESTADDRREQ 96 /* Destination address required */ +#undef EMSGSIZE +#define EMSGSIZE 97 /* Message too long */ +#undef EPROTOTYPE +#define EPROTOTYPE 98 /* Protocol wrong type for socket */ +#undef ENOPROTOOPT +#define ENOPROTOOPT 99 /* Protocol not available */ +#undef EPROTONOSUPPORT +#define EPROTONOSUPPORT 120 /* Protocol not supported */ +#undef ESOCKTNOSUPPORT +#define ESOCKTNOSUPPORT 121 /* Socket type not supported */ +#undef EOPNOTSUPP +#define EOPNOTSUPP 122 /* Operation not supported on socket */ +#undef EPFNOSUPPORT +#define EPFNOSUPPORT 123 /* Protocol family not supported */ +#undef EAFNOSUPPORT +#define EAFNOSUPPORT 124 /* Address family not supported */ +#undef EADDRINUSE +#define EADDRINUSE 125 /* Address already in use */ +#undef EADDRNOTAVAIL +#define EADDRNOTAVAIL 126 /* Can't assign requested address */ +#undef ENETDOWN +#define ENETDOWN 127 /* Network is down */ +#undef ENETUNREACH +#define ENETUNREACH 128 /* Network is unreachable */ +#undef ENETRESET +#define ENETRESET 129 /* Network dropped connection on reset */ +#undef ECONNABORTED +#define ECONNABORTED 130 /* Software caused connection abort */ +#undef ECONNRESET +#define ECONNRESET 131 /* Connection reset by peer */ +#undef ENOBUFS +#define ENOBUFS 132 /* No buffer space available */ +#undef EISCONN +#define EISCONN 133 /* Socket is already connected */ +#undef ENOTCONN +#define ENOTCONN 134 /* Socket is not connected */ +#undef ESHUTDOWN +#define ESHUTDOWN 143 /* Can't send after socket shutdown */ +#undef ETOOMANYREFS +#define ETOOMANYREFS 144 /* Too many references: can't splice */ +#undef ETIMEDOUT +#define ETIMEDOUT 145 /* Connection timed out */ +#undef ECONNREFUSED +#define ECONNREFUSED 146 /* Connection refused */ +#undef ELOOP +#define ELOOP 90 /* Symbolic link loop */ +#undef EHOSTDOWN +#define EHOSTDOWN 147 /* Host is down */ +#undef EHOSTUNREACH +#define EHOSTUNREACH 148 /* No route to host */ +#undef ENOTEMPTY +#define ENOTEMPTY 93 /* directory not empty */ +#undef EUSERS +#define EUSERS 94 /* Too many users (for UFS) */ +#undef EDQUOT +#define EDQUOT 69 /* Disc quota exceeded */ +#undef ESTALE +#define ESTALE 151 /* Stale NFS file handle */ +#undef EREMOTE +#define EREMOTE 66 /* The object is remote */ /* * It is very hard to determine how Windows reacts to attempting to @@ -243,13 +214,8 @@ * region. So we fake the error code ourselves. */ -#ifndef EOVERFLOW -# ifdef EFBIG -# define EOVERFLOW EFBIG /* The object couldn't fit in the datatype */ -# else /* !EFBIG */ -# define EOVERFLOW EINVAL /* Better than nothing! */ -# endif /* EFBIG */ -#endif /* !EOVERFLOW */ +#undef EOVERFLOW +#define EOVERFLOW EFBIG /* The object couldn't fit in the datatype */ /* * Signals not known to the standard ANSI signal.h. These are used |