]> andersk Git - openssh.git/commitdiff
- (bal) [defines.h progressmeter.c scp.c] Some more culling of non 64bit
authormouring <mouring>
Mon, 28 Apr 2003 23:30:43 +0000 (23:30 +0000)
committermouring <mouring>
Mon, 28 Apr 2003 23:30:43 +0000 (23:30 +0000)
   hacked code.

ChangeLog
defines.h
progressmeter.c
scp.c

index 2fccddfa40c7f9f7f55f7dc4c1cfbccef80d38bc..a69ef5698aea16644648f7b8d0dd905100ab7c9b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20030428
+ - (bal) [defines.h progressmeter.c scp.c] Some more culling of non 64bit 
+   hacked code.
+
 20030427
  - (bal) Bug #541: return; was dropped by mistake.  Reported by 
    furrier@iglou.com
index e8d33b2478e11e3c46cf790722891d0de5c019e3..ee40003e0d1c131a9509a8c3df3bf3418fb8c233 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -188,28 +188,21 @@ typedef unsigned long  u_int32_t;
 #ifndef HAVE_INT64_T
 # if (SIZEOF_LONG_INT == 8)
 typedef long int int64_t;
-#   define HAVE_INT64_T 1
 # else
 #  if (SIZEOF_LONG_LONG_INT == 8)
 typedef long long int int64_t;
-#   define HAVE_INT64_T 1
 #  endif
 # endif
 #endif
 #ifndef HAVE_U_INT64_T
 # if (SIZEOF_LONG_INT == 8)
 typedef unsigned long int u_int64_t;
-#   define HAVE_U_INT64_T 1
 # else
 #  if (SIZEOF_LONG_LONG_INT == 8)
 typedef unsigned long long int u_int64_t;
-#   define HAVE_U_INT64_T 1
 #  endif
 # endif
 #endif
-#if !defined(HAVE_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT == 8)
-# define HAVE_LONG_LONG_INT 1
-#endif
 
 #ifndef HAVE_U_CHAR
 typedef unsigned char u_char;
index fbfece2031122308d1158baf18c36aa6fe16909a..343e1b7d52cc8121e2891f874d393acbb52e1f58 100644 (file)
@@ -215,36 +215,19 @@ draw_progress_meter()
 
        nspaces = MIN(get_tty_width() - 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,
            nspaces,
            spaces,
            ratio,
-           (long long)abbrevsize,
+           (int64_t)abbrevsize,
            prefixes[ai],
            ai == 0 ? ' ' : 'B',
-           (long long)(bytespersec / 1024),
+           (int64_t)(bytespersec / 1024),
            (int)((bytespersec % 1024) * 10 / 1024),
            prefixes[bi]
        );
-#else
-               /* XXX: Handle integer overflow? */
-       snprintf(buf, sizeof(buf),
-           "\r%-45.45s%.*s%3d%% %4lu%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 (cursize <= 0 || elapsed <= 0.0 || cursize > totalbytes) {
                snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
diff --git a/scp.c b/scp.c
index 35d4c5f7143e5a23bdf659f7a8200125fb7fdcab..42ebec0fee4fc053337e5e466112314a9e91f948 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -554,16 +554,9 @@ syserr:                    run_err("%s: %s", name, strerror(errno));
                                goto next;
                }
 #define        FILEMODEMASK    (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
-#ifdef HAVE_LONG_LONG_INT
                snprintf(buf, sizeof buf, "C%04o %lld %s\n",
                    (u_int) (stb.st_mode & FILEMODEMASK),
-                   (long long)stb.st_size, last);
-#else
-               /* XXX: Handle integer overflow? */
-               snprintf(buf, sizeof buf, "C%04o %lu %s\n",
-                   (u_int) (stb.st_mode & FILEMODEMASK),
-                   (u_long) stb.st_size, last);
-#endif
+                   (int64_t)stb.st_size, last);
                if (verbose_mode) {
                        fprintf(stderr, "Sending file modes: %s", buf);
                }
This page took 0.047236 seconds and 5 git commands to generate.