From a6eae6d985a95bd46e0ae18727258e1c1b2d555c Mon Sep 17 00:00:00 2001 From: Keith Vetter Date: Sat, 3 Jun 1995 01:38:03 +0000 Subject: [PATCH] Better handling of error codes returned by winsock git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5937 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/et/ChangeLog | 4 ++++ src/util/et/error_message.c | 9 +++++++++ 2 files changed, 13 insertions(+) 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<