From 416d87409493f6d2367db40a04c19c950f271613 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Sun, 25 Feb 2001 02:02:43 +0000 Subject: [PATCH] - (bal) Replace 'unsigned long long' to 'u_int64_t' since not every platform defines u_int64_t as being that. --- ChangeLog | 4 +++- sftp-client.c | 8 ++++---- sftp-server.c | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index fddfb1841..bf847fa48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 20010225 - (djm) Use %{_libexecdir} rather than hardcoded path in RPM specfile Patch from Adrian Ho + - (bal) Replace 'unsigned long long' to 'u_int64_t' since not every + platform defines u_int64_t as being that. 20010224 - (bal) Missed part of the UNIX sockets patch. Patch by Corinna @@ -4124,4 +4126,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.820 2001/02/24 22:36:29 djm Exp $ +$Id: ChangeLog,v 1.821 2001/02/25 02:02:43 mouring Exp $ diff --git a/sftp-client.c b/sftp-client.c index 7c234ce2d..5242cab03 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -613,7 +613,7 @@ do_download(int fd_in, int fd_out, char *remote_path, char *local_path, buffer_put_int(&msg, COPY_SIZE); send_msg(fd_out, &msg); debug3("Sent message SSH2_FXP_READ I:%d O:%llu S:%u", - id, (unsigned long long)offset, COPY_SIZE); + id, (u_int64_t)offset, COPY_SIZE); buffer_clear(&msg); @@ -646,7 +646,7 @@ do_download(int fd_in, int fd_out, char *remote_path, char *local_path, len, COPY_SIZE); debug3("In read loop, got %d offset %llu", len, - (unsigned long long)offset); + (u_int64_t)offset); if (atomicio(write, local_fd, data, len) != len) { error("Couldn't write to \"%s\": %s", local_path, strerror(errno)); @@ -767,7 +767,7 @@ do_upload(int fd_in, int fd_out, char *local_path, char *remote_path, buffer_put_string(&msg, data, len); send_msg(fd_out, &msg); debug3("Sent message SSH2_FXP_WRITE I:%d O:%llu S:%u", - id, (unsigned long long)offset, len); + id, (u_int64_t)offset, len); status = get_status(fd_in, id); if (status != SSH2_FX_OK) { @@ -778,7 +778,7 @@ do_upload(int fd_in, int fd_out, char *local_path, char *remote_path, goto done; } debug3("In write loop, got %d offset %llu", len, - (unsigned long long)offset); + (u_int64_t)offset); offset += len; } diff --git a/sftp-server.c b/sftp-server.c index 0291da206..e959a5515 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -402,7 +402,7 @@ process_read(void) len = get_int(); TRACE("read id %d handle %d off %llu len %d", id, handle, - (unsigned long long)off, len); + (u_int64_t)off, len); if (len > sizeof buf) { len = sizeof buf; log("read change len %d", len); @@ -443,7 +443,7 @@ process_write(void) data = get_string(&len); TRACE("write id %d handle %d off %llu len %d", id, handle, - (unsigned long long)off, len); + (u_int64_t)off, len); fd = handle_to_fd(handle); if (fd >= 0) { if (lseek(fd, off, SEEK_SET) < 0) { @@ -685,7 +685,7 @@ ls_file(char *name, struct stat *st) if (sz == 0) tbuf[0] = '\0'; snprintf(buf, sizeof buf, "%s %3d %-8.8s %-8.8s %8llu %s %s", mode, - st->st_nlink, user, group, (unsigned long long)st->st_size, tbuf, name); + st->st_nlink, user, group, (u_int64_t)st->st_size, tbuf, name); return xstrdup(buf); }