]> andersk Git - openssh.git/commitdiff
[scp.c] make compilers without long long happy.
authortim <tim>
Thu, 9 Jan 2003 04:09:30 +0000 (04:09 +0000)
committertim <tim>
Thu, 9 Jan 2003 04:09:30 +0000 (04:09 +0000)
ChangeLog
scp.c

index 155da0ef1ac89fc0de362c3798b8c70ec41490d1..27c1ead30828eba311f66e8afcc7266b95e73c79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
  - (djm) Update README to reflect AIX's status as a well supported platform.
    From dtucker@zip.com.au
  - (tim) [Makefile.in configure.ac] replace fixpath with sed script. Patch
+   by Mo DeJong.
  - (tim) [auth.c] declare today at top of allowed_user() to keep
    older compilers happy.
+ - (tim) [scp.c] make compilers without long long happy.
 
 20030107
  - (djm) Bug #401: Work around Linux breakage with IPv6 mapped addresses. 
diff --git a/scp.c b/scp.c
index 71d2a0d90829655d9c7dca7e8327e9fff4502f23..8324549d7c949369544d3cabfb8a038a7f7ea768 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -1175,6 +1175,7 @@ progressmeter(int flag)
 
        nspaces = MIN(getttywidth() - 79, sizeof(spaces) - 1);
 
+#ifdef HAVE_LONG_LONG_INT
        snprintf(buf, sizeof(buf),
            "\r%-45.45s%.*s%3d%% %4lld%c%c %3lld.%01d%cB/s",
            curfile,
@@ -1188,6 +1189,21 @@ progressmeter(int flag)
            (int)((bytespersec % 1024) * 10 / 1024),
            prefixes[bi]
        );
+#else
+       snprintf(buf, sizeof(buf),
+           "\r%-45.45s%.*s%3d%% %4lld%c%c %3lu.%01d%cB/s",
+           curfile,
+           nspaces,
+           spaces,
+           ratio,
+           (u_long)abbrevsize,
+           prefixes[ai],
+           ai == 0 ? ' ' : 'B',
+           (u_long)(bytespersec / 1024),
+           (int)((bytespersec % 1024) * 10 / 1024),
+           prefixes[bi]
+       );
+#endif
 
        if (flag != 1 &&
            (statbytes <= 0 || elapsed <= 0.0 || cursize > totalbytes)) {
This page took 0.702902 seconds and 5 git commands to generate.