From: Mark Eichin Date: Tue, 9 Aug 1994 00:48:45 +0000 (+0000) Subject: support varargs too, and deal with MAXHOSTNAMELEN X-Git-Tag: krb5-1.0-beta4.2~49 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3a1958fada9f6ea037665232513ff70e49d4c13f;p=krb5.git support varargs too, and deal with MAXHOSTNAMELEN git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4069 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/clients/ksu/ChangeLog b/src/clients/ksu/ChangeLog index e7851e771..ea0913c12 100644 --- a/src/clients/ksu/ChangeLog +++ b/src/clients/ksu/ChangeLog @@ -1,3 +1,9 @@ +Tue Aug 9 00:11:07 1994 Mark Eichin (eichin@cygnus.com) + + * main.c: define MAXHOSTNAMELEN if it isn't there already + (print_status): use varargs form as well + * configure.in: check for stdarg.h + Thu Aug 4 03:38:03 1994 Tom Yu (tlyu@dragons-lair) * Makefile.in: make install fixes diff --git a/src/clients/ksu/configure.in b/src/clients/ksu/configure.in index 75553e93f..b2861544f 100644 --- a/src/clients/ksu/configure.in +++ b/src/clients/ksu/configure.in @@ -10,4 +10,5 @@ AC_HAVE_LIBRARY(dbm) KRB_INCLUDE ISODE_INCLUDE WITH_KRB5ROOT +CHECK_STDARG AC_OUTPUT(Makefile,[EXTRA_RULES]) diff --git a/src/clients/ksu/ksu.h b/src/clients/ksu/ksu.h index a8d968574..76e1928a6 100644 --- a/src/clients/ksu/ksu.h +++ b/src/clients/ksu/ksu.h @@ -41,7 +41,11 @@ #include #include #include +#ifdef STDARG_PROTOTYPES #include +#else +#include +#endif #define NO_TARGET_FILE '.' #define SOURCE_USER_LOGIN "." diff --git a/src/clients/ksu/main.c b/src/clients/ksu/main.c index 909ada3fe..89ed15467 100644 --- a/src/clients/ksu/main.c +++ b/src/clients/ksu/main.c @@ -53,6 +53,11 @@ void usage (){ } +/* for Ultrix and friends ... */ +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + #define DEBUG main (argc, argv) @@ -922,14 +927,27 @@ return 0; } +#ifdef STDARG_PROTOTYPES void print_status( const char *fmt, ...) +#else +void print_status (va_alist) + va_dcl +#endif { -va_list ap; + va_list ap; +#ifndef STDARG_PROTOTYPES + char *fmt; + va_start (ap); + fmt = va_arg (ap, char*); + if (!quiet) vfprintf(stderr, fmt, ap); + va_end(ap); +#else if (! quiet){ va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); } +#endif }