[CM] file-size limit in snd?

Bill Schottstaedt bil@ccrma.Stanford.EDU
Thu, 2 May 2002 04:07:10 -0700

> Cant write files larger than 2GB in snd.

Right -- I've been putting off dealing with this, but will tackle
it now that someone wants it.  Basically a bunch of "int"s have to
become "off_t"s; and it took me awhile to find the magic macros
_FILE_OFFSET_BITS (to enable the Large File System in Linux),
and AC_SYS_LARGEFILE (autoconf).  I estimate this will be fully
incoporated within a week or less.  If you just want to write
a big file (not edit it), add this at the top of snd.h and
recompile Snd:

#define _FILE_OFFSET_BITS 64

That will automatically pull in all the 64-bit file IO functions.
I wrote a 4GB file after doing this, just to check it.
A remaining question: what's the right way to handle
these off_t's in fprintf?  (%ld + (long) works but seems
incorrect in the long run).