summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1998-05-13 17:53:27 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1998-05-13 17:53:27 +0000
commit102fbb0b052434db291e85e21acf954cd934764b (patch)
treef2cba04dec0d68d5a1827dacdcb0f08a5b336acf /lib
parent269c9e33bfdfdfc1d9d6d552736f92a44b44d7f2 (diff)
use errcode_t
change errcode_t from long to int to make the API match the usage. This should solve the problems with having kerberos servers on alphas.
Diffstat (limited to 'lib')
-rw-r--r--lib/libcom_err/com_err.c18
-rw-r--r--lib/libcom_err/com_err.h16
2 files changed, 17 insertions, 17 deletions
diff --git a/lib/libcom_err/com_err.c b/lib/libcom_err/com_err.c
index ccadfafaefd..841084c5c8b 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.3 1997/07/25 20:30:27 mickey Exp $ */
+/* $OpenBSD: com_err.c,v 1.4 1998/05/13 17:53:25 art Exp $ */
/*-
* Copyright 1987, 1988 by the Student Information Processing Board
@@ -48,16 +48,16 @@
#if !defined(lint)
static const char rcsid[] =
- "$Id: com_err.c,v 1.3 1997/07/25 20:30:27 mickey Exp $";
+ "$Id: com_err.c,v 1.4 1998/05/13 17:53:25 art Exp $";
#endif /* ! lint */
static void
#ifdef __STDC__
- default_com_err_proc (const char *whoami, long code, const char *fmt, va_list args)
+ default_com_err_proc (const char *whoami, errcode_t code, const char *fmt, va_list args)
#else
default_com_err_proc (whoami, code, fmt, args)
const char *whoami;
- long code;
+ errcode_t code;
const char *fmt;
va_list args;
#endif
@@ -88,13 +88,13 @@ static void
fflush(stderr);
}
-typedef void (*errf) __P((const char *, long, const char *, va_list));
+typedef void (*errf) __P((const char *, errcode_t, const char *, va_list));
errf com_err_hook = default_com_err_proc;
void com_err_va (whoami, code, fmt, args)
const char *whoami;
- long code;
+ errcode_t code;
const char *fmt;
va_list args;
{
@@ -105,7 +105,7 @@ void com_err_va (whoami, code, fmt, args)
#if ! VARARGS
void com_err (const char *whoami,
- long code,
+ errcode_t code,
const char *fmt, ...)
{
#else
@@ -113,7 +113,7 @@ void com_err (va_alist)
va_dcl
{
const char *whoami, *fmt;
- long code;
+ errcode_t code;
#endif
va_list pvar;
@@ -122,7 +122,7 @@ void com_err (va_alist)
#if VARARGS
va_start (pvar);
whoami = va_arg (pvar, const char *);
- code = va_arg (pvar, long);
+ code = va_arg (pvar, errcode_t);
fmt = va_arg (pvar, const char *);
#else
va_start(pvar, fmt);
diff --git a/lib/libcom_err/com_err.h b/lib/libcom_err/com_err.h
index ef53c94f3f9..d58cefeedf1 100644
--- a/lib/libcom_err/com_err.h
+++ b/lib/libcom_err/com_err.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_err.h,v 1.2 1996/12/16 03:17:16 downsj Exp $ */
+/* $OpenBSD: com_err.h,v 1.3 1998/05/13 17:53:26 art Exp $ */
/*-
* Header file for common error description library.
@@ -13,18 +13,18 @@
#ifndef __COM_ERR_H
#define __COM_ERR_H
-typedef long errcode_t; /* XXX compatibilty with newer version */
+typedef int errcode_t; /* XXX compatibilty with newer version */
#include <stdarg.h>
/* ANSI C -- use prototypes etc */
-void com_err __P((const char *, long, const char *, ...));
-void com_err_va __P((const char *, long, const char *, va_list));
+void com_err __P((const char *, errcode_t, const char *, ...));
+void com_err_va __P((const char *, errcode_t, const char *, va_list));
char const *error_message __P((long));
-void (*com_err_hook) __P((const char *, long, const char *, va_list));
-void (*set_com_err_hook __P((void (*) (const char *, long, const char *, va_list))))
- __P((const char *, long, const char *, va_list));
+void (*com_err_hook) __P((const char *, errcode_t, const char *, va_list));
+void (*set_com_err_hook __P((void (*) (const char *, errcode_t, const char *, va_list))))
+ __P((const char *, errcode_t, const char *, va_list));
void (*reset_com_err_hook __P((void)))
- __P((const char *, long, const char *, va_list));
+ __P((const char *, errcode_t, const char *, va_list));
#endif /* ! defined(__COM_ERR_H) */