[PATCH] 64 bit clean compilation patches
Darren Tucker
dtucker at zip.com.au
Tue Nov 22 20:09:58 EST 2005
On Mon, Nov 21, 2005 at 01:04:19PM -0800, Shaw Vrana wrote:
> How's this?
>
> And I also removed my previous change to loginrec.c and applied Darren's
> patch that he sent in an earlier exchange about these warnings.
> - debug2("extract_salt: expected salt len %u, got %u",
> - salt_len, ret);
> + debug2("extract_salt: expected salt len %d, got %d",
> + SHA_DIGEST_LENGTH, ret);
Applied.
> - __func__, LASTLOG_FILE, sizeof(last), ret);
> + __func__, LASTLOG_FILE, (int)sizeof(last), ret);
[...]
> - size_t fromlen = sizeof(from);
> + socklen_t fromlen = sizeof(from);
Applied.
[...]
> snprintf(buf, size, "%4lld%c%s",
> - (int64_t) bytes,
> + (long long) bytes,
These ones I haven't applied yet, although I'm inclined to.
These would actually bring us closer to the OpenBSD version, but I'm
wondering if there's any reason why it is the way it is? djm?
[...]
> TRACE("read id %u handle %d off %llu len %d", id, handle,
> - (u_int64_t)off, len);
> + (long long)off, len);
This should be "unsigned long long", but other than that the comment
above also applies.
Thanks.
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
More information about the openssh-unix-dev
mailing list