summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-12-18 22:46:53 +0000
committerrillig <rillig@pkgsrc.org>2006-12-18 22:46:53 +0000
commitb5794bf5f3136b00c6ad87e276722777c7250f13 (patch)
tree1cef2544d00f4df4fd63d21680c51a448d10aec2 /net
parent437d67a6d024fcf45e9b9264b70ce2014957cf6a (diff)
downloadpkgsrc-b5794bf5f3136b00c6ad87e276722777c7250f13.tar.gz
Fixed all gcc warnings to make batchftp compile again on NetBSD.
Diffstat (limited to 'net')
-rw-r--r--net/batchftp/distinfo4
-rw-r--r--net/batchftp/patches/patch-aa88
2 files changed, 79 insertions, 13 deletions
diff --git a/net/batchftp/distinfo b/net/batchftp/distinfo
index d999216358c..ecaf62614c1 100644
--- a/net/batchftp/distinfo
+++ b/net/batchftp/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.4 2006/01/12 13:28:57 joerg Exp $
+$NetBSD: distinfo,v 1.5 2006/12/18 22:46:53 rillig Exp $
SHA1 (batchftp102.tar.gz) = 8d4e21719e9c1e8114e254ef7329cc192e824635
RMD160 (batchftp102.tar.gz) = abd392131b18b3381747e7d45263ad0e828c0980
Size (batchftp102.tar.gz) = 20507 bytes
-SHA1 (patch-aa) = 89e6f1a5e0b898213fc271e8831f7491656db5a4
+SHA1 (patch-aa) = 46ce0bce79e930042b437a0ba8011dba7fedfd00
diff --git a/net/batchftp/patches/patch-aa b/net/batchftp/patches/patch-aa
index 4187f929cac..9972a38ecdf 100644
--- a/net/batchftp/patches/patch-aa
+++ b/net/batchftp/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.3 2006/01/12 13:28:57 joerg Exp $
+$NetBSD: patch-aa,v 1.4 2006/12/18 22:46:53 rillig Exp $
---- batchftp.c.orig 1990-10-23 20:12:42.000000000 +0000
-+++ batchftp.c
+--- batchftp.c.orig 1990-10-23 21:12:42.000000000 +0100
++++ batchftp.c 2006-12-18 23:44:29.000000000 +0100
@@ -5,10 +5,16 @@
requests, and execute all other ftp commands. A user has the option to run
the program in either the background or the foreground. */
@@ -29,7 +29,18 @@ $NetBSD: patch-aa,v 1.3 2006/01/12 13:28:57 joerg Exp $
#include <sys/socket.h>
#include <netdb.h>
-@@ -65,11 +72,7 @@ typedef char boolean;
+@@ -60,16 +67,18 @@
+
+ #include <pwd.h>
+ #include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++
++static void init_sh_script(char *, char *, char *);
++static void init_fscript (char *, char *, char *, FILE **);
++static void start_session (FILE **, char *, char *, char *, char *);
+
+ typedef char boolean;
/* All string functions used in Batchftp are user-defined */
@@ -41,7 +52,13 @@ $NetBSD: patch-aa,v 1.3 2006/01/12 13:28:57 joerg Exp $
int strpos ();
int process_entry ();
-@@ -100,7 +103,11 @@ int argc;
+@@ -95,12 +104,17 @@ int h_errno;
+ an error such as "multiply defined variable during compilation or linking,
+ delete the above declaration. */
+
++int
+ main (argc, argv)
+ int argc;
char *argv[];
{
char msgfile[_PATHLEN]; /* file containing output for all ftp transfer sessions */
@@ -53,7 +70,7 @@ $NetBSD: patch-aa,v 1.3 2006/01/12 13:28:57 joerg Exp $
char user_name[_LOGIN_LENGTH + 1]; /* user's login name */
char pass_word[_PASS_LENGTH + 1]; /* password used for ftp login */
char local_dir[_DIR_PATH]; /* local directory for ftp session */
-@@ -108,8 +115,13 @@ char *argv[];
+@@ -108,8 +122,13 @@ char *argv[];
char remote_dir[_DIR_PATH]; /* remote directory for ftp session */
char input_file[_PATHLEN]; /* user supplied file containing ftp commands and/or shorthand notation */
char remote_host[_HOSTLEN]; /* remote hostname */
@@ -67,7 +84,7 @@ $NetBSD: patch-aa,v 1.3 2006/01/12 13:28:57 joerg Exp $
char linebuf[_LBUF]; /* one line of user's input file */
boolean start_flag = _FALSE; /* indicates whether ftp attempt should begin */
-@@ -129,7 +141,7 @@ char *argv[];
+@@ -129,7 +148,7 @@ char *argv[];
parent_pid = (int) getpid(); /* sprintf does not always support type "long" */
@@ -76,7 +93,40 @@ $NetBSD: patch-aa,v 1.3 2006/01/12 13:28:57 joerg Exp $
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 +741,7 @@ char *ftp_script;
+@@ -242,7 +261,7 @@ char *remote_host;
+ /* extern int h_errno is global flag defined in <netdb.h> */
+
+ strcpy(temp_host, remote_host);
+- if (inet_addr(remote_host) != -1) /* check for valid Internet address */
++ if (inet_addr(remote_host) != INADDR_NONE) /* check for valid Internet address */
+ return(remote_host);
+
+ do {
+@@ -307,6 +326,7 @@ char *local_host;
+ the responsibility of the user to enter the proper login
+ information in the input file (free-form mode). */
+
++static void
+ init_fscript (remote_host, user_name, pass_word, fptr)
+ char *remote_host;
+ char *user_name;
+@@ -353,6 +373,7 @@ char *s;
+ /* Init_sh_script creates the one line (not including interpreter) Bourne
+ shell script to be exec'd during the ftp session. */
+
++static void
+ init_sh_script(f_stdout, ftp_script, sh_name)
+ char *f_stdout;
+ char *ftp_script;
+@@ -716,6 +737,7 @@ int *address_flag;
+ ftp command are killed simultaneously. Otherwise, the child is not
+ signalled, and it will terminate naturally. */
+
++static void
+ start_ftp (mptr, f_stdout, sh_name, alarm_flag, ftp_script)
+ FILE **mptr;
+ char *f_stdout;
+@@ -729,7 +751,7 @@ char *ftp_script;
FILE *fs_ptr; /* pointer to f_stdout */
FILE *msg_ptr; /* pointer to ftp output file */
int monitor_flag; /* return value of monitor_ftp () */
@@ -85,7 +135,7 @@ $NetBSD: patch-aa,v 1.3 2006/01/12 13:28:57 joerg Exp $
char *sh_args[3]; /* arguments for execv */
*alarm_flag = _FALSE; /* alarm has not been called */
-@@ -755,7 +767,7 @@ char *ftp_script;
+@@ -755,7 +777,7 @@ char *ftp_script;
sh_args[1] = sh_name;
sh_args[2] = 0;
@@ -94,7 +144,23 @@ $NetBSD: patch-aa,v 1.3 2006/01/12 13:28:57 joerg Exp $
fprintf(*mptr, "\nSYSTEM ERROR -- Unable to establish timer");
return;
}
-@@ -986,69 +998,6 @@ char *msgfile;
+@@ -944,6 +966,7 @@ unsigned sleep_time;
+ reset. Start_session will not terminate until check_ftp() returns a value
+ other than -1 */
+
++static void
+ start_session (mptr, f_stdout, sh_name, ftp_script, msgfile)
+ FILE **mptr;
+ char *f_stdout;
+@@ -958,6 +981,7 @@ char *msgfile;
+ int monitor_flag; /* return value of monitor_ftp () */
+ int check_flag; /* return value of check_ftp () */
+
++ check_flag = 0; /* XXX: gcc */
+ do {
+ msg_ptr = *mptr;
+ sleep_time = connect_delay(sleep_time);
+@@ -986,69 +1010,6 @@ char *msgfile;
}
/*------------------------------------------------------- */
@@ -164,7 +230,7 @@ $NetBSD: patch-aa,v 1.3 2006/01/12 13:28:57 joerg Exp $
char *substr (s1, s2)
register char *s1, *s2;
-@@ -1068,20 +1017,6 @@ register char *s1, *s2;
+@@ -1068,20 +1029,6 @@ register char *s1, *s2;
}
/* -------------------------------------------------- */