ftp/netkit-ftp-0.17.dif

158 lines
4.4 KiB
Plaintext

--- configure
+++ configure
@@ -49,7 +49,7 @@
fi
BINDIR="$EXECPREFIX/bin"
-MANDIR="$PREFIX/man"
+MANDIR="$PREFIX/share/man"
echo "Directories: $BINDIR $MANDIR "
--- ftp/Makefile
+++ ftp/Makefile
@@ -3,6 +3,7 @@
include ../MCONFIG
include ../MRULES
+CFLAGS += -D_FILE_OFFSET_BITS=64
ifeq ($(USE_READLINE),1)
CFLAGS += -D__USE_READLINE__
LIBS += -lreadline $(LIBTERMCAP)
@@ -16,7 +17,7 @@
cmds.o glob.o: glob.h
install: ftp
- install -s -m$(BINMODE) ftp $(INSTALLROOT)$(BINDIR)
+ install -m$(BINMODE) ftp $(INSTALLROOT)$(BINDIR)
ln -sf ftp $(INSTALLROOT)$(BINDIR)/pftp
install -m$(MANMODE) ftp.1 $(INSTALLROOT)$(MANDIR)/man1
ln -sf ftp.1 $(INSTALLROOT)$(MANDIR)/man1/pftp.1
--- ftp/ftp.c
+++ ftp/ftp.c
@@ -84,7 +84,7 @@
static char *gunique(char *);
static void proxtrans(const char *cmd, char *local, char *remote);
static int initconn(void);
-static void ptransfer(const char *direction, long bytes,
+static void ptransfer(const char *direction, off_t bytes,
const struct timeval *t0,
const struct timeval *t1);
static void tvsub(struct timeval *tdiff,
@@ -470,7 +470,7 @@
int (*volatile closefunc)(FILE *);
void (*volatile oldintr)(int);
void (*volatile oldintp)(int);
- volatile long bytes = 0, hashbytes = HASHBYTES;
+ volatile off_t bytes = 0, hashbytes = HASHBYTES;
char buf[BUFSIZ], *bufp;
const char *volatile lmode;
@@ -611,7 +611,7 @@
(void) fflush(stdout);
}
if (tick && (bytes >= hashbytes)) {
- printf("\rBytes transferred: %ld", bytes);
+ printf("\rBytes transferred: %Ld", (long long)bytes);
(void) fflush(stdout);
while (bytes >= hashbytes)
hashbytes += TICKBYTES;
@@ -624,7 +624,7 @@
(void) fflush(stdout);
}
if (tick) {
- (void) printf("\rBytes transferred: %ld\n", bytes);
+ (void) printf("\rBytes transferred: %Ld\n", (long long)bytes);
(void) fflush(stdout);
}
if (c < 0)
@@ -646,8 +646,8 @@
hashbytes += HASHBYTES;
}
if (tick && (bytes >= hashbytes)) {
- (void) printf("\rBytes transferred: %ld",
- bytes);
+ (void) printf("\rBytes transferred: %Ld",
+ (long long)bytes);
(void) fflush(stdout);
while (bytes >= hashbytes)
hashbytes += TICKBYTES;
@@ -671,7 +671,7 @@
(void) fflush(stdout);
}
if (tick) {
- (void) printf("\rBytes transferred: %ld\n", bytes);
+ (void) printf("\rBytes transferred: %Ld\n", (long long)bytes);
(void) fflush(stdout);
}
if (ferror(fin))
@@ -746,7 +746,7 @@
volatile int is_retr, tcrflag, bare_lfs = 0;
static unsigned bufsize;
static char *buf;
- volatile long bytes = 0, hashbytes = HASHBYTES;
+ volatile off_t bytes = 0, hashbytes = HASHBYTES;
register int c, d;
struct timeval start, stop;
struct stat st;
@@ -920,8 +920,8 @@
(void) fflush(stdout);
}
if (tick && (bytes >= hashbytes) && is_retr) {
- (void) printf("\rBytes transferred: %ld",
- bytes);
+ (void) printf("\rBytes transferred: %Ld",
+ (long long)bytes);
(void) fflush(stdout);
while (bytes >= hashbytes)
hashbytes += TICKBYTES;
@@ -934,7 +934,7 @@
(void) fflush(stdout);
}
if (tick && is_retr) {
- (void) printf("\rBytes transferred: %ld\n", bytes);
+ (void) printf("\rBytes transferred: %Ld\n", (long long)bytes);
(void) fflush(stdout);
}
if (c < 0) {
@@ -984,8 +984,8 @@
hashbytes += HASHBYTES;
}
if (tick && (bytes >= hashbytes) && is_retr) {
- printf("\rBytes transferred: %ld",
- bytes);
+ printf("\rBytes transferred: %Ld",
+ (long long)bytes);
fflush(stdout);
while (bytes >= hashbytes)
hashbytes += TICKBYTES;
@@ -1015,7 +1015,7 @@
(void) fflush(stdout);
}
if (tick && is_retr) {
- (void) printf("\rBytes transferred: %ld\n", bytes);
+ (void) printf("\rBytes transferred: %Ld\n", (long long)bytes);
(void) fflush(stdout);
}
if (bare_lfs) {
@@ -1228,7 +1228,7 @@
}
static void
-ptransfer(const char *direction, long bytes,
+ptransfer(const char *direction, off_t bytes,
const struct timeval *t0,
const struct timeval *t1)
{
@@ -1240,8 +1240,8 @@
s = td.tv_sec + (td.tv_usec / 1000000.);
#define nz(x) ((x) == 0 ? 1 : (x))
bs = bytes / nz(s);
- printf("%ld bytes %s in %.3g secs (%.2g Kbytes/sec)\n",
- bytes, direction, s, bs / 1024.0);
+ printf("%Ld bytes %s in %.3g secs (%.2g Kbytes/sec)\n",
+ (long long)bytes, direction, s, bs / 1024.0);
}
}