]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (djm) Make scp work on systems without 64-bit ints
authorDamien Miller <djm@mindrot.org>
Mon, 19 Mar 2001 01:45:02 +0000 (12:45 +1100)
committerDamien Miller <djm@mindrot.org>
Mon, 19 Mar 2001 01:45:02 +0000 (12:45 +1100)
ChangeLog
scp.c

index 62f7b1186d14df3de004ffc5fbeb3fd228388374..94052a5ed0a5f9bdbcc6e3724bcf70dd5b046f68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
    - markus@cvs.openbsd.org 2001/03/18 12:07:52
      [auth-options.c]
      ignore permitopen="host:port" if AllowTcpForwarding==no
+ - (djm) Make scp work on systems without 64-bit ints
 
 20010318
  - (bal) Fixed scp type casing issue which causes "scp: protocol error: 
  - Wrote replacements for strlcpy and mkdtemp
  - Released 1.0pre1
 
-$Id: ChangeLog,v 1.974 2001/03/19 00:13:46 mouring Exp $
+$Id: ChangeLog,v 1.975 2001/03/19 01:45:02 djm Exp $
diff --git a/scp.c b/scp.c
index 27a502964c61b80d2c3c2d1af4019123f8f9521c..3dcd194ea1df6e3859cb2fda01c09af0ea45f63c 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -545,9 +545,17 @@ syserr:                    run_err("%s: %s", name, strerror(errno));
                                goto next;
                }
 #define        FILEMODEMASK    (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
+#ifdef HAVE_INT64_T
                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 %ld %s\n",
+                   (u_int) (stb.st_mode & FILEMODEMASK),
+                   (long) stb.st_size, last);
+#endif
+
                if (verbose_mode) {
                        fprintf(stderr, "Sending file modes: %s", buf);
                        fflush(stderr);