summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-11-11 09:49:48 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-11-11 09:49:48 +0000
commitdf9e23bb0f41e31a09ce672c19b06cd7e23d3e92 (patch)
tree0174d9950743550003826017a2d59c5ba47a23a1
parent22d20d1a7f65aeaa53ff352f4a517b6b4fcfc8ba (diff)
Slight update.
-rw-r--r--lib/libcom_err/com_err.c8
-rw-r--r--lib/libcom_err/error_message.c12
2 files changed, 14 insertions, 6 deletions
diff --git a/lib/libcom_err/com_err.c b/lib/libcom_err/com_err.c
index 0f6ff80b622..6e08993aa57 100644
--- a/lib/libcom_err/com_err.c
+++ b/lib/libcom_err/com_err.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_err.c,v 1.1 1996/11/11 04:55:03 downsj Exp $ */
+/* $OpenBSD: com_err.c,v 1.2 1996/11/11 09:49:47 downsj Exp $ */
/*-
* Copyright 1987, 1988 by the Student Information Processing Board
@@ -28,7 +28,7 @@
# include <varargs.h>
#endif
-#include "kerberosIV/com_err.h"
+#include "com_err.h"
#include "error_table.h"
/*
@@ -37,7 +37,7 @@
*/
#if VARARGS
#define com_err com_err_external
-#include "kerberosIV/com_err.h"
+#include "com_err.h"
#undef com_err
#endif
@@ -48,7 +48,7 @@
#if !defined(lint)
static const char rcsid[] =
- "$Id: com_err.c,v 1.1 1996/11/11 04:55:03 downsj Exp $";
+ "$Id: com_err.c,v 1.2 1996/11/11 09:49:47 downsj Exp $";
#endif /* ! lint */
static void
diff --git a/lib/libcom_err/error_message.c b/lib/libcom_err/error_message.c
index 53e65732f51..e74c212a9cb 100644
--- a/lib/libcom_err/error_message.c
+++ b/lib/libcom_err/error_message.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: error_message.c,v 1.1 1996/11/11 04:55:03 downsj Exp $ */
+/* $OpenBSD: error_message.c,v 1.2 1996/11/11 09:49:47 downsj Exp $ */
/*-
* Copyright 1987, 1988 by the Student Information Processing Board
@@ -23,7 +23,7 @@
#include "error_table.h"
static const char rcsid[] =
- "$Id: error_message.c,v 1.1 1996/11/11 04:55:03 downsj Exp $";
+ "$Id: error_message.c,v 1.2 1996/11/11 09:49:47 downsj Exp $";
static const char copyright[] =
"Copyright 1986, 1987, 1988 by the Student Information Processing Board\nand the department of Information Systems\nof the Massachusetts Institute of Technology";
@@ -44,10 +44,18 @@ error_message (code)
offset = code & ((1<<ERRCODE_RANGE)-1);
table_num = code - offset;
if (!table_num) {
+#ifdef HAS_SYS_ERRLIST
if (offset < sys_nerr)
return(sys_errlist[offset]);
else
goto oops;
+#else
+ cp = strerror(offset);
+ if (cp)
+ return(cp);
+ else
+ goto oops;
+#endif
}
for (et = _et_list; et; et = et->next) {
if (et->table->base == table_num) {