summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1994-09-30 21:36:56 +0000
committerTheodore Tso <tytso@mit.edu>1994-09-30 21:36:56 +0000
commit631befc475037c6a52c5d4e174f5cd5b347ff483 (patch)
tree74aef0f5205ee1b05b9d60cb37eaf910aac27635 /src/util
parent65596099439dce1daed8fe2c75ea460bc06ab899 (diff)
downloadkrb5-631befc475037c6a52c5d4e174f5cd5b347ff483.tar.gz
krb5-631befc475037c6a52c5d4e174f5cd5b347ff483.tar.xz
krb5-631befc475037c6a52c5d4e174f5cd5b347ff483.zip
Let configure take care of removing const with AC_CONST
internal.h: Use autoconf to determin whether or not declare perror() compile_et.c: Add declaration of error_message manully. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4409 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r--src/util/et/ChangeLog13
-rw-r--r--src/util/et/com_err.c12
-rw-r--r--src/util/et/compile_et.c4
-rw-r--r--src/util/et/compiler.h6
-rw-r--r--src/util/et/configure.in3
-rw-r--r--src/util/et/init_et.c5
-rw-r--r--src/util/et/internal.h9
7 files changed, 29 insertions, 23 deletions
diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog
index 177de27d3..1382bc85f 100644
--- a/src/util/et/ChangeLog
+++ b/src/util/et/ChangeLog
@@ -1,3 +1,16 @@
+Fri Sep 30 17:12:15 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * compile_et.c: Add declaration of error_message() manually.
+
+ * internal.h: Use autoconf to determine whether or not to declare
+ perror().
+
+ * configure.in:
+ compiler.h:
+ internal.h:
+ compilet_et.c:
+ init_et.c: Let configure take care of removing const with AC_CONST.
+
Thu Sep 8 22:33:07 1994 Theodore Y. Ts'o (tytso@pinata)
* com_err.c (default_com_err_proc): Reversed order of \n\r to make
diff --git a/src/util/et/com_err.c b/src/util/et/com_err.c
index 127c1548a..8860446f1 100644
--- a/src/util/et/com_err.c
+++ b/src/util/et/com_err.c
@@ -27,6 +27,18 @@
#undef com_err
#endif
+/* We have problems with varargs definitions if we include com_err.h */
+
+/*
+ * XXX for now, we define error_message by hand. Ultimately, we
+ * should fix up com_err.h so that it's safe to #include here
+ * directly.
+ */
+#ifdef __STDC__
+extern char const *error_message (long);
+#else
+extern char *error_message ();
+#endif
static void
#ifdef __STDC__
diff --git a/src/util/et/compile_et.c b/src/util/et/compile_et.c
index 7883a5802..a6bf02c6a 100644
--- a/src/util/et/compile_et.c
+++ b/src/util/et/compile_et.c
@@ -15,10 +15,6 @@
#include "mit-sipb-copyright.h"
#include "compiler.h"
-#ifndef __STDC__
-#define const
-#endif
-
#ifndef lint
static const char copyright[] =
"Copyright 1987,1988 by MIT Student Information Processing Board";
diff --git a/src/util/et/compiler.h b/src/util/et/compiler.h
index 43752e286..3e23f1296 100644
--- a/src/util/et/compiler.h
+++ b/src/util/et/compiler.h
@@ -2,12 +2,6 @@
* definitions common to the source files of the error table compiler
*/
-#ifndef __STDC__
-/* loser */
-#undef const
-#define const
-#endif
-
enum lang {
lang_C, /* ANSI C (default) */
lang_KRC, /* C: ANSI + K&R */
diff --git a/src/util/et/configure.in b/src/util/et/configure.in
index 0d1edb9ae..31d62d277 100644
--- a/src/util/et/configure.in
+++ b/src/util/et/configure.in
@@ -2,12 +2,15 @@ AC_INIT(error_table.y)
WITH_CCOPTS
CONFIG_RULES
AC_SET_BUILDTOP
+AC_CONST
AC_PROG_LEX
AC_PROG_YACC
AC_PROG_ARCHIVE
AC_PROG_RANLIB
HAVE_YYLINENO
DECLARE_SYS_ERRLIST
+AC_CHECKING(for perror declaration)
+AC_HEADER_EGREP(perror, errno.h, AC_DEFINE(HDR_HAS_PERROR))
CHECK_STDARG
AC_HAVE_HEADERS(stdlib.h)
CopySrcHeader(com_err.h,$(BUILDTOP)/include)
diff --git a/src/util/et/init_et.c b/src/util/et/init_et.c
index a7bfc9089..f52facade 100644
--- a/src/util/et/init_et.c
+++ b/src/util/et/init_et.c
@@ -11,11 +11,6 @@
#include "error_table.h"
#include "mit-sipb-copyright.h"
-#ifndef __STDC__
-#define const
-#endif
-
-
extern char *malloc(), *realloc();
struct foobar {
diff --git a/src/util/et/internal.h b/src/util/et/internal.h
index 112c0161e..a101f262f 100644
--- a/src/util/et/internal.h
+++ b/src/util/et/internal.h
@@ -2,10 +2,6 @@
* internal include file for com_err package
*/
#include "mit-sipb-copyright.h"
-#ifndef __STDC__
-#undef const
-#define const
-#endif
#include <errno.h>
@@ -14,9 +10,6 @@ extern char const * const sys_errlist[];
extern const int sys_nerr;
#endif
-/* AIX and Ultrix have standard conforming header files. */
-#if !defined(ultrix) && !defined(_AIX)
-#ifdef __STDC__
+#if defined(__STDC__) && !defined(HDR_HAS_PERROR)
void perror (const char *);
#endif
-#endif