summaryrefslogtreecommitdiff
path: root/comms/plptools/patches/patch-ac
blob: 1051accac2b021520da6abf85d76864177be7965 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
$NetBSD: patch-ac,v 1.7 2002/06/28 19:05:23 agc Exp $

--- plpftp/ftp.cc.orig	Mon Jan 17 06:49:41 2000
+++ plpftp/ftp.cc
@@ -34,6 +34,10 @@
 #include <sys/stat.h>
 #include <signal.h>
 
+#ifdef __NetBSD__
+#include <stdio.h>
+#endif
+
 #include "defs.h"
 #include "ftp.h"
 #include "rfsv.h"
@@ -335,7 +339,7 @@
 				// never used to do this
 				char dateBuff[100];
                                	struct tm *t;
-                               	t = localtime(&time);
+                               	t = localtime((time_t *)&time);
                                	strftime(dateBuff, 100, "%c", t);
                                	cout << a.opAttr(attr);
                                	cout << " " << dec << setw(10) << setfill(' ') << size;
@@ -365,7 +369,7 @@
 			else {
 				char dateBuff[100];
 				struct tm *t;
-				t = localtime(&mtime);
+				t = localtime((time_t *)&mtime);
 				strftime(dateBuff, 100, "%c %Z", t);
 				cout << dateBuff << endl;
 			}
@@ -457,7 +461,7 @@
 					long attr = s.getDWord(8);
 					char dateBuff[100];
                                 	struct tm *t;
-                                	t = localtime(&date);
+                                	t = localtime((time_t *)&date);
                                 	strftime(dateBuff, 100, "%c", t);
                                 	cout << a.opAttr(attr);
                                 	cout << " " << dec << setw(10) << setfill(' ') << size;
@@ -849,7 +853,7 @@
 static long maskAttr;
 
 static char*
-filename_generator(char *text, int state)
+filename_generator(const char *text, int state)
 {
 	static int len;
 
@@ -884,7 +888,7 @@
 }
 
 static char *
-command_generator(char *text, int state)
+command_generator(const char *text, int state)
 {
 	static int idx, len;
 	char *name;
@@ -907,13 +911,13 @@
 }
 
 static char **
-do_completion(char *text, int start, int end)
+do_completion(const char *text, int start, int end)
 {
 	char **matches = NULL;
 
-	rl_completion_entry_function = (Function *)null_completion;
+	rl_completion_entry_function = (CPFunction *)null_completion;
 	if (start == 0)
-		matches = completion_matches(text, command_generator);
+		matches = rl_completion_matches(text, command_generator);
 	else {
 		int idx = 0;
 		char *name;
@@ -934,7 +938,7 @@
 				maskAttr = 0x0010;
 		}
 		
-		matches = completion_matches(text, filename_generator);
+		matches = rl_completion_matches(text, filename_generator);
 	}
 	return matches;
 }
@@ -945,7 +949,7 @@
 {
 #if HAVE_LIBREADLINE
 	rl_readline_name = "plpftp";
-	rl_completion_entry_function = (Function *)null_completion;
+	rl_completion_entry_function = (CPFunction *)null_completion;
 	rl_attempted_completion_function = (CPPFunction *)do_completion;
 #endif
 }