From 55d60fce7601fab2a9f48b8af271f404f3d322b7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 10 Apr 2001 22:01:53 +0000 Subject: Fixed missing HAVE_STDARG_H. Jeremy. (This used to be commit 7cdd87954634cadda042df06c2f56aac40a7d743) --- source3/printing/print_generic.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/printing/print_generic.c b/source3/printing/print_generic.c index 4665a78609..af73088d1f 100644 --- a/source3/printing/print_generic.c +++ b/source3/printing/print_generic.c @@ -54,15 +54,32 @@ run a given print command a null terminated list of value/substitute pairs is provided for local substitution strings ****************************************************************************/ -static int print_run_command(int snum,char *command, - char *outfile, - ...) + +#ifdef HAVE_STDARG_H +static int print_run_command(int snum,char *command, char *outfile, ...) +{ +#else /* HAVE_STDARG_H */ +static int print_run_command(va_alist) +va_dcl { + int snum; + char *command, *outfile; +#endif /* HAVE_STDARG_H */ + pstring syscmd; char *p, *arg; int ret; va_list ap; +#ifdef HAVE_STDARG_H + va_start(ap, outfile); +#else /* HAVE_STDARG_H */ + va_start(ap); + snum = va_arg(ap,int); + command = va_arg(ap,char *); + outfile = va_arg(ap,char *); +#endif /* HAVE_STDARG_H */ + if (!command || !*command) return -1; if (!VALID_SNUM(snum)) { @@ -72,7 +89,6 @@ static int print_run_command(int snum,char *command, pstrcpy(syscmd, command); - va_start(ap, outfile); while ((arg = va_arg(ap, char *))) { char *value = va_arg(ap,char *); pstring_sub(syscmd, arg, value); -- cgit