By default, Unix's stat struct uses a 4Byte long int for the file size. This will give you a maximum file size of about 4GB (by unsinging the int). In order to support files above that size you need to add the following flags to your MakeFile.
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Since I am using automake, I did this by using the following flags to my configure call:
./configure CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
Monday, May 24, 2010
Subscribe to:
Posts (Atom)