1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
$NetBSD: patch-af,v 1.2 2004/09/08 15:03:15 sketch Exp $
Solaris 2.6 appears to have herror(), so don't redefine it.
--- rftp/ftp.c.orig 1995-09-07 03:24:03.000000000 +0100
+++ rftp/ftp.c 2004-09-08 15:55:37.000000000 +0100
@@ -74,7 +74,7 @@
#include <netdb.h>
#include <fcntl.h>
#include <pwd.h>
-#include <varargs.h>
+#include <stdarg.h>
#ifdef FASCIST
#include <syslog.h>
@@ -112,7 +112,7 @@
FILE *cin, *cout;
FILE *dataconn();
-#if !defined(SVR3) && !defined(BIND_RESOLVER) && !defined(LINUX)
+#if !defined(SVR3) && !defined(BIND_RESOLVER) && !defined(LINUX) && !defined(SOLARIS)
/* >>> YDL */
#if !defined(BSD) || (BSD - 43 <= 0)
@@ -358,11 +358,9 @@
}
/*VARARGS*/
-command(va_alist)
-va_dcl
+command(char *fmt, ...)
{
va_list ap;
- char *fmt;
int r;
sig_t oldintr;
void cmdabort();
@@ -370,8 +368,7 @@
abrtflag = 0;
if (debug) {
printf("---> ");
- va_start(ap);
- fmt = va_arg(ap, char *);
+ va_start(ap, fmt);
if (strncmp("PASS ", fmt, 5) == 0)
printf("PASS XXXX");
else
@@ -386,8 +383,7 @@
return (0);
}
oldintr = signal(SIGINT, cmdabort);
- va_start(ap);
- fmt = va_arg(ap, char *);
+ va_start(ap, fmt);
vfprintf(cout, fmt, ap);
va_end(ap);
fprintf(cout, "\r\n");
|