diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2012-11-04 02:52:03 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2012-11-04 02:52:03 +0000 |
commit | 23090366f729c56cab62de74c7a51792357e98a9 (patch) | |
tree | c511c885796e28ec571b5267e8f11f3b103d35e9 /usr.bin/fetch | |
parent | 7750ad47a9a7dbc83f87158464170c8640723293 (diff) | |
parent | 22ff74b2f44234d31540b1f7fd6c91489c37cad3 (diff) | |
download | src-test2-23090366f729c56cab62de74c7a51792357e98a9.tar.gz src-test2-23090366f729c56cab62de74c7a51792357e98a9.zip |
Notes
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r-- | usr.bin/fetch/Makefile | 7 | ||||
-rw-r--r-- | usr.bin/fetch/fetch.c | 82 |
2 files changed, 45 insertions, 44 deletions
diff --git a/usr.bin/fetch/Makefile b/usr.bin/fetch/Makefile index 6f0db80ca4d7..687f3eac73d1 100644 --- a/usr.bin/fetch/Makefile +++ b/usr.bin/fetch/Makefile @@ -4,11 +4,12 @@ PROG= fetch CSTD?= c99 +.if ${MK_OPENSSL} != "no" +DPADD= ${LIBFETCH} ${LIBSSL} ${LIBCRYPTO} +LDADD= -lfetch -lssl -lcrypto +.else DPADD= ${LIBFETCH} ${LIBMD} LDADD= -lfetch -lmd -.if ${MK_OPENSSL} != "no" -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto .endif .include <bsd.prog.mk> diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index e8b7318a7ffe..3e897d7e1a8d 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -51,47 +51,47 @@ __FBSDID("$FreeBSD$"); #define TIMEOUT 120 /* Option flags */ -int A_flag; /* -A: do not follow 302 redirects */ -int a_flag; /* -a: auto retry */ -off_t B_size; /* -B: buffer size */ -int b_flag; /*! -b: workaround TCP bug */ -char *c_dirname; /* -c: remote directory */ -int d_flag; /* -d: direct connection */ -int F_flag; /* -F: restart without checking mtime */ -char *f_filename; /* -f: file to fetch */ -char *h_hostname; /* -h: host to fetch from */ -int i_flag; /* -i: specify input file for mtime comparison */ -char *i_filename; /* name of input file */ -int l_flag; /* -l: link rather than copy file: URLs */ -int m_flag; /* -[Mm]: mirror mode */ -char *N_filename; /* -N: netrc file name */ -int n_flag; /* -n: do not preserve modification time */ -int o_flag; /* -o: specify output file */ -int o_directory; /* output file is a directory */ -char *o_filename; /* name of output file */ -int o_stdout; /* output file is stdout */ -int once_flag; /* -1: stop at first successful file */ -int p_flag; /* -[Pp]: use passive FTP */ -int R_flag; /* -R: don't delete partially transferred files */ -int r_flag; /* -r: restart previously interrupted transfer */ -off_t S_size; /* -S: require size to match */ -int s_flag; /* -s: show size, don't fetch */ -long T_secs; /* -T: transfer timeout in seconds */ -int t_flag; /*! -t: workaround TCP bug */ -int U_flag; /* -U: do not use high ports */ -int v_level = 1; /* -v: verbosity level */ -int v_tty; /* stdout is a tty */ -pid_t pgrp; /* our process group */ -long w_secs; /* -w: retry delay */ -int family = PF_UNSPEC; /* -[46]: address family to use */ - -int sigalrm; /* SIGALRM received */ -int siginfo; /* SIGINFO received */ -int sigint; /* SIGINT received */ - -long ftp_timeout = TIMEOUT; /* default timeout for FTP transfers */ -long http_timeout = TIMEOUT; /* default timeout for HTTP transfers */ -char *buf; /* transfer buffer */ +static int A_flag; /* -A: do not follow 302 redirects */ +static int a_flag; /* -a: auto retry */ +static off_t B_size; /* -B: buffer size */ +static int b_flag; /*! -b: workaround TCP bug */ +static char *c_dirname; /* -c: remote directory */ +static int d_flag; /* -d: direct connection */ +static int F_flag; /* -F: restart without checking mtime */ +static char *f_filename; /* -f: file to fetch */ +static char *h_hostname; /* -h: host to fetch from */ +static int i_flag; /* -i: specify file for mtime comparison */ +static char *i_filename; /* name of input file */ +static int l_flag; /* -l: link rather than copy file: URLs */ +static int m_flag; /* -[Mm]: mirror mode */ +static char *N_filename; /* -N: netrc file name */ +static int n_flag; /* -n: do not preserve modification time */ +static int o_flag; /* -o: specify output file */ +static int o_directory; /* output file is a directory */ +static char *o_filename; /* name of output file */ +static int o_stdout; /* output file is stdout */ +static int once_flag; /* -1: stop at first successful file */ +static int p_flag; /* -[Pp]: use passive FTP */ +static int R_flag; /* -R: don't delete partial files */ +static int r_flag; /* -r: restart previous transfer */ +static off_t S_size; /* -S: require size to match */ +static int s_flag; /* -s: show size, don't fetch */ +static long T_secs; /* -T: transfer timeout in seconds */ +static int t_flag; /*! -t: workaround TCP bug */ +static int U_flag; /* -U: do not use high ports */ +static int v_level = 1; /* -v: verbosity level */ +static int v_tty; /* stdout is a tty */ +static pid_t pgrp; /* our process group */ +static long w_secs; /* -w: retry delay */ +static int family = PF_UNSPEC; /* -[46]: address family to use */ + +static int sigalrm; /* SIGALRM received */ +static int siginfo; /* SIGINFO received */ +static int sigint; /* SIGINT received */ + +static long ftp_timeout = TIMEOUT; /* default timeout for FTP transfers */ +static long http_timeout = TIMEOUT;/* default timeout for HTTP transfers */ +static char *buf; /* transfer buffer */ /* |