summaryrefslogtreecommitdiffstats
path: root/win/tclWinPort.h
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)
commit76355c598beb1f86dd374d44e2391378abae9c06 (patch)
treeadc528ffaf4258cd734aa3d49c7e78f6d4e19a24 /win/tclWinPort.h
parent034dae01f3fcf43535979274d196a241897ab59c (diff)
downloadtcl-76355c598beb1f86dd374d44e2391378abae9c06.zip
tcl-76355c598beb1f86dd374d44e2391378abae9c06.tar.gz
tcl-76355c598beb1f86dd374d44e2391378abae9c06.tar.bz2
se lower numbers, preventing integer overflow in tclWinError.c
Diffstat (limited to 'win/tclWinPort.h')
-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