summaryrefslogtreecommitdiff
path: root/net/batchftp/patches/patch-aa
blob: 14f9fa8ed0396b964333440215276e80256f96f7 (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
$NetBSD: patch-aa,v 1.2 2000/12/28 00:03:20 wiz Exp $

--- batchftp.c.orig	Tue Oct 23 21:12:42 1990
+++ batchftp.c
@@ -66,7 +66,7 @@
 /* All string functions used in Batchftp are user-defined */
 
 char *strcpy ();
-int  strlen ();
+size_t  strlen ();
 int   strncmp ();
 char  *substr ();
 char  *strcat ();
@@ -129,7 +129,7 @@
 
 
 	parent_pid = (int) getpid();                    /* sprintf does not always support type "long" */
-	getwd(home_dir);
+	getcwd(home_dir,sizeof(home_dir));
 	sprintf(msgfile, "%s/msg%d",home_dir, parent_pid);      /*construct full pathname for ftp output file */
 
 	/* Parse command line switches and assign other arguments */
@@ -729,7 +729,7 @@
 	FILE            *fs_ptr;                /* pointer to f_stdout */
 	FILE            *msg_ptr;               /* pointer to ftp output file */
 	int		monitor_flag;		/* return value of monitor_ftp () */
-	union wait      status;                 /* wait for child to terminate */
+	int             status;                 /* wait for child to terminate */
 	char            *sh_args[3];            /* arguments for execv */
 
 	*alarm_flag = _FALSE;                   /* alarm has not been called */
@@ -755,7 +755,7 @@
 	sh_args[1] = sh_name;
 	sh_args[2] = 0;
 
-	if ((int) signal(SIGALRM, alarm_handler) == -1) {
+	if (signal(SIGALRM, alarm_handler) == (void *)-1) {
 		fprintf(*mptr, "\nSYSTEM ERROR -- Unable to establish timer");
 		return;
 		}
@@ -986,7 +986,7 @@
 }
 /*------------------------------------------------------- */
 
-int  strlen (s)
+size_t  strlen (s)
 
 register char  *s;
 {