pcp from synce-librapi2-0.9.1 refused to upload any file from an 
amd64 system saying something like this:
         Only wrote 5564 bytes of 5564 to destination file ':/test.c'

The bug is really obvious, the code assumes that size_t is 32-bit wide. 
I've attached a patch which fixes the problem for pcp, but I think 
that there may be more similar problems in other functions/architectures.

-- 
:: Andrzej Szombierski :: [EMAIL PROTECTED] :: http://kuku.eu.org ::
:: [EMAIL PROTECTED]  :: radio bez kitu :: http://bezkitu.com ::
diff -ur synce-librapi2-0.9.1-orig/tools/pcommon.c 
synce-librapi2-0.9.1/tools/pcommon.c
--- synce-librapi2-0.9.1-orig/tools/pcommon.c   2004-01-09 21:18:14.000000000 
+0100
+++ synce-librapi2-0.9.1/tools/pcommon.c        2006-04-30 02:21:43.000000000 
+0200
@@ -81,11 +81,13 @@
 
 static bool anyfile_remote_read(AnyFile* file, unsigned char* buffer, size_t 
bytes, size_t* bytesAccessed)
 {
+       *bytesAccessed = 0; // AMD64 compatibility, size_t != uint32_t
        return CeReadFile(file->handle.remote, buffer, bytes, bytesAccessed, 
NULL);
 }
 
 static bool anyfile_remote_write(AnyFile* file, unsigned char* buffer, size_t 
bytes, size_t* bytesAccessed)
 {
+       *bytesAccessed = 0; // AMD64 compatibility, size_t != uint32_t
        return CeWriteFile(file->handle.remote, buffer, bytes, bytesAccessed, 
NULL);
 }
 

Reply via email to