[Box Backup-dev] help from a linux guru please!!!
Nick Knight
boxbackup-dev@fluffy.co.uk
Mon, 24 Jul 2006 21:51:40 +0100
Hello all,
I am still struggling with restoring large files. I found in
raidfileread.cpp it didn't appear to behaving itself that well with the
type off_t, which is what is defined in stat structure to contain the
size of the file.
Because I didn't have much success, I wrote a little program:
#include <iostream>
int main()
{
off_t nick=3D8589934591;
std::cout << "Hello World!";
return -1;
}
Ran=20
g++ test.cpp -o test -D_FILE_OFFSET_BITS=3D64
and it comes up with
error: integer constant is too large for "long" type
The problem with this is it means the type cannot hold more than a 32
bit value, the value above is larger than 32 bits but way smaller than
64 bits. I could be barking up the wrong tree but this appears why by
retrieval of a large file is not working.
I have tried this on Cent OS (g++ 3.4.5) ubuntu g++ 4.0 and gentoo g++
3.4.2.
Can someone have a look at this double check this looks sensible and
perhaps any pointers? (I am getting to the stage where I probably can't
see the wood for the trees!)
Thanks
Nick