Thomas Waldmann
7247043db0
get rid of C compiler warnings, fixes #391
2015-11-21 22:08:30 +01:00
Thomas Waldmann
bc5949a7f4
chunker: add a check whether the POSIX_FADV_DONTNEED constant is defined
...
on openbsd, it isn't.
2015-09-14 17:36:04 +02:00
Thomas Waldmann
e244fe2f69
change 2 more chunker vars to off_t
...
so they get 64bit on 32bit platforms.
2015-09-06 22:06:52 +02:00
Alan Jenkins
59a44296e4
chunker - cast from size_t to off_t can now be removed
...
Sorry, this should really have been part of the previous commit -
it's why I noticed a problem.
2015-08-20 17:48:59 +01:00
Alan Jenkins
ce3e67cb96
chunker - fix 4GB files on 32-bit systems
...
From code inspection - effect not actually tested.
2015-08-20 17:23:50 +01:00
Alan Jenkins
7c6f3ece66
Initialize chunker fd to -1, so it's not equal to STDIN_FILENO (0)
2015-08-20 17:23:41 +01:00
Thomas Waldmann
d3d78f7ae3
call fadvise DONTNEED for the byterange we actually have read, fixes #158
...
avoid throwing away potential readahead data the OS might have read into the cache.
2015-08-20 05:33:51 +02:00
Thomas Waldmann
3be55bedd3
chunker: n needs to be a signed size_t
...
... as it is also used for the read() return value, which can be negative in case of errors.
2015-07-30 15:21:13 +02:00
Thomas Waldmann
072326fef0
chunker: get rid of read_buf
...
if we have a OS file handle, we can directly read to the final destination - one memcpy less.
if we have a Python file object, we get a Python bytes object as read result (can't save the memcpy here).
2015-05-31 18:41:23 +02:00
Thomas Waldmann
78bfc58b47
rename package directory to borg
2015-05-22 17:48:54 +02:00