49 lines
1.5 KiB
Text
49 lines
1.5 KiB
Text
$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;
|
|
{
|