summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKeith Vetter <keithv@fusion.com>1995-06-03 01:38:03 +0000
committerKeith Vetter <keithv@fusion.com>1995-06-03 01:38:03 +0000
commita6eae6d985a95bd46e0ae18727258e1c1b2d555c (patch)
treebf0b9c76447d18010468fe64ae6eef49a4375a02 /src
parent99d5835b1362f2e3e9c52f2dbad0eaf17955dd2a (diff)
Better handling of error codes returned by winsock
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5937 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/util/et/ChangeLog4
-rw-r--r--src/util/et/error_message.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog
index b8330fd8d..8e7990f79 100644
--- a/src/util/et/ChangeLog
+++ b/src/util/et/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jun 2 18:05:16 1995 Keith Vetter (keithv@fusion.com)
+
+ * error_message.c: better handling of Winsock errors.
+
Tue May 2 21:35:09 1995 Tom Yu (tlyu@dragons-lair)
* Makefile.in: remove spurious whitespace from blank line
diff --git a/src/util/et/error_message.c b/src/util/et/error_message.c
index b549a02bd..9f493808f 100644
--- a/src/util/et/error_message.c
+++ b/src/util/et/error_message.c
@@ -31,6 +31,15 @@ long code;
int started = 0;
char *cp;
+#ifdef _WINDOWS
+/*
+** Winsock defines errors in the range 10000-10100. These are equivalent
+** to 10000 plus the Berkeley error numbers.
+*/
+ if (code >= 10000 && code <= 10100) /* Is it Winsock error? */
+ code -= 10000; /* Turn into Berkeley errno */
+#endif
+
l_offset = code & ((1<<ERRCODE_RANGE)-1);
offset = (int) l_offset;
table_num = code - l_offset;