Archive Index
This month's Index
|
Subject: sftp size of 2GB files
sftp size of 2GB files
From: Arno Schmitt <ars-rt_at_gmx.de>
Date: Mon, 10 Jan 2011 18:27:17 +0100
Hello,
I'm running libssh2 with sftp file transfer under Suse Linux 11.2, 64 Bit.
I've changed method
libssh2_uint64_t
in src/misc.c to the following code:
libssh2_uint64_t
msl = ((unsigned )buf[0] << 24) | ((unsigned )buf[1] << 16) | ((unsigned )buf[2] << 8) | (unsigned )buf[3];
return ((libssh2_uint64_t)msl <<32) | lsl;
This is essentially the same code as your original code. Only difference is the explicit cast of buf[i] to unsigned int.
I did not observe this problem running in a 32 bit environment. My gcc version 4.4.1 uses 8 bytes for long and 4 bytes for int in the 64 bit environment. In 32 bit environment both have size 4 bytes.
Best regards
-- Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2011-01-10 |