[Vm-dev] Large files (>4G) under linux

Hans-Martin Mosner hmm at heeg.de
Thu Jun 3 21:05:35 UTC 2010


Hello,
in an effort to play with large (video) files I now build a VM which is
capable of handling such files.
There are basically 2 small changes:
- add the option --CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-g -O2 -fomit-frame-pointer" to the cmake call in .../unix/Makefile
- use fseeko and ftello in sqFilePluginBasicPrims.c

The first just adds the two defines to the C compiler options in
addition to options which were default anyway.

However, I'm feeling somewhat uneasy about the second change. There's a
comment by Tim Rowledge in the file which states that he removed ftello
and fseeko in 2002 to make the file ansi-compliant. The linux man page
for these function states that they are in POSIX.1-2001, which should be
old enough to depend on these functions in any posix environment.

So what do you think about it? I definitely want the VM to be able to
handle large files.

Cheers,
Hans-Martin


More information about the Vm-dev mailing list