summaryrefslogtreecommitdiff
path: root/lib/et/init_et.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/et/init_et.c')
-rw-r--r--lib/et/init_et.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/et/init_et.c b/lib/et/init_et.c
index 856f0fdc..8e5af844 100644
--- a/lib/et/init_et.c
+++ b/lib/et/init_et.c
@@ -10,6 +10,11 @@
*/
#include <stdio.h>
+#include <errno.h>
+#ifdef HAS_STDLIB_H
+#include <stdlib.h>
+#endif
+#include "com_err.h"
#include "error_table.h"
#include "mit-sipb-copyright.h"
@@ -17,13 +22,6 @@
#define const
#endif
-#ifndef lint
-static const char rcsid_init_et_c[] =
- "$Header$";
-#endif
-
-extern char *malloc(), *realloc();
-
struct foobar {
struct et_list etl;
struct error_table et;
@@ -31,10 +29,14 @@ struct foobar {
extern struct et_list * _et_list;
+#ifdef __STDC__
+int init_error_table(const char * const *msgs, int base, int count)
+#else
int init_error_table(msgs, base, count)
const char * const * msgs;
int base;
int count;
+#endif
{
struct foobar * new_et;
@@ -43,7 +45,7 @@ int init_error_table(msgs, base, count)
new_et = (struct foobar *) malloc(sizeof(struct foobar));
if (!new_et)
- return errno; /* oops */
+ return ENOMEM; /* oops */
new_et->etl.table = &new_et->et;
new_et->et.msgs = msgs;
new_et->et.base = base;