summaryrefslogtreecommitdiff
path: root/security/AiSSLtelnet/patches/patch-af
blob: 9e4fba9d624ef45ca4f45d047cc30709915e4f6b (plain)
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
$NetBSD: patch-af,v 1.1 2004/03/25 15:23:40 taca Exp $

--- telnet/commands.c.orig	2001-08-02 22:42:45.000000000 +0900
+++ telnet/commands.c
@@ -68,7 +68,7 @@ static char vcid[] = "$Id: commands.c,v 
 #include <netdb.h>
 #include <ctype.h>
 #include <pwd.h>
-#include <varargs.h>
+#include <stdarg.h>
 #include <errno.h>
 
 #include <arpa/telnet.h>
@@ -108,7 +108,9 @@ extern int isprefix();
 extern char **genget();
 extern int Ambiguous();
 
-static int call();
+typedef int (*intrtn_t)();
+
+static int call(intrtn_t, ...);
 
 typedef struct {
 	char	*name;		/* command name */
@@ -2663,16 +2665,13 @@ static Command cmdtab2[] = {
 
     /*VARARGS1*/
     static int
-call(va_alist)
-    va_dcl
+call(intrtn_t routine, ...)
 {
     va_list ap;
-    typedef int (*intrtn_t)();
-    intrtn_t routine;
     char *args[100];
     int argno = 0;
 
-    va_start(ap);
+    va_start(ap, routine);
     routine = (va_arg(ap, intrtn_t));
     while ((args[argno++] = va_arg(ap, char *)) != 0) {
 	;