[810] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

util/et old configure cruft

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Fri Sep 30 12:52:14 1994

From: epeisach@MIT.EDU
Date: Fri, 30 Sep 1994 12:51:54 -0400
To: krb5-bugs@MIT.EDU


I hate the problems of internal.h screwing you all the time in defining
perror. 

com_err.c: The SGI compiler complains that error_message is not
	defined... 

compiler.h: Get rid of the const garbage. AC_CONST handles that one.
configure.in: AC_CONST for defining const or not in the Makefile.
	If perror exists in errno.h then define HDR_HAS_PERROR.
error_table.h: const garbage
internal.h: const garbage
		Also, clean up perror prototyping.... (Maybe get rid of all
		together?)

===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/et/com_err.c,v
retrieving revision 5.5
diff -c -r5.5 com_err.c
*** 5.5	1994/09/09 02:35:42
--- com_err.c	1994/09/30 16:46:39
***************
*** 17,22 ****
--- 17,29 ----
  #include "error_table.h"
  #include "internal.h"
  
+ /* We have problems with varargs definitions if we include com_err.h */
+ #ifdef __STDC__
+ extern char const *error_message (long);
+ #else
+ extern char *error_message ();
+ #endif
+ 
  #ifdef notdef
  /*
   * Protect us from header version (externally visible) of com_err, so
===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/et/compiler.h,v
retrieving revision 5.0
diff -c -r5.0 compiler.h
*** 5.0	1993/04/13 19:56:15
--- compiler.h	1994/09/30 16:09:01
***************
*** 2,13 ****
   * 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 */
--- 2,7 ----
===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/et/configure.in,v
retrieving revision 1.8
diff -c -r1.8 configure.in
*** 1.8	1994/09/23 01:14:28
--- configure.in	1994/09/30 16:47:19
***************
*** 2,7 ****
--- 2,8 ----
  WITH_CCOPTS
  CONFIG_RULES
  AC_SET_BUILDTOP
+ AC_CONST
  AC_PROG_LEX
  AC_PROG_YACC
  AC_PROG_ARCHIVE
***************
*** 8,13 ****
--- 9,16 ----
  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)
===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/et/error_table.h,v
retrieving revision 5.0
diff -c -r5.0 error_table.h
*** 5.0	1993/04/13 19:56:19
--- error_table.h	1994/09/30 16:10:20
***************
*** 6,15 ****
   */
  
  #ifndef _ET_H
- /* Are we using ANSI C? */
- #ifndef __STDC__
- #define const
- #endif
  extern int errno;
  struct error_table {
      char const * const * msgs;
--- 6,11 ----
===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/et/internal.h,v
retrieving revision 5.0
diff -c -r5.0 internal.h
*** 5.0	1993/04/13 19:56:26
--- internal.h	1994/09/30 16:05:20
***************
*** 2,11 ****
   * internal include file for com_err package
   */
  #include "mit-sipb-copyright.h"
- #ifndef __STDC__
- #undef const
- #define const
- #endif
  
  #include <errno.h>
  
--- 2,7 ----
***************
*** 14,22 ****
  extern const int sys_nerr;
  #endif
  
! /* AIX and Ultrix have standard conforming header files. */
! #if !defined(ultrix) && !defined(_AIX)
! #ifdef __STDC__
  void perror (const char *);
- #endif
  #endif
--- 10,15 ----
  extern const int sys_nerr;
  #endif
  
! #if defined(__STDC__) && !defined(HDR_HAS_PERROR)
  void perror (const char *);
  #endif

home help back first fref pref prev next nref lref last post