summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-09-12 09:45:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-09-12 09:45:30 (GMT)
commit7f06c57b4ac6b323f0332998d5143a1a72ca2210 (patch)
treeef123aec2d702a942f2c32dc422800864a58dfb7 /win
parentd5d5ba81e2d5dc124914274f884710f0055a6fa6 (diff)
downloadtcl-7f06c57b4ac6b323f0332998d5143a1a72ca2210.zip
tcl-7f06c57b4ac6b323f0332998d5143a1a72ca2210.tar.gz
tcl-7f06c57b4ac6b323f0332998d5143a1a72ca2210.tar.bz2
[Bug 3407070] tclPosixStr.c won't build with EOVERFLOW==E2BIG
Diffstat (limited to 'win')
-rw-r--r--win/tclWinPort.h191
1 files changed, 75 insertions, 116 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index f14e1a9..f61e427 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -82,17 +82,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.
@@ -124,108 +122,74 @@
* 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
@@ -233,13 +197,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 */
/*
* Supply definitions for macros to query wait status, if not already