Let configure take care of removing const with AC_CONST
authorTheodore Tso <tytso@mit.edu>
Fri, 30 Sep 1994 21:36:56 +0000 (21:36 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 30 Sep 1994 21:36:56 +0000 (21:36 +0000)
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

src/util/et/ChangeLog
src/util/et/com_err.c
src/util/et/compile_et.c
src/util/et/compiler.h
src/util/et/configure.in
src/util/et/init_et.c
src/util/et/internal.h

index 177de27d33042b4a294586bc1f5d9dd304629a32..1382bc85fd70a768ba392b9830128821400b9f8d 100644 (file)
@@ -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
index 127c1548a5e7c29de9e653f3af0ddee63fd222b2..8860446f17d112ad017fac1b8a7f0e33284393ca 100644 (file)
 #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__
index 7883a5802003bc5e14e460b8ee236e69d730b97c..a6bf02c6a3e24710f55dd21f55ebfe5103356f79 100644 (file)
 #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";
index 43752e2868fea965b7bf0ea9ccba9d458c2d0cad..3e23f129651e2f357d1be8df48bc54bcf726ba59 100644 (file)
@@ -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 */
index 0d1edb9ae87b86edd1fb4679207bd8e41ad4e1d1..31d62d2778f1755edbdfad3cabfdb6b123f05341 100644 (file)
@@ -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)
index a7bfc9089834e3299b3c5a13cfb60998c1779e0c..f52facade271fb245f0891dfdbb365140efa543e 100644 (file)
 #include "error_table.h"
 #include "mit-sipb-copyright.h"
 
-#ifndef __STDC__
-#define const
-#endif
-
-
 extern char *malloc(), *realloc();
 
 struct foobar {
index 112c0161e516a65202f717e672f5fc168dbca1dd..a101f262f2b26a9d06e54dc852e560ddfa1bf571 100644 (file)
@@ -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