[patch] make cadaver work for large files
Henrik Holst
henrik at witsbits.com
Fri Aug 29 07:12:45 EDT 2008
Hello,
cadaver does not work for files larger than 2GiB aka it lacks support
for LFS.
I have included two patches, one against config.h.in which I'm a little
unsure if that is the best way to attack the problem (I'm a automake
novice). The second is against cadaver.c and is a fix for what looks
like a type where the wrong define is used to print ne_off_t values
which makes the wrong value to be printed in the progress bar when
transfering large files.
--- ../cadaver-0.23.2/config.h.in 2008-02-11 11:38:03.000000000 +0100
+++ config.h.in 2008-08-29 11:52:56.000000000 +0200
@@ -563,6 +563,10 @@
/* Defined if LFS is supported */
#undef NE_HAVE_LFS
+#ifdef NE_HAVE_LFS
+#define _FILE_OFFSET_BITS 64
+#endif
+
/* Defined if SOCKS is supported */
#undef NE_HAVE_SOCKS
--- ../cadaver-0.23.2/src/cadaver.c 2007-08-22 14:17:27.000000000 +0200
+++ src/cadaver.c 2008-08-29 12:08:50.000000000 +0200
@@ -1046,7 +1046,7 @@
putchar((n<len-1)?'=':
(n==(len-1)?'>':' '));
}
- printf(_("] %5.1f%% of %" NE_FMT_OFF_T " bytes"), pc*100, total);
+ printf(_("] %5.1f%% of %" NE_FMT_NE_OFF_T " bytes"), pc*100,
total);
fflush(stdout);
}
/Henrik Holst
Witsbits AB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cadaver.c.patch
Type: text/x-patch
Size: 378 bytes
Desc: not available
Url : http://lists.manyfish.co.uk/pipermail/cadaver/attachments/20080829/25c9d306/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.h.in.patch
Type: text/x-patch
Size: 321 bytes
Desc: not available
Url : http://lists.manyfish.co.uk/pipermail/cadaver/attachments/20080829/25c9d306/attachment-0001.bin
More information about the cadaver
mailing list