summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--progressmeter.c6
-rw-r--r--scp.c2
-rw-r--r--sftp-server.c4
4 files changed, 10 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f922e8d7e..1f65d2cfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
2 - (dtucker) [configure.ac] Apply tim's fix for older systems where the 2 - (dtucker) [configure.ac] Apply tim's fix for older systems where the
3 resolver state in resolv.h is "state" not "__res_state". With slight 3 resolver state in resolv.h is "state" not "__res_state". With slight
4 modification by me to also work on old AIXes. ok djm@ 4 modification by me to also work on old AIXes. ok djm@
5 - (dtucker) [progressmeter.c scp.c sftp-server.c] Use correct casts for
6 snprintf formats, fixes warnings on some 64 bit platforms. Patch from
7 shaw at vranix.com, ok djm@
5 8
620051124 920051124
7 - (djm) [configure.ac openbsd-compat/Makefile.in openbsd-compat/bsd-asprintf.c 10 - (djm) [configure.ac openbsd-compat/Makefile.in openbsd-compat/bsd-asprintf.c
@@ -3349,4 +3352,4 @@
3349 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3352 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3350 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3353 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3351 3354
3352$Id: ChangeLog,v 1.4006 2005/11/25 02:14:58 dtucker Exp $ 3355$Id: ChangeLog,v 1.4007 2005/11/25 03:44:55 dtucker Exp $
diff --git a/progressmeter.c b/progressmeter.c
index 3cda09061..13c51d87e 100644
--- a/progressmeter.c
+++ b/progressmeter.c
@@ -85,8 +85,8 @@ format_rate(char *buf, int size, off_t bytes)
85 bytes = (bytes + 512) / 1024; 85 bytes = (bytes + 512) / 1024;
86 } 86 }
87 snprintf(buf, size, "%3lld.%1lld%c%s", 87 snprintf(buf, size, "%3lld.%1lld%c%s",
88 (int64_t) (bytes + 5) / 100, 88 (long long) (bytes + 5) / 100,
89 (int64_t) (bytes + 5) / 10 % 10, 89 (long long) (bytes + 5) / 10 % 10,
90 unit[i], 90 unit[i],
91 i ? "B" : " "); 91 i ? "B" : " ");
92} 92}
@@ -99,7 +99,7 @@ format_size(char *buf, int size, off_t bytes)
99 for (i = 0; bytes >= 10000 && unit[i] != 'T'; i++) 99 for (i = 0; bytes >= 10000 && unit[i] != 'T'; i++)
100 bytes = (bytes + 512) / 1024; 100 bytes = (bytes + 512) / 1024;
101 snprintf(buf, size, "%4lld%c%s", 101 snprintf(buf, size, "%4lld%c%s",
102 (int64_t) bytes, 102 (long long) bytes,
103 unit[i], 103 unit[i],
104 i ? "B" : " "); 104 i ? "B" : " ");
105} 105}
diff --git a/scp.c b/scp.c
index 59285abca..a19021f85 100644
--- a/scp.c
+++ b/scp.c
@@ -563,7 +563,7 @@ syserr: run_err("%s: %s", name, strerror(errno));
563#define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO) 563#define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
564 snprintf(buf, sizeof buf, "C%04o %lld %s\n", 564 snprintf(buf, sizeof buf, "C%04o %lld %s\n",
565 (u_int) (stb.st_mode & FILEMODEMASK), 565 (u_int) (stb.st_mode & FILEMODEMASK),
566 (int64_t)stb.st_size, last); 566 (long long)stb.st_size, last);
567 if (verbose_mode) { 567 if (verbose_mode) {
568 fprintf(stderr, "Sending file modes: %s", buf); 568 fprintf(stderr, "Sending file modes: %s", buf);
569 } 569 }
diff --git a/sftp-server.c b/sftp-server.c
index e7d000cff..4fa07e2f5 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -428,7 +428,7 @@ process_read(void)
428 len = get_int(); 428 len = get_int();
429 429
430 TRACE("read id %u handle %d off %llu len %d", id, handle, 430 TRACE("read id %u handle %d off %llu len %d", id, handle,
431 (u_int64_t)off, len); 431 (unsigned long long)off, len);
432 if (len > sizeof buf) { 432 if (len > sizeof buf) {
433 len = sizeof buf; 433 len = sizeof buf;
434 logit("read change len %d", len); 434 logit("read change len %d", len);
@@ -469,7 +469,7 @@ process_write(void)
469 data = get_string(&len); 469 data = get_string(&len);
470 470
471 TRACE("write id %u handle %d off %llu len %d", id, handle, 471 TRACE("write id %u handle %d off %llu len %d", id, handle,
472 (u_int64_t)off, len); 472 (unsigned long long)off, len);
473 fd = handle_to_fd(handle); 473 fd = handle_to_fd(handle);
474 if (fd >= 0) { 474 if (fd >= 0) {
475 if (lseek(fd, off, SEEK_SET) < 0) { 475 if (lseek(fd, off, SEEK_SET) < 0) {