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
+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
#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__
#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";
* 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 */
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)
#include "error_table.h"
#include "mit-sipb-copyright.h"
-#ifndef __STDC__
-#define const
-#endif
-
-
extern char *malloc(), *realloc();
struct foobar {
* internal include file for com_err package
*/
#include "mit-sipb-copyright.h"
-#ifndef __STDC__
-#undef const
-#define const
-#endif
#include <errno.h>
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