[1192] in Kerberos-V5-bugs
STDARG fixes....
daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Sat Mar 18 07:43:01 1995
From: epeisach@MIT.EDU
Date: Sat, 18 Mar 1995 07:42:50 -0500
To: krb5-bugs@MIT.EDU
This is in response to the inconsistant changes that have been made into
the tree recently... There has been a move afoot to replace all
CHECK_STDARG with a different function... This is fine, if it is done
throughout the tree. Unfortunately, include/krb5 was changed, but not
acconnfig.h which then started breaking.
The breakage was detected in ksu where the configure.in was changed to
check for stdarg.h - the C code was changed, but the com_err.h header
file was using the old defintion and included the wrong include file for
the varargs.... com_err compiled fine because the util/et directory used
the old check still...
I believe this is complete... The only place I "missed" was makedepend...
===================================================================
RCS file: /mit/krb5/.cvsroot/src/acconfig.h,v
retrieving revision 5.5
diff -c -r5.5 acconfig.h
*** acconfig.h 1995/03/01 23:16:52 5.5
--- acconfig.h 1995/03/18 11:58:49
***************
*** 22,30 ****
#undef POSIX_SIGTYPE
#undef POSIX_TERMIOS
#undef POSIX_TYPES
! #ifndef STDARG_PROTOTYPES
! #undef STDARG_PROTOTYPES
! #endif /* STDARG_PROTOTYPES -- avoid collision with com_err.h */
#undef USE_DIRENT_H
#undef USE_STRING_H
#undef WAIT_USES_INT
--- 22,30 ----
#undef POSIX_SIGTYPE
#undef POSIX_TERMIOS
#undef POSIX_TYPES
! #ifndef HAVE_STDARG_H
! #undef HAVE_STDARG_H
! #endif /* HAVE_STDARG_H -- avoid collision with com_err.h */
#undef USE_DIRENT_H
#undef USE_STRING_H
#undef WAIT_USES_INT
===================================================================
RCS file: /mit/krb5/.cvsroot/src/aclocal.m4,v
retrieving revision 1.48
diff -c -r1.48 aclocal.m4
*** aclocal.m4 1995/03/08 01:20:00 1.48
--- aclocal.m4 1995/03/18 12:01:52
***************
*** 186,197 ****
fi
])dnl
dnl
- dnl check for <stdarg.h> -- CHECK_STDARG
- dnl (name used for consistency with krb5/config.h)
- dnl
- define(CHECK_STDARG,[
- AC_HEADER_CHECK(stdarg.h,AC_DEFINE(STDARG_PROTOTYPES))])dnl
- dnl
define(AC_PROG_ARCHIVE, [AC_PROGRAM_CHECK(ARCHIVE, ar, ar qv, false)])dnl
define(AC_PROG_ARCHIVE_ADD, [AC_PROGRAM_CHECK(ARADD, ar, ar cruv, false)])dnl
dnl
--- 186,191 ----
===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/ss/configure.in,v
retrieving revision 1.12
diff -c -r1.12 configure.in
*** configure.in 1994/10/26 05:45:53 1.12
--- configure.in 1995/03/18 12:00:30
***************
*** 6,11 ****
--- 6,12 ----
AC_PROG_YACC
AC_PROG_AWK
AC_PROG_ARCHIVE
+ AC_PROG_ARCHIVE_ADD
AC_PROG_RANLIB
HAVE_YYLINENO
AC_FUNC_CHECK(strdup,AC_DEFINE(HAS_STRDUP))
***************
*** 14,22 ****
CHECK_DIRENT
CHECK_FCNTL
CHECK_WAIT_TYPE
CHECK_SIGPROCMASK
AC_RETSIGTYPE
! CHECK_STDARG
CopySrcHeader(ss.h,$(BUILDTOP)/include/ss)
CopySrcHeader(mit-sipb-copyright.h,$(BUILDTOP)/include/ss)
CopySrcHeader(copyright.h,$(BUILDTOP)/include/ss)
--- 15,24 ----
CHECK_DIRENT
CHECK_FCNTL
CHECK_WAIT_TYPE
+ CHECK_SIGNALS
CHECK_SIGPROCMASK
AC_RETSIGTYPE
! AC_HAVE_HEADERS(stdarg.h)
CopySrcHeader(ss.h,$(BUILDTOP)/include/ss)
CopySrcHeader(mit-sipb-copyright.h,$(BUILDTOP)/include/ss)
CopySrcHeader(copyright.h,$(BUILDTOP)/include/ss)
===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/ss/error.c,v
retrieving revision 1.7
diff -c -r1.7 error.c
*** error.c 1995/02/28 09:36:53 1.7
--- error.c 1995/03/18 12:01:17
***************
*** 62,68 ****
}
}
! #ifdef STDARG_PROTOTYPES
void ss_error (int sci_idx, long code, const char * fmt, ...)
#else
void ss_error (va_alist)
--- 62,68 ----
}
}
! #ifdef HAVE_STDARG_H
void ss_error (int sci_idx, long code, const char * fmt, ...)
#else
void ss_error (va_alist)
***************
*** 71,77 ****
{
register char const *whoami;
va_list pvar;
! #ifndef STDARG_PROTOTYPES
int sci_idx;
long code;
char * fmt;
--- 71,77 ----
{
register char const *whoami;
va_list pvar;
! #ifndef HAVE_STDARG_H
int sci_idx;
long code;
char * fmt;
===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/et/configure.in,v
retrieving revision 1.12
diff -c -r1.12 configure.in
*** configure.in 1994/11/18 19:22:25 1.12
--- configure.in 1995/03/18 12:00:27
***************
*** 21,27 ****
AC_DEFINE(HDR_HAS_PERROR)
fi
dnl
! CHECK_STDARG
! AC_HAVE_HEADERS(stdlib.h)
CopySrcHeader(com_err.h,$(BUILDTOP)/include)
V5_AC_OUTPUT_MAKEFILE
--- 21,26 ----
AC_DEFINE(HDR_HAS_PERROR)
fi
dnl
! AC_HAVE_HEADERS(stdlib.h stdarg.h)
CopySrcHeader(com_err.h,$(BUILDTOP)/include)
V5_AC_OUTPUT_MAKEFILE
===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/et/com_err.h,v
retrieving revision 5.6
diff -c -r5.6 com_err.h
*** com_err.h 1995/03/17 01:35:41 5.6
--- com_err.h 1995/03/18 11:56:43
***************
*** 10,23 ****
#ifndef __COM_ERR_H
! #ifndef STDARG_PROTOTYPES
/* Imake needs this -- oh well */
#ifdef __STDC__
! #define STDARG_PROTOTYPES
#endif
#endif
! #ifdef STDARG_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
--- 10,23 ----
#ifndef __COM_ERR_H
! #ifndef HAVE_STDARG_H
/* Imake needs this -- oh well */
#ifdef __STDC__
! #define HAVE_STDARG_H
#endif
#endif
! #ifdef HAVE_STDARG_H
#include <stdarg.h>
#else
#include <varargs.h>
===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/et/com_err.c,v
retrieving revision 5.7
diff -c -r5.7 com_err.c
*** com_err.c 1995/03/17 00:30:43 5.7
--- com_err.c 1995/03/18 12:39:13
***************
*** 8,14 ****
#include <string.h>
#include "mit-sipb-copyright.h"
! #if defined(__STDC__) || defined(STDARG_PROTOTYPES)
#include <stdarg.h>
#else
#include <varargs.h>
--- 8,14 ----
#include <string.h>
#include "mit-sipb-copyright.h"
! #if defined(__STDC__) || defined(HAVE_STDARG_H)
#include <stdarg.h>
#else
#include <varargs.h>
===================================================================
RCS file: /mit/krb5/.cvsroot/src/include/krb5/base-defs.h,v
retrieving revision 5.37
diff -c -r5.37 base-defs.h
*** base-defs.h 1995/03/17 05:03:21 5.37
--- base-defs.h 1995/03/18 12:30:46
***************
*** 83,89 ****
#define STDARG_P(x) x
#else
#define STDARG_P(x) ()
! #endif /* defined(__STDC__) || defined(STDARG_PROTOTYPES) */
#else
#define PROTOTYPE(x) ()
#define STDARG_P(x) ()
--- 83,89 ----
#define STDARG_P(x) x
#else
#define STDARG_P(x) ()
! #endif /* defined(__STDC__) || defined(HAVE_STDARG_H) */
#else
#define PROTOTYPE(x) ()
#define STDARG_P(x) ()
===================================================================
RCS file: /mit/krb5/.cvsroot/src/lib/krb5/krb/bld_pr_ext.c,v
retrieving revision 5.10
diff -c -r5.10 bld_pr_ext.c
*** bld_pr_ext.c 1995/02/28 09:20:20 5.10
--- bld_pr_ext.c 1995/03/18 12:35:51
***************
*** 26,39 ****
#include "k5-int.h"
! #if __STDC__ || defined(STDARG_PROTOTYPES)
#include <stdarg.h>
#else
#include <varargs.h>
#endif
krb5_error_code INTERFACE_C
! #if __STDC__ || defined(STDARG_PROTOTYPES)
krb5_build_principal_ext(krb5_context context, krb5_principal * princ, int rlen, const char * realm, ...)
#else
krb5_build_principal_ext(context, princ, rlen, realm, va_alist)
--- 26,39 ----
#include "k5-int.h"
! #if __STDC__ || defined(HAVE_STDARG_H)
#include <stdarg.h>
#else
#include <varargs.h>
#endif
krb5_error_code INTERFACE_C
! #if __STDC__ || defined(HAVE_STDARG_H)
krb5_build_principal_ext(krb5_context context, krb5_principal * princ, int rlen, const char * realm, ...)
#else
krb5_build_principal_ext(context, princ, rlen, realm, va_alist)
***************
*** 51,57 ****
krb5_data *princ_data;
krb5_principal princ_ret;
! #if __STDC__ || defined(STDARG_PROTOTYPES)
va_start(ap, realm);
#else
va_start(ap);
--- 51,57 ----
krb5_data *princ_data;
krb5_principal princ_ret;
! #if __STDC__ || defined(HAVE_STDARG_H)
va_start(ap, realm);
#else
va_start(ap);
***************
*** 88,94 ****
tmpdata[rlen] = 0;
/* process rest of components */
! #if __STDC__ || defined(STDARG_PROTOTYPES)
va_start(ap, realm);
#else
va_start(ap);
--- 88,94 ----
tmpdata[rlen] = 0;
/* process rest of components */
! #if __STDC__ || defined(HAVE_STDARG_H)
va_start(ap, realm);
#else
va_start(ap);
===================================================================
RCS file: /mit/krb5/.cvsroot/src/lib/krb5/krb/bld_princ.c,v
retrieving revision 5.13
diff -c -r5.13 bld_princ.c
*** bld_princ.c 1995/02/28 09:20:21 5.13
--- bld_princ.c 1995/03/18 12:37:08
***************
*** 24,33 ****
* Build a principal from a list of strings
*/
! /* Need <krb5/config.h> for STDARG_PROTOTYPES */
#include "k5-int.h"
! #if __STDC__ || defined(STDARG_PROTOTYPES)
#include <stdarg.h>
#else
#include <varargs.h>
--- 24,33 ----
* Build a principal from a list of strings
*/
! /* Need <krb5/config.h> for HAVE_STDARG_H */
#include "k5-int.h"
! #if __STDC__ || defined(HAVE_STDARG_H)
#include <stdarg.h>
#else
#include <varargs.h>
***************
*** 97,103 ****
}
krb5_error_code INTERFACE_C
! #if __STDC__ || defined(STDARG_PROTOTYPES)
krb5_build_principal(krb5_context context, krb5_principal * princ, int rlen,
const char * realm, ...)
#else
--- 97,103 ----
}
krb5_error_code INTERFACE_C
! #if __STDC__ || defined(HAVE_STDARG_H)
krb5_build_principal(krb5_context context, krb5_principal * princ, int rlen,
const char * realm, ...)
#else
***************
*** 116,122 ****
if (!pr_ret)
return ENOMEM;
! #if __STDC__ || defined(STDARG_PROTOTYPES)
va_start(ap, realm);
#else
va_start(ap);
--- 116,122 ----
if (!pr_ret)
return ENOMEM;
! #if __STDC__ || defined(HAVE_STDARG_H)
va_start(ap, realm);
#else
va_start(ap);
===================================================================
RCS file: /mit/krb5/.cvsroot/src/kdc/kerberos_v4.c,v
retrieving revision 5.33
diff -c -r5.33 kerberos_v4.c
*** kerberos_v4.c 1995/02/28 10:30:21 5.33
--- kerberos_v4.c 1995/03/18 12:41:28
***************
*** 27,33 ****
#include "k5-int.h"
! #if __STDC__ || defined(STDARG_PROTOTYPES)
#include <stdarg.h>
#else
#include <varargs.h>
--- 27,33 ----
#include "k5-int.h"
! #if __STDC__ || defined(HAVE_STDARG_H)
#include <stdarg.h>
#else
#include <varargs.h>
***************
*** 454,460 ****
KRB_AP_ERR_BADVERSION /* L_KRB_PWARN 16 Protocol warning messages */
};
#define klog v4_klog
! #if __STDC__ || defined(STDARG_PROTOTYPES)
char * v4_klog( int type, const char *format, ...)
#else
char * v4_klog( type, format, va_alist)
--- 454,460 ----
KRB_AP_ERR_BADVERSION /* L_KRB_PWARN 16 Protocol warning messages */
};
#define klog v4_klog
! #if __STDC__ || defined(HAVE_STDARG_H)
char * v4_klog( int type, const char *format, ...)
#else
char * v4_klog( type, format, va_alist)
***************
*** 465,471 ****
{
int logpri = LOG_INFO;
va_list pvar;
! #if __STDC__ || defined(STDARG_PROTOTYPES)
va_start(pvar, format);
#else
va_start(pvar);
--- 465,471 ----
{
int logpri = LOG_INFO;
va_list pvar;
! #if __STDC__ || defined(HAVE_STDARG_H)
va_start(pvar, format);
#else
va_start(pvar);