summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-27 14:26:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-03-27 14:26:16 (GMT)
commit1251bcbcc6272da5c31c077c03ce238cfde19844 (patch)
treeadc528ffaf4258cd734aa3d49c7e78f6d4e19a24 /win
parent346f5718f86090683709671a6028aa962edf6e54 (diff)
downloadtcl-1251bcbcc6272da5c31c077c03ce238cfde19844.zip
tcl-1251bcbcc6272da5c31c077c03ce238cfde19844.tar.gz
tcl-1251bcbcc6272da5c31c077c03ce238cfde19844.tar.bz2
se lower numbers, preventing integer overflow in tclWinError.c
Diffstat (limited to 'win')
-rw-r--r--win/tclWinPort.h42
1 files changed, 25 insertions, 17 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index e3c5a49..db46a4a 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -226,9 +226,9 @@ typedef DWORD_PTR * PDWORD_PTR;
#ifndef EOTHER
# define EOTHER 131 /* Other error */
#endif
-/* workaround for mingw-w64 bug 3407992 */
-#undef EOVERFLOW
-#define EOVERFLOW 132 /* File too big */
+#ifndef EOVERFLOW
+# define EOVERFLOW 132 /* File too big */
+#endif
#ifndef EOWNERDEAD
# define EOWNERDEAD 133 /* Owner dead */
#endif
@@ -255,20 +255,28 @@ typedef DWORD_PTR * PDWORD_PTR;
#endif
-#undef ESOCKTNOSUPPORT
-#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT /* Socket type not supported */
-#undef ESHUTDOWN
-#define ESHUTDOWN WSAESHUTDOWN /* Can't send after socket shutdown */
-#undef ETOOMANYREFS
-#define ETOOMANYREFS WSAETOOMANYREFS /* Too many references: can't splice */
-#undef EHOSTDOWN
-#define EHOSTDOWN WSAEHOSTDOWN /* Host is down */
-#undef EUSERS
-#define EUSERS WSAEUSERS /* Too many users (for UFS) */
-#undef EDQUOT
-#define EDQUOT WSAEDQUOT /* Disc quota exceeded */
-#undef ESTALE
-#define ESTALE WSAESTALE /* Stale NFS file handle */
+/* Visual Studio doesn't have these, so just choose some high numbers */
+#ifndef ESOCKTNOSUPPORT
+# define ESOCKTNOSUPPORT 240 /* Socket type not supported */
+#endif
+#ifndef ESHUTDOWN
+# define ESHUTDOWN 241 /* Can't send after socket shutdown */
+#endif
+#ifndef ETOOMANYREFS
+# define ETOOMANYREFS 242 /* Too many references: can't splice */
+#endif
+#ifndef EHOSTDOWN
+# define EHOSTDOWN 243 /* Host is down */
+#endif
+#ifndef EUSERS
+# define EUSERS 244 /* Too many users (for UFS) */
+#endif
+#ifndef EDQUOT
+# define EDQUOT 245 /* Disc quota exceeded */
+#endif
+#ifndef ESTALE
+# define ESTALE 246 /* Stale NFS file handle */
+#endif
/*
* Signals not known to the standard ANSI signal.h. These are used