summaryrefslogtreecommitdiff
path: root/source/n/netkit-ftp/patches/08-netkit-ftp-0.17-longint.patch
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/n/netkit-ftp/patches/08-netkit-ftp-0.17-longint.patch
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/n/netkit-ftp/patches/08-netkit-ftp-0.17-longint.patch')
-rw-r--r--source/n/netkit-ftp/patches/08-netkit-ftp-0.17-longint.patch135
1 files changed, 135 insertions, 0 deletions
diff --git a/source/n/netkit-ftp/patches/08-netkit-ftp-0.17-longint.patch b/source/n/netkit-ftp/patches/08-netkit-ftp-0.17-longint.patch
new file mode 100644
index 00000000..c7b9f91d
--- /dev/null
+++ b/source/n/netkit-ftp/patches/08-netkit-ftp-0.17-longint.patch
@@ -0,0 +1,135 @@
+--- netkit-ftp-0.17/ftp/ftp.c.rasold 2005-08-22 14:22:50.000000000 +0200
++++ netkit-ftp-0.17/ftp/ftp.c 2005-08-22 14:23:02.000000000 +0200
+@@ -139,7 +139,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, long long bytes,
+ const struct timeval *t0,
+ const struct timeval *t1);
+ static void tvsub(struct timeval *tdiff,
+@@ -579,7 +579,7 @@
+ int (*volatile closefunc)(FILE *);
+ void (*volatile oldintr)(int);
+ void (*volatile oldintp)(int);
+- volatile long bytes = 0, hashbytes = HASHBYTES;
++ volatile long long bytes = 0, hashbytes = HASHBYTES;
+ char buf[BUFSIZ], *bufp;
+ const char *volatile lmode;
+
+@@ -713,14 +713,14 @@
+ if ((d = write(fileno(dout), bufp, c)) <= 0)
+ break;
+ if (hash) {
+- while (bytes >= hashbytes) {
+- (void) putchar('#');
+- hashbytes += HASHBYTES;
+- }
+- (void) fflush(stdout);
+- }
++ while (bytes >= hashbytes) { /* <-- 'long long' signed overflow is */
++ (void) putchar('#'); /* possible. In this case, we can */
++ hashbytes += HASHBYTES; /* 'cycle' there for very long time. */
++ } /* Search 'hasbytes' in file down, */
++ (void) fflush(stdout); /* there are similar parts. */
++ } /* <praszyk@redhat.com> */
+ if (tick && (bytes >= hashbytes)) {
+- printf("\rBytes transferred: %ld", bytes);
++ printf("\rBytes transferred: %lld", bytes);
+ (void) fflush(stdout);
+ while (bytes >= hashbytes)
+ hashbytes += TICKBYTES;
+@@ -733,7 +733,7 @@
+ (void) fflush(stdout);
+ }
+ if (tick) {
+- (void) printf("\rBytes transferred: %ld\n", bytes);
++ (void) printf("\rBytes transferred: %lld\n", bytes);
+ (void) fflush(stdout);
+ }
+ if (c < 0)
+@@ -755,7 +755,7 @@
+ hashbytes += HASHBYTES;
+ }
+ if (tick && (bytes >= hashbytes)) {
+- (void) printf("\rBytes transferred: %ld",
++ (void) printf("\rBytes transferred: %lld",
+ bytes);
+ (void) fflush(stdout);
+ while (bytes >= hashbytes)
+@@ -780,7 +780,7 @@
+ (void) fflush(stdout);
+ }
+ if (tick) {
+- (void) printf("\rBytes transferred: %ld\n", bytes);
++ (void) printf("\rBytes transferred: %lld\n", bytes);
+ (void) fflush(stdout);
+ }
+ if (ferror(fin))
+@@ -853,9 +853,9 @@
+ void (*volatile oldintp)(int);
+ void (*volatile oldintr)(int);
+ volatile int is_retr, tcrflag, bare_lfs = 0;
+- static unsigned bufsize;
++ static unsigned bufsize=0;
+ static char *buf;
+- volatile long bytes = 0, hashbytes = HASHBYTES;
++ volatile long long bytes = 0, hashbytes = HASHBYTES;
+ register int c, d;
+ struct timeval start, stop;
+ struct stat st;
+@@ -1031,7 +1031,7 @@
+ (void) fflush(stdout);
+ }
+ if (tick && (bytes >= hashbytes) && is_retr) {
+- (void) printf("\rBytes transferred: %ld",
++ (void) printf("\rBytes transferred: %lld",
+ bytes);
+ (void) fflush(stdout);
+ while (bytes >= hashbytes)
+@@ -1045,7 +1045,7 @@
+ (void) fflush(stdout);
+ }
+ if (tick && is_retr) {
+- (void) printf("\rBytes transferred: %ld\n", bytes);
++ (void) printf("\rBytes transferred: %lld\n", bytes);
+ (void) fflush(stdout);
+ }
+ if (c < 0) {
+@@ -1095,7 +1095,7 @@
+ hashbytes += HASHBYTES;
+ }
+ if (tick && (bytes >= hashbytes) && is_retr) {
+- printf("\rBytes transferred: %ld",
++ printf("\rBytes transferred: %lld",
+ bytes);
+ fflush(stdout);
+ while (bytes >= hashbytes)
+@@ -1126,7 +1126,7 @@
+ (void) fflush(stdout);
+ }
+ if (tick && is_retr) {
+- (void) printf("\rBytes transferred: %ld\n", bytes);
++ (void) printf("\rBytes transferred: %lld\n", bytes);
+ (void) fflush(stdout);
+ }
+ if (bare_lfs) {
+@@ -1540,7 +1540,7 @@
+ }
+
+ static void
+-ptransfer(const char *direction, long bytes,
++ptransfer(const char *direction, long long bytes,
+ const struct timeval *t0,
+ const struct timeval *t1)
+ {
+@@ -1552,7 +1552,7 @@
+ 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",
++ printf("%lld bytes %s in %.3g secs (%.2g Kbytes/sec)\n",
+ bytes, direction, s, bs / 1024.0);
+ }
+ }