summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-10 22:01:53 +0000
committerJeremy Allison <jra@samba.org>2001-04-10 22:01:53 +0000
commit55d60fce7601fab2a9f48b8af271f404f3d322b7 (patch)
treed6921893755085650454c2fb5682a06dde57c76b /source3
parent3bfbc4aaec0f59e0b77347df1ee1f6f18ac7423c (diff)
downloadsamba-55d60fce7601fab2a9f48b8af271f404f3d322b7.tar.gz
samba-55d60fce7601fab2a9f48b8af271f404f3d322b7.tar.bz2
samba-55d60fce7601fab2a9f48b8af271f404f3d322b7.zip
Fixed missing HAVE_STDARG_H.
Jeremy. (This used to be commit 7cdd87954634cadda042df06c2f56aac40a7d743)
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/print_generic.c24
1 files changed, 20 insertions, 4 deletions
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);