[CM] file-size limit in snd?
Marty Shannon, RHCE
Marty Shannon, RHCE" <firstname.lastname@example.org
Thu, 02 May 2002 07:29:13 -0400
Bill Schottstaedt wrote:
> > 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;
No, they must become "offset_t"s. "off_t" is typically only 32 bits.
> 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).
They must be %lld and "long long"s.
Marty Shannon, RHCE, Independent Computing Consultant